[fitswcs] double, double, toil and trouble

Arnold Rots arots at head.cfa.harvard.edu
Wed Apr 8 15:40:48 EDT 2009


(The JPL ephemerides do the same.)
Yes, that is what we had originally in the draft, but the problem is
that one needs to know the precision (number of significant digits) of
the biggest of the two numbers.
If I combine 2450123.123456789 with 0.000000000012 it is anybody's
guess what precision I might end up with.
That's why we thought it would be prudent to explicitly specify how
the numbers should be interpreted.
But we are open to other suggestions.
The only thing that will not work, in case anyone was going to suggest
that, is using an integer and a double: they don't fit into a single
column.

  - Arnold

Patrick Wallace wrote:
> 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
> ____________________________________________________________________________
> 
> _______________________________________________
> fitswcs mailing list
> fitswcs at listmgr.cv.nrao.edu
> http://listmgr.cv.nrao.edu/mailman/listinfo/fitswcs
> 
--------------------------------------------------------------------------
Arnold H. Rots                                Chandra X-ray Science Center
Smithsonian Astrophysical Observatory                tel:  +1 617 496 7701
60 Garden Street, MS 67                              fax:  +1 617 495 7356
Cambridge, MA 02138                             arots at head.cfa.harvard.edu
USA                                     http://hea-www.harvard.edu/~arots/
--------------------------------------------------------------------------




More information about the fitswcs mailing list