As an example, a sensible Specdre Extension has been added to a three-dimensional NDF, which in fact is a data cube of HI 21 cm spectra taken on a grid of galactic longitudes and latitudes. Here is how hdstrace sees the file before the Extension is added:
LVCHI <NDF>
TITLE <_CHAR*12> 'KAPPA - Cadd'
DATA_ARRAY(32,37,150) <_REAL> -0.1216488,0.1160488,4.3972015E-02,
... 0.4012871,-7.1809769E-02,0.4626274,*
AXIS(3) <AXIS> {array of structures}
Contents of AXIS(1)
DATA_ARRAY(32) <_REAL> 130,130.1667,130.3333,130.5,130.6667,
... 134.6668,134.8335,135.0002,135.1668
Contents of AXIS(2)
DATA_ARRAY(37) <_REAL> 17,17.16667,17.33333,17.5,17.66666,
... 22.49998,22.66665,22.83331,22.99998
Contents of AXIS(3)
DATA_ARRAY(150) <_REAL> -163.855,-162.565,-161.275,-159.985,
... 24.48488,25.77489,27.06489,28.35489
Now almost all components that can exist in a Specdre Extension are set, mostly to their default values. The only component missing is the sum of rows of a covariance matrix. This is because that structure usually must not exist: other structures can be assigned `harmless' values, but the simple existence of .COVRS makes a difference. The Extension was actually made with the editext command, which can also list a summary of the Extension:
List of Specdre Extension (v. 1.1) Name of NDF: /home/hme/lvchi Spectroscopic axis: 3 Reference frame: local standard of rest Refractive index: 1.0000000 Reference frequency: 1420.405751786000 [10**9 Hz] Spectroscopic values exist and are velocity [km/s]. Spectroscopic widths do exist. First coordinates exist and are galactic longitude [degree] Second coordinates exist and are galactic latitude [degree] Covariance row sums do not exist. Result structure provides for 4 parameters in 1 component. # line name lab freq. type npara mask from to 1 HI (21cm) LV component 1420.405751786000 Gauss 4 -.1701412E+39 -.1701412E+39 # parameter type 1 centre 2 peak 3 FWHM 4 integral End of list.
Using hdstrace to list the NDF now yields:
LVCHI <NDF>
TITLE <_CHAR*12> 'KAPPA - Cadd'
DATA_ARRAY(32,37,150) <_REAL> -0.1216488,0.1160488,4.3972015E-02,
... 0.4012871,-7.1809769E-02,0.4626274,*
AXIS(3) <AXIS> {array of structures}
Contents of AXIS(1)
DATA_ARRAY(32) <_REAL> 130,130.1667,130.3333,130.5,130.6667,
... 134.6668,134.8335,135.0002,135.1668
Contents of AXIS(2)
DATA_ARRAY(37) <_REAL> 17,17.16667,17.33333,17.5,17.66666,
... 22.49998,22.66665,22.83331,22.99998
Contents of AXIS(3)
DATA_ARRAY(150) <_REAL> -163.855,-162.565,-161.275,-159.985,
... 24.48488,25.77489,27.06489,28.35489
MORE <EXT> {structure}
SPECDRE <SPECDRE_EXT> {structure}
SPECAXIS <_INTEGER> 3 (1)
RESTFRAME <_CHAR*32> 'local standard of rest' (2)
INDEXREFR <_REAL> 1 (3)
FREQREF <_DOUBLE> 1420.405751786 (4)
FREQUNIT <_INTEGER> 9 (4)
SPECVALS <NDF> {structure}
DATA_ARRAY <ARRAY> {structure} (5)
DATA(32,37,150) <_REAL> -163.855,-163.855,-163.855,
... 28.35489,28.35489,28.35489
ORIGIN(3) <_INTEGER> 1,1,1
LABEL <_CHAR*64> 'velocity' (6)
UNITS <_CHAR*64> 'km/s' (6)
SPECWIDS <NDF> {structure}
DATA_ARRAY <ARRAY> {structure} (7)
DATA(32,37,150) <_REAL> 1.289993,1.289993,1.289993,
... 1.290001,1.290001,1.290001
ORIGIN(3) <_INTEGER> 1,1,1
COORD1 <NDF> {structure} (8)
DATA_ARRAY <ARRAY> {structure}
DATA(32,37,1) <_REAL> 130,130.1667,130.3333,130.5,
... 134.8335,135.0002,135.1668
ORIGIN(3) <_INTEGER> 1,1,1
LABEL <_CHAR*64> 'galactic longitude'
UNITS <_CHAR*64> 'degree'
COORD2 <NDF> {structure} (8)
DATA_ARRAY <ARRAY> {structure}
DATA(32,37,1) <_REAL> 17,17,17,17,17,17,17,17,17,17,
... 22.99998,22.99998,22.99998
ORIGIN(3) <_INTEGER> 1,1,1
LABEL <_CHAR*64> 'galactic longitude'
UNITS <_CHAR*64> 'degree'
RESULTS <NDF> {structure} (9)
DATA_ARRAY <ARRAY> {structure} (10)
DATA(4,1,32,37) <_REAL> *,*,*,*,*,*,*,*,*,*,*,*,*,*,
*,*,*,*,*,*,*,*,*,*,*,*,*,*
ORIGIN(4) <_INTEGER> 1,1,1,1
VARIANCE <ARRAY> {structure} (11)
DATA(4,1,32,37) <_REAL> *,*,*,*,*,*,*,*,*,*,*,*,*,*,
*,*,*,*,*,*,*,*,*,*,*,*,*,*
ORIGIN(4) <_INTEGER> 1,1,1,1
MORE <EXT> {structure} (12)
LINENAME(1) <_CHAR*32> 'HI (21cm) LV component'
LABFREQ(1) <_DOUBLE> 1420.405751786
COMPTYPE(1) <_CHAR*32> 'Gauss'
NPARA(1) <_INTEGER> 4
MASKL(1) <_REAL> *
MASKR(1) <_REAL> *
PARATYPE(4) <_CHAR*32> 'centre','peak','FWHM','inte...'
Usually the result structure will be manipulated by applications as they find it necessary to store data in it. But most of the structure can be manipulated explicitly with the command editext.
We might want to also store the results for a parabolic baseline fit. Then we would add a second spectral component with three parameters. The vectors that are now of length 1 would become of length 2, .PARATYPE would become of length 7. The additional second vector elements would be `baseline', bad value, `polynomial of 2nd order', 3, bad value, bad value. The fifth to seventh element of .PARATYPE could be `coeff. 0', `coeff. 1', `coeff. 2'.
FIGARO A general data reduction system