[AstroPy] fits coordinate system keyword

Peter Weilbacher pweilbacher at aip.de
Mon Oct 12 15:37:40 EDT 2015


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



More information about the AstroPy mailing list