[fitswcs] double, double, toil and trouble
Patrick Wallace
ptw at star.rl.ac.uk
Wed Apr 8 15:09:17 EDT 2009
On Wed, 8 Apr 2009, Arnold Rots wrote:
> We'll make it clear that, if one wants a floating point solution and
> doubles don't provide the required precision, one may use the doublet
> of doubles; and if one does, this is the way to use them.
> That probably requires a few sentences on alternative solutions, like
> the ones you mention.
I'm not sure this is useful, but there is a convention in SOFA
(http://www.iau-sofa.rl.ac.uk/) that all times are two doubles, that the
time you mean is just the sum of the two and that it is up to you how
you use it. For any given application there will be a way that
preserves the most precision, but it is left to the user to decide what
amount of trouble to go to. This sort of thing:
* 1) The TT date DATE1+DATE2 is a Julian Date, apportioned in any
* convenient way between the two arguments. For example,
* JD(TT)=2450123.7 could be expressed in any of these ways,
* among others:
*
* DATE1 DATE2
*
* 2450123.7D0 0D0 (JD method)
* 2451545D0 -1421.3D0 (J2000 method)
* 2400000.5D0 50123.2D0 (MJD method)
* 2450123.5D0 0.2D0 (date & time method)
*
* The JD method is the most natural and convenient to use in
* cases where the loss of several decimal digits of resolution
* is acceptable. The J2000 method is best matched to the way
* the argument is handled internally and will deliver the
* optimum resolution. The MJD method and the date & time methods
* are both good compromises between resolution and convenience.
I would prefer to see this freedom in FITS than only integer+fraction
being allowed.
I should add that of course the SOFA function doesn't just add the two
parts together. It almost always wants to start by subtracting J2000,
and will do this by (for example) subtracting 2451545 from the first
number and only then adding the second number.
Patrick Wallace
____________________________________________________________________________
Space Science & Technology Department +44-1235-445372 tel
STFC / Rutherford Appleton Laboratory +44-1235-446362 fax
Harwell Science and Innovation Campus ptw at star.rl.ac.uk
Didcot, Oxfordshire, OX11 0QX, United Kingdom patrick.wallace at stfc.ac.uk
____________________________________________________________________________
More information about the fitswcs
mailing list