[AstroPy] fits coordinate system keyword

Paul Kuin npkuin at gmail.com
Mon Oct 12 15:14:31 EDT 2015


Hello all,

I tried the suggestion from Tom, using the 'fix = False' parameter, but
that did not work. Now I'm in the middle of major updates, so perhaps it is
something that was fixed later (i'm now at Astropy 1.0.5).

However, I believe the correct thing is to use the 'relax=True' parameter
option for this. The reason is that it is now clear that before the 2002
WCS FITS standard was adopted, informal standards using 'RADECSYS' were
already used, for example, by HEASARC.  So it is not really a failure to
follow the standards, rather the standard is new.

Bill Pence, for the FITS Support Office at GSFC, said:

"The 8 character RADECSYS keyword appeared in early drafts of the WCS I &
II papers on the late 1990s, but by the time the papers were officially
approved as part of the FITS Standard in 2002, the name had been changed to
the 7-letter RADESYS.  Thus, the 8-character form was never officially
sanctioned, although it was still widely used at the time.

My personal opinion is that an if an observatory is still generating FITS
files with the old RADECSYS keyword name, then this should be considered
bad practice and the files should be flagged with a warning.    However, if
software encounters the RADECSYS keyword in files that were created before
about 2005 or so, then I would consider that OK."

I'm not going along with that, as I believe that the 'relax' option in the
WCS module in Astropy is just fit for purpose.

However, I also agree with Bill that there should be a warning for newly
minted FITS files. I.e., a 'writeto' should trigger a WARNING when 'verify'
is on.

So that's where the issue stands right now. I wonder if you all support
this now, or not.

Cheers,

    Paul

On Tue, Oct 6, 2015 at 1:15 PM, Thomas Robitaille <
thomas.robitaille at gmail.com> wrote:

> Hi Paul,
>
> As far as I'm aware, the error shouldn't be happening when you open
> the file, but when you pass the header to the WCS class from
> astropy.wcs. I think you can get rid of the warnings by simply doing
>
> wcs = WCS(header, fix=False)
>
> See
> http://docs.astropy.org/en/stable/api/astropy.wcs.WCS.html#astropy.wcs.WCS
>
> Cheers,
> Tom
>
> On 6 October 2015 at 09:15, Paul Kuin <npkuin at gmail.com> wrote:
> > It seems that WCS RADECSYS was not dropped then; it just ended up in the
> > standard in a different way. Probably to preserve backward compatibility
> to
> > old FITS files. It did throw me off, with just one letter difference!  I
> > think there must be some  old software that is still being used to create
> > fits files that do use RADECSYS.   I was using it (not bothering to check
> > the standard all the time, - yes bad!) and I suspect that Swift UVOT
> > software uses it (which is built on the HEASARC FTOOLS - so that might
> use
> > it also).  I'll bring it up in the UVOT group, but with the kind of very
> > limited software support that is left after 10 years of Swift mission, it
> > might not be possible to make the changes.
> >
> > To get back to my original issue. I think this means the WCS keywords
> are a
> > historical set that is still supported, but non-standard.  I also think
> that
> > getting a warning each time a file is opened is wrong.
> >
> > In my software I'd like to disable that warning.  I guess I'll need to
> have
> > a good look at the error handling in Astropy as I have somewhere another
> > warning pop up with loads of verbage, opening an ascii file. It actually
> > worked, just is very loud.   I hope there is a way to get a different
> > response for errors and warnings  to be used during testing and actual
> use.
> >
> > Thanks again for all the responses.
> >
> >    Paul Kuin
> >
> >
> >
> > On Mon, Oct 5, 2015 at 11:03 PM, Tim Jenness <tim.jenness at gmail.com>
> wrote:
> >>
> >> RADECSYS is a very common historic header that was used before support
> was
> >> added for multiple WCS definitions in a single header. I think it was
> >> dropped before the official paper II standard was published was was
> part of
> >> the initial draft:
> >>
> >> See e.g. http://www.adass.org/adass/proceedings/adass99/P1-29/
> >>
> >> --
> >> Tim Jenness
> >>
> >> On Mon, Oct 5, 2015 at 2:47 PM, Paul Kuin <npkuin at gmail.com> wrote:
> >>>
> >>> That is so. You're absolutely right!  I'm so sorry! I did not catch
> that
> >>> one.
> >>>
> >>> That is probably an error that sneeked into the FITS headers from
> Swift.
> >>> Perhaps its a Heasarc thing, but somehow I think its a bug.
> >>>
> >>> Thank you all for  helping with this.
> >>>
> >>> Paul
> >>>
> >>> On Mon, Oct 5, 2015 at 10:17 PM, Thomas Robitaille
> >>> <thomas.robitaille at gmail.com> wrote:
> >>>>
> >>>> I think there is a misunderstanding:
> >>>>
> >>>> RADECSYS is not valid
> >>>>
> >>>> RADESYS is valid
> >>>>
> >>>> (note the extra C). We are not debating that RADESYS is valid - it is
> -
> >>>> but the warning concerns the common mis-spelling of RADE*C*SYS. Does
> >>>> this make sense?
> >>>>
> >>>> Cheers,
> >>>> Tom
> >>>>
> >>>> Paul Kuin wrote:
> >>>> > In the WCS II standard paper ( M. R. Calabretta and E. W. Greisen:
> >>>> > Representations of celestial coordinates in FITS
> >>>> > http://www.aanda.org/articles/aa/pdf/2002/45/aah3860.pdf) on page
> 1079
> >>>> > the is a table defining some variables used. In particular 'a' is
> >>>> > alternate version code 'blank or [A-Z]. In table 2 on page 1082, the
> >>>> > definition is RADESYSa, meaning that valid versions are either
> >>>> > RADESYS,
> >>>> > RADESYSA, RADESYSB, ... , RADESYSZ.
> >>>> >
> >>>> > So it always was defined as a valid. Similar, EQUINOXa/. I've seen
> >>>> > that
> >>>> > mostly used as just EQUINOX. If the header has just one WCS block,
> or
> >>>> > a
> >>>> > preferred one, that is useful to have.
> >>>> >
> >>>> > Let's see what Bill Pence says. Maybe there were some changes after
> >>>> > all.
> >>>> >
> >>>> >
> >>>> >
> >>>> > On Mon, Oct 5, 2015 at 8:34 PM, Thomas Robitaille
> >>>> > <thomas.robitaille at gmail.com <mailto:thomas.robitaille at gmail.com>>
> >>>> > wrote:
> >>>> >
> >>>> >     Hi Paul,
> >>>> >
> >>>> >     Just out of curiosity, was RADECSYS ever a keyword in the FITS
> >>>> > standard,
> >>>> >     as opposed to RADESYS? (which is the currently valid keyword).
> If
> >>>> > so, in
> >>>> >     what version of the standard?
> >>>> >
> >>>> >     Cheers,
> >>>> >     Tom
> >>>> >
> >>>> >     Paul Kuin wrote:
> >>>> >     > Actually, one of the basic tenets of FITS is to be completely
> >>>> > backward
> >>>> >     > compatible, so any keyword that was valid in the past is valid
> >>>> > now. So
> >>>> >     > that warning is also inaccurate. If it was standard, it still
> >>>> > is, and
> >>>> >     > ever will be.
> >>>> >     >
> >>>> >     >
> >>>> >     >
> >>>> >     > On Mon, Oct 5, 2015 at 5:25 PM, Erik Bray <embray at stsci.edu
> >>>> >     <mailto:embray at stsci.edu>
> >>>> >     > <mailto:embray at stsci.edu <mailto:embray at stsci.edu>>> wrote:
> >>>> >     >
> >>>> >     >     On 10/05/2015 12:17 PM, Paul Kuin wrote:
> >>>> >     >
> >>>> >     >
> >>>> >     >
> >>>> >     >         I am getting very annoyed of the warning that keeps
> >>>> > popping up
> >>>> >     >
> >>>> >     >         WARNING: FITSFixedWarning: RADECSYS= 'FK5' / default
> >>>> >     >         RADECSYS is non-standard, use RADESYSa.
> >>>> > [astropy.wcs.wcs]
> >>>> >     >
> >>>> >     >         I'm not sure when the FITS standard changed, but MOST
> >>>> > legacy
> >>>> >     >         fits files (I use)
> >>>> >     >         will have the RADECSYS keyword. It works, and I do not
> >>>> > see why
> >>>> >     >         someone felt the
> >>>> >     >         need to keep this warning being popped up all the
> time.
> >>>> >     >
> >>>> >     >
> >>>> >     >     Probably as a warning to remind authors of new files that
> >>>> > they
> >>>> >     >     shouldn't be using that keyword.  I don't know that it
> >>>> > necessarily
> >>>> >     >     needs to be displayed every time reading in a WCS except
> >>>> > maybe to
> >>>> >     >     head off cases of ambiguity.  But I don't know this
> >>>> > particular
> >>>> >     issue
> >>>> >     >     well enough to be sure if the warning is appropriate in
> all
> >>>> >     cases or
> >>>> >     >     not.
> >>>> >     >
> >>>> >     >         I think that by default it should be off.
> >>>> >     >
> >>>> >     >         Since you all probably think it should be there, I
> would
> >>>> >     like to
> >>>> >     >         know how to
> >>>> >     >         turn it off ?  any suggestion on how to do that?
> >>>> >     >
> >>>> >     >
> >>>> >     >     http://docs.astropy.org/en/stable/warnings.html
> >>>> >     >
> >>>> >     >
> >>>> >     >     Erik
> >>>> >     >
> >>>> >     >     _______________________________________________
> >>>> >     >     AstroPy mailing list
> >>>> >     >     AstroPy at scipy.org <mailto:AstroPy at scipy.org>
> >>>> >     <mailto:AstroPy at scipy.org <mailto:AstroPy at scipy.org>>
> >>>> >     >     https://mail.scipy.org/mailman/listinfo/astropy
> >>>> >     >
> >>>> >     >
> >>>> >     >
> >>>> >     >
> >>>> >     > --
> >>>> >     >
> >>>> >     > * * * * * * * * http://www.mssl.ucl.ac.uk/~npmk/ * * * *
> >>>> >     > Dr. N.P.M. Kuin      (n.kuin at ucl.ac.uk <mailto:
> n.kuin at ucl.ac.uk>
> >>>> >     <mailto:n.kuin at ucl.ac.uk <mailto:n.kuin at ucl.ac.uk>>)
> >>>> >     > phone +44-(0)1483 (prefix) -204927 (work)
> >>>> >     > mobile +44(0)7806985366 <tel:%2B44%280%297806985366>  skype
> ID:
> >>>> > npkuin
> >>>> >     > Mullard Space Science Laboratory  – University College
> London  –
> >>>> >     > Holmbury St Mary – Dorking – Surrey RH5 6NT–  U.K.
> >>>> >     >
> >>>> >     > _______________________________________________
> >>>> >     > AstroPy mailing list
> >>>> >     > AstroPy at scipy.org <mailto:AstroPy at scipy.org>
> >>>> >     > https://mail.scipy.org/mailman/listinfo/astropy
> >>>> >     _______________________________________________
> >>>> >     AstroPy mailing list
> >>>> >     AstroPy at scipy.org <mailto:AstroPy at scipy.org>
> >>>> >     https://mail.scipy.org/mailman/listinfo/astropy
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> >
> >>>> > * * * * * * * * http://www.mssl.ucl.ac.uk/~npmk/ * * * *
> >>>> > Dr. N.P.M. Kuin      (n.kuin at ucl.ac.uk <mailto:n.kuin at ucl.ac.uk>)
> >>>> > phone +44-(0)1483 (prefix) -204927 (work)
> >>>> > mobile +44(0)7806985366  skype ID: npkuin
> >>>> > Mullard Space Science Laboratory  – University College London  –
> >>>> > Holmbury St Mary – Dorking – Surrey RH5 6NT–  U.K.
> >>>> >
> >>>> > _______________________________________________
> >>>> > AstroPy mailing list
> >>>> > AstroPy at scipy.org
> >>>> > https://mail.scipy.org/mailman/listinfo/astropy
> >>>> _______________________________________________
> >>>> AstroPy mailing list
> >>>> AstroPy at scipy.org
> >>>> https://mail.scipy.org/mailman/listinfo/astropy
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>>
> >>> * * * * * * * * http://www.mssl.ucl.ac.uk/~npmk/ * * * *
> >>> Dr. N.P.M. Kuin      (n.kuin at ucl.ac.uk)
> >>> phone +44-(0)1483 (prefix) -204927 (work)
> >>> mobile +44(0)7806985366  skype ID: npkuin
> >>> Mullard Space Science Laboratory  – University College London  –
> >>> Holmbury St Mary – Dorking – Surrey RH5 6NT–  U.K.
> >>>
> >>> _______________________________________________
> >>> AstroPy mailing list
> >>> AstroPy at scipy.org
> >>> https://mail.scipy.org/mailman/listinfo/astropy
> >>>
> >>
> >>
> >> _______________________________________________
> >> AstroPy mailing list
> >> AstroPy at scipy.org
> >> https://mail.scipy.org/mailman/listinfo/astropy
> >>
> >
> >
> >
> > --
> >
> > * * * * * * * * http://www.mssl.ucl.ac.uk/~npmk/ * * * *
> > Dr. N.P.M. Kuin      (n.kuin at ucl.ac.uk)
> > phone +44-(0)1483 (prefix) -204927 (work)
> > mobile +44(0)7806985366  skype ID: npkuin
> > Mullard Space Science Laboratory  – University College London  –
> > Holmbury St Mary – Dorking – Surrey RH5 6NT–  U.K.
> >
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy at scipy.org
> > https://mail.scipy.org/mailman/listinfo/astropy
> >
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy
>



-- 

* * * * * * * * http://www.mssl.ucl.ac.uk/~npmk/ * * * *
Dr. N.P.M. Kuin      (n.kuin at ucl.ac.uk)
phone +44-(0)1483 (prefix) -204927 (work)
mobile +44(0)7806985366  skype ID: npkuin
Mullard Space Science Laboratory  – University College London  –
Holmbury St Mary – Dorking – Surrey RH5 6NT–  U.K.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20151012/6661b469/attachment.html>


More information about the AstroPy mailing list