[AstroPy] fits coordinate system keyword

Paul Kuin npkuin at gmail.com
Mon Oct 12 15:47:03 EDT 2015


Hi Peter,

The problem is that I have a program to reduce Swift UVOT data,
specifically to reduce grism spectra. Each time a Swift data file wcs
header is read in with those 'old' keyword versions, Astropy.wcs issues a 2
line warning. I don't know if some people will get confused, but it is
plainly annoying.

Of course I can fix my code to have a work around. If we would do that for
every thing that is not right, we would have a job cut out for us. I'd
rather do astronomy. And then there is the issue of duplication. Would
everyone have to make this kind of hack because the main code cannot be
fixed ?

I know, we're getting into the philosophy of things. Looking for the Zen of
Astropy.

And with "happy 4th Birthday Astropy" I'd like to see it become more
perfect everyday!

  Cheers,

       Paul

On Mon, Oct 12, 2015 at 8:37 PM, Peter Weilbacher <pweilbacher at aip.de>
wrote:

> Hi Paul,
>
> I'm probably missing something in this discussion, but why don't you
> just rename the keyword from RADECSYS to RADESYS after reading in the
> header? I.e. before passing the header to the WCS module
>
>   file = fits.open(...)
>   file[0].header.rename_keyword('RADECSYS', 'RADESYS')
>   wcs = wcs.WCS(file[0].header)
>
> Then the changed and saved file (if you save it again...) will also
> match the current official FITS standard.
>
> Cheers,
>    Peter.
>
> On Mon, 12 Oct 2015, Paul Kuin wrote:
>
> > 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
>
> --
> Dr. Peter Weilbacher                http://www.aip.de/People/PWeilbacher
> Phone +49 331 74 99-667                       encryption key ID 7D6B4AA0
> ------------------------------------------------------------------------
> Leibniz-Institut für Astrophysik Potsdam (AIP)
> An der Sternwarte 16, D-14482 Potsdam
>
> Vorstand: Prof. Dr. Matthias Steinmetz, Matthias Winker
> Stiftung bürgerlichen Rechts, Stiftungsverz. Brandenburg: 26 742-00/7026
> _______________________________________________
> 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/0ca07e9d/attachment.html>


More information about the AstroPy mailing list