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