[fitswcs] coordinates by table lookup

William Pence pence at tetra.gsfc.nasa.gov
Thu Apr 11 12:39:05 EDT 2002


Eric Greisen wrote:
> 
> It has been suggested that table lookup will be needed to determine
> coordinates on some axes.  
...
> The two methods are described in:
> 
>          http://www.aoc.nrao.edu/~egreisen/table_033102.ps.gz
>          http://www.aoc.nrao.edu/~egreisen/table_033102.ps
>
> and I would appreciate comments to select one (only) of the two
> methods and to determine whether the table lookup is sufficiently
> advanced to put it in Paper I (it is for any kind of coordinate) or
> whether it will be relegated to Paper III (spectroscopy and times will
> be the most common usages).

My preference would be to put it in Paper III, and not make Paper I any more
complicated.  I have no strong preference between the 2 suggested methods,
but have a few comments on Method 1:

> I use column number rather than name in the first method
> since it explicitly requires row number anyway, so there is no point
> in using names to try to protect against table manipulation.

Even in this case, I think it is preferable to always refer to columns by
name rather than number (it's more 'object oriented').

One could make method 1 impervious to changes in row order in a couple ways:

1) require that the table only contain a single row (but then there is
little reason to use Method 1 instead of Method 2).

2) if there are more than 1 row, require that there be a 3rd column in the
table that provides an index to the look up table in the other column(s). 
The PVi_3 parameter would then give the value to look for in this index
column, rather than the actual row number.  You would then also need a PVi_4
parameter to give the name of this index column.  For example, each row of
the table might give the spectral wavelength look up table that is
appropriate for different ambient temperatures, and the 3rd column would
then list the temperature that that row is valid for.  The PVi_3 parameter
would give the temperature value appropriate for that particular image,
which would be used to look up which row of the table to use to calculate
the WCS values.

Bill Pence
-- 
____________________________________________________________________
Dr. William Pence                          pence at tetra.gsfc.nasa.gov
NASA/GSFC Code 662         HEASARC         +1-301-286-4599 (voice)     
Greenbelt MD 20771                         +1-301-286-1684 (fax)



More information about the fitswcs mailing list