Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.adass.org/adass/proceedings/adass00/P1-33/
Дата изменения: Tue May 29 19:50:05 2001 Дата индексирования: Tue Oct 2 05:44:03 2012 Кодировка: Поисковые слова: martian surface |
The FITS standard provides for the definition of n-dimensional images of data points, but in certain situations it can be extremely useful to have the ability to store an image in parameterized form, as an arbitrary function of parameters (coordinate axes). Just as one can extract a sub-image from a primary HDU or an image extension, one should be able to extract an n-dimensional sub-image of enumerated values from an extension containing such a parameterized image.
In cases where the parameterization is possible, this representation effects a huge savings in storage space. We have developed a convention that accommodates arbitrary function specifications using FITS binary tables. We have called it the FITS Embedded Function (FEF).
As an example, within the Chandra X-ray Center we have applied the FITS Embedded Function to the Chandra response matrix specification. As a result, a generic FEF image extractor will be able to construct response matrices using the FEF response matrix definition.
Function tables are identified by:
HDUCLASS= 'ASC ' HDUCLAS1= 'FUNCTION'
The function is defined by:
FUNCTION= '<expression>' FUNCNAME= '<name>'
The function expression may contain the arithmetic operators , , , , , and five types of operands or ``parameters:''
The assumption is that implementation of a FEF reader will include the following functionality.
typedef struct { char name[32] ; double min ; double max ; int num ; } FefParam ; FefParam parms[n] ; fits_file fef ; double* image = readFef (fef, n, parms) ;readFef returns an n-dimensional image where the lengths of the axes are set by parms[i].num, the names by parms[i].name, and the minimum and maximum by parms[i].min and parms[i].max, respectively. Each parms[i].name must correspond with an FTYPE value and the minimum and maximum values must not exceed the corresponding FLMIN and FLMAX values. n should be equal to FAXIS.
Extraneous columns are allowed. However, one should take care when filtering on such a column (or any other, for that matter), that such filtering can only be guaranteed to yield a valid FEF extension if all but one of the FTYPE variables contains more than one point. Even then, it will still require that all FAXIS i keywords are corrected.
The evaluation space of the function (or the image coordinates, if you like) is set by a set of ``pseudo coordinate axis'' keywords:
FLMIN and FLMAX are clearly needed for free-running variables to define the range over which the function is defined.
We shall assume that if function values are requested for values of enumerated variables that fall between the enumerated grip points, the values of all enumerated columns will be interpolated linearly. It is important to note that the parameter values are interpolated, not the function values.
If the values of an entire row are to be held constant for a range of values of an enumerated variable, one may specify bins by using a FTYPE_LO and FTYPE_HI column.
In some cases (sparse images, e.g., response matrices) it is desirable to limit the domain of a free running variable depending on the values of the enumerated variables. This may be done by incorporating two columns for FDMIN i and FDMAX i.
The FUNCTION definition is an arithmetic expression in which the operands may be the values of any of the following: FTYPE n, DTYPE n, TTYPE n, VTYPE n, and WTYPE n, with operators , , , , , and parentheses allowed, as in:
FUNCTION= 'Norm - Scale * (X2 + Y2)' FUNCNAME= 'HRMA_EffArea' BUNIT = 'mm**2 '
Virtual function columns (VTYPE i) are defined through functions:
VFUNCi = 'G(P1, P2, P3, ...; C)'where is chosen from a defined set of function names and where may be the value of any valid operand--one of the following: FTYPE n, DTYPE n, a constant number, TTYPE n, VTYPE n, or WTYPE n. is the name of a parameter object or a coefficient object that is specific to the function and whose attributes need to be specified as ; not all functions require a parameter object. For each parameter object attribute there has to be one TTYPE, DTYPE, VTYPE, or WTYPE that carries its name as value. VFIELDS specifies the number of VTYPEs that are defined.
Note that allowing VTYPEs and WTYPEs to be used in the definition of VTYPEs provides for the specification of nested functions. This is a powerful capability that requires particular care to prevent recursion.
In general, arithmetic virtual columns (WTYPE i) are defined as:
WFUNCi = 'P1 ^ P2 ^ ...'Where ``^ '' denotes an arithmetic operator , , , , , and parentheses are allowed. may be the value of any of the following: FTYPE n, DTYPE n, a constant number, TTYPE n, VTYPE n, or WTYPE n. WFIELDS specifies the number of WTYPEs that are defined.
This project is supported by the Chandra X-ray Center under NASA contract NAS8-39073.