To be compatible with what we already have done with OMEGA and PFS data: leave the Nbins everywhere - For NOMAD, it will be always =1
if Nbins = 1: no need to use 2D (3D) matrices; for example AOTFFrequency will be a 1-column matrix (vector) of length Nspectra
All dimensions are of the following: [Number of spectra] x [Number of bins] x [Number of pixels] (1 subdomain, 1 detector bin) = 1 spectrum
!! For SO and LNO: Nbins = 1; and 
Nspectra = [Nb_observationsx Nb_Detector Bins]
for UVIS : Nbins = 1; 
Nspectra = Nb_observations
All : SO/LNO/UVIS Description Units Types Shape SO/LNO Example UVIS Example
SpectralResolution FWHM spectral resolution  SAME AS X AXIS float [Nspectra x Nbins] 0.156 0.156
PixelSpectralCoefficents Values of the polynomial coefficients for calculating X values. SpectralCoefficients can vary by temperature, time, and possibly by bin. Recorded to ensure that the X-axis calibration can be checked NO UNITS float [Nspectra x Nbins] x [3] X = Coeff[0] . (Pixel + Pixel1)^2 + Coeff[1] . (Pixel + Pixel1) + Coeff[2] X = Coeff[0] . (Pixel + Pixel1)^2 + Coeff[1] . (Pixel + Pixel1) + Coeff[2]
Pixel1 Value of first pixel used to calibrate X axis from coefficients NO UNITS float [Nspectra x Nbins] 0.5 for LNO in most cases (0.5 for SOIR) 9 for UVIS
ILSFlag Flag to denote type of ILS function. 1=Sinc,2=Sinc2, 3=Gaussian NO UNITS integer [Nspectra x Nbins] 0 0
SpectralResolutionUnitFlag (always assumed to be same as X units) Units of spectral resolution. 0 = cm-1, 1= nm, 2 = um float Nspectra x Nbins e.g. 0 e.g. 0
Dataset SO/LNO Description Units Types Shape SO/LNO Example UVIS Example
AOTFBandwidth Either raw values or FWHM parameters. If raw values, provide xstart,xend,xstep,yvalues as for SOIR where units same as those of X dataset SAME AS X AXIS float [Nspectra x Nbins] x NbParameters -100,100,0.1,yvalues… NbParameters= 1 for Flag = 1, 2, 3
=15 for Flag=4
=nb Pts+3 if Flag=0 (data)
AOTFBandwidthFlag Flag to denote AOTFBandwidth type. 0=raw values, 1=Sinc, 2=Sinc2, 3=Gaussian, 4=5sinc2(with 15 parameters SOIR), 5=sinc2+gaussian (goddard model with 4 parameters I0, w, IG, sigmaG) NO UNITS Integer [Nspectra x Nbins] 0 SOIR: 15 parameters must be given: 5 center wavenumbr (first one =0.0; next 4 relative to the first); 5 FWHM; 5 relative intensity (first one =1.0; next 4 , relative to first one)
!! These parameters depend on the order nb -> should be calculated outside this file
BlazeFunction Either raw values or parameters. If raw values, provide pixelstart, pixelend, pixelstep, yvalues as for SOIR NO UNITS float [Nspectra x Nbins] x [Ncoeffs or Nvalues] 0,319,1,yvalues…
BlazeFunctionFlag Flag to denote BlazeFunction type. 0=raw values; 1=SOIR parameters: theta, gamma, alphaB, sigma in radians or metres; 2=sinc2 parameters Goddard model: [wp2, wp1, wp0, b2, b1(=0.23), b0(=160.25)] NO UNITS Integer [Nspectra x Nbins] 0
Blaze function goddard model:
p = pixels 0 to 319
wp = FSR width*0.9 measured in pixels = wp2*order^2 + wp1*order + wp0
p0 = FSR centre measured in pixels = b2*order^2 + b1*order + b0
AOTFFrequency Frequency of AOTF rounded to nearest integer KILOHERTZ Integer [Nspectra x Nbins] 16000
BackgroundSubtraction 0=Off, 1=On NO UNITS Integer [Nspectra x Nbins] 0
Binning Number of detector lines summed to make each spectrum PIXELS Integer [Nspectra x Nbins] 23
Exponent Exponent returned for each bin in frame NO UNITS Integer [Nspectra x Nbins] 4
IntegrationTime Integration time of measurement MILLISECONDS float [Nspectra x Nbins] 590
NumberOfAccumulations Number of detector accumulations  ACCUMULATIONS Integer [Nspectra x Nbins] 4
TimeTag Time offset for calculating exact execution time MILLISECONDS float [Nspectra x Nbins]
WindowHeight Number of detector lines readout for whole frame. 0=1 line PIXELS Integer [Nspectra x Nbins] 143
WindowTop Top detector line readout for whole frame. 0=first line PIXELS Integer [Nspectra x Nbins] 80
AOTFWnCoefficients Coefficients for converting AOTF frequency to wavenumber NO UNITS float [Nspectra x Nbins] x [3] 0.123, 0.456, 0.789 This is required to make the AOTF shape fit the diffraction order correctly (in case the AOTF freq is not correctly centred on the middle of the detector)
WnAOTFCoefficients Coefficients for converting wavenumber to AOTF frequency NO UNITS float [Nspectra x Nbins] x [3] 0.123, 0.456, 0.789 This is required to make the AOTF shape fit the diffraction order correctly (in case the AOTF freq is not correctly centred on the middle of the detector)
AOTFOrderCoefficients Coefficients for converting AOTF frequency to diffraction order NO UNITS float [Nspectra x Nbins] x [3] 0.123, 0.456, 0.789
OrderAOTFCoefficients Coefficients for converting order to AOTF frequency NO UNITS float [Nspectra x Nbins] x [3] 0.123, 0.456, 0.789
DiffractionOrder Diffraction order NO UNITS float Nspectra x Nbins 134
IndBin Bin number NO UNITS Integer Nspectra x Nbins 0
Dataset UVIS Description Units Types Shape SO/LNO Example UVIS Example
AcquisitionDelay NO UNITS Float Npackets
AcquisitionMode NO UNITS Integer Npackets
B0LEDControl NO UNITS Integer Npackets
B1LoopDark NO UNITS Integer Npackets
B2IntegrationTimeIncrement NO UNITS Integer Npackets
B3SciHSK NO UNITS Integer Npackets
B4LocateDark NO UNITS Integer Npackets
B5LED NO UNITS Integer Npackets
B6MotorHold NO UNITS Integer Npackets
B7SetOnOffChipBinning NO UNITS Integer Npackets
BiasAverage ACQUISITIONS Integer Npackets
ControlBits NO UNITS Integer Npackets
DarkAverage ACQUISITIONS Integer Npackets
DarkToObservationSteps STEPS Integer Npackets
HEnd PIXEL Integer Npackets
HStart PIXEL Integer Npackets
HorizontalAndCombinedBinningSize NO UNITS Integer Npackets
IntegrationTime NO UNITS Float Npackets
Mode NO UNITS Integer Npackets
MotorDelay NO UNITS Integer Npackets
MotorStartPosition NO UNITS Integer Npackets
NumberOfAcquisitions ACQUISITIONS Integer Npackets
NumberOfFlushes FLUSHES Integer Npackets
ObservationToDarkSteps STEPS Integer Npackets
ReverseFlagAndDataTypeFlagRegister NO UNITS Integer Npackets
ScienceAverage ACQUISITIONS Integer Npackets
StartDelay NO UNITS Float Npackets
VEnd PIXEL Integer Npackets
VStart PIXEL Integer Npackets