next up previous 399
Next: FITS2NDF - Converts FITS files into NDFs
Up: Specifications of CONVERT Applications
Previous: DA2NDF - Converts a direct-access unformatted file to an NDF


DST2NDF - Converts a Figaro (Version 2) DST file to an NDF

Description:
This application converts a FIGARO Version-2 DST file to a Version-3 file, i.e. to an NDF. The rules for converting the various components of a DST are listed in the "Notes". Since both are hierarchical formats most files can be be converted with little or no information lost.

Usage:
dst2ndf in out

Parameters:

FORM = LITERAL (Read)
The storage form of the NDF's data and variance arrays. FORM = "Simple" gives the simple form, where the array of data and variance values is located in an ARRAY structure. Here it can have ancillary data like the origin. This is the normal form for an NDF. FORM = "Primitive" offers compatibility with earlier formats, such as IMAGE. In the primitive form the data and variance arrays are primitive components at the top level of the NDF structure, and hence it cannot have ancillary information. ["Simple"]
IN = Figaro file (Read)
The file name of the version 2 file. A file extension must not be given after the name, since ".dst" is appended by the application. The file name is limited to 80 characters.
OUT = NDF (Write)
The file name of the output NDF file. A file extension must not be given after the name, since ".sdf" is appended by the application. Since the NDF_ library is not used, a section definition may not be given following the name. The file name is limited to 80 characters.

Examples:

dst2ndf old new
This converts the Figaro file old.dst to the NDF called new (in file new.sdf). The NDF has the simple form.

dst2ndf horse horse p
This converts the Figaro file horse.dst to the NDF called horse (in file horse.sdf). The NDF has the primitive form.

Notes:
The rules for the conversion of the various components are as follows:

Figaro file   NDF Comments
.Z.DATA $\Rightarrow$ .DATA_ARRAY.DATA when FORM = "SIMPLE"
.Z.DATA $\Rightarrow$ .DATA_ARRAY when FORM = "PRIMITIVE"
.Z.ERRORS $\Rightarrow$ .VARIANCE.DATA after processing when FORM = "SIMPLE"
.Z.ERRORS $\Rightarrow$ .VARIANCE after processing when FORM = "PRIMITIVE"
.Z.QUALITY $\Rightarrow$ .QUALITY.QUALITY must be BYTE array (see Bad-pixel handling below)
  $\Rightarrow$ .QUALITY.BADBITS = 255  
.Z.LABEL $\Rightarrow$ .LABEL  
.Z.UNITS $\Rightarrow$ .UNITS  
.Z.IMAGINARY $\Rightarrow$ .DATA_ARRAY.IMAGINARY_DATA  
.Z.MAGFLAG $\Rightarrow$ .MORE.FIGARO.MAGFLAG  
.Z.RANGE $\Rightarrow$ .MORE.FIGARO.RANGE  
.Z.xxxx $\Rightarrow$ .MORE.FIGARO.Z.xxxx  
       
.X.DATA $\Rightarrow$ .AXIS(1).DATA_ARRAY  
.X.ERRORS $\Rightarrow$ .AXIS(1).VARIANCE after processing
.X.WIDTH $\Rightarrow$ .AXIS(1).WIDTH  
.X.LABEL $\Rightarrow$ .AXIS(1).LABEL  
.X.UNITS $\Rightarrow$ .AXIS(1).UNITS  
.X.LOG $\Rightarrow$ .AXIS(1).MORE.FIGARO.LOG  
.X.xxxx $\Rightarrow$ .AXIS(1).MORE.FIGARO.xxxx  
      (Similarly for .Y .T .U .V or .W structures which are renamed to AXIS(2), ..., AXIS(6) in the NDF.)
       
.OBS.OBJECT $\Rightarrow$ .TITLE  
.OBS.SECZ $\Rightarrow$ .MORE.FIGARO.SECZ  
.OBS.TIME $\Rightarrow$ .MORE.FIGARO.TIME  
.OBS.xxxx $\Rightarrow$ .MORE.FIGARO.OBS.xxxx  
       
.FITS.xxxx $\Rightarrow$ .MORE.FITS.xxxx into value part of the string
.COMMENTS.xxxx $\Rightarrow$ .MORE.FITS(n) into comment part of the string
.FITS.xxxx.DATA $\Rightarrow$ .MORE.FITS(n) into value part of the string
.FITS.xxxx.DESCRIPTION $\Rightarrow$ .MORE.FITS(n) into comment part of the string
.FITS.xxxx.yyyy $\Rightarrow$ .MORE.FITS(n) into blank-keyword comment containing yyyy=value
.MORE.xxxx $\Rightarrow$ .MORE.xxxx  
       
.TABLE $\Rightarrow$ .MORE.FIGARO.TABLE  
.xxxx $\Rightarrow$ .MORE.FIGARO.xxxx  

Axis arrays with dimensionality greater than one are not supported by the NDF. Therefore, if the application encounters such an axis array, it processes the array using the following rules, rather than those given above.

Figaro file   NDF Comments
.X.DATA $\Rightarrow$ .AXIS(1).MORE.FIGARO.DATA_ARRAY AXIS(1).DATA_ARRAY is filled with pixel co-ordinates
.X.ERRORS $\Rightarrow$ .AXIS(1).MORE.FIGARO.VARIANCE after processing
.X.WIDTH $\Rightarrow$ .AXIS(1).MORE.FIGARO.WIDTH  

In addition to creating a blank-keyword NDF FITS-extension header for each component of a non-standard DST FITS structure (.FITS.xxxx.yyyy where yyyy is not DATA or DESCRIPTION), this set of related headers are bracketed by blank lines and a comment containing the name of the structure (i.e. xxxx).


Related Applications :
CONVERT: NDF2DST.

Bad-pixel handling :
The QUALITY array is only copied if the bad-pixel flag (.Z.FLAGGED) is FALSE or absent. A simple NDF with the bad-pixel flag set to FALSE (meaning that there are no bad-pixels present) is created when .Z.FLAGGED is absent or false and FORM = "SIMPLE".

Implementation Status:
The maximum number of dimensions is 6.



next up previous 399
Next: FITS2NDF - Converts FITS files into NDFs
Up: Specifications of CONVERT Applications
Previous: DA2NDF - Converts a direct-access unformatted file to an NDF

CONVERT A Format-conversion Package
Starlink User Note 55
Malcolm J. Currie
G.J.Privett
A.J.Chipperfield
D.S.Berry
A.C.Davenhall
2012 May 1
E-mail:starlink@jiscmail.ac.uk

Copyright © 2005 Council for the Central Laboratory of the Research Councils