Repository navigation
bug: astropy.wcs.WCS() constructor adds newline to CTYPE1? - #257
Conversation
|
This FITS file has 81-character-aligned header cards (with extra newlines at the end). |
…s are read fine by io.fits, but break with wcslib (which has a less lenient parser). Add a unit test for this case.
|
Huh, I don't see the newlines in the header when opening it with a text editor, or doing this: What can I use to see the newlines? |
|
Ah, good catch. It wasn't the file, but the way PyFITS formats the header when using |
|
@kbarbary: Can you confirm that this PR resolves your original issue? If so, I'll merge it. |
|
Yes, it fixed the original issue. ctype[0] no longer contains a newline: Unfortunately the |
|
Ok. I'll merge this. Please file another issue if you have problems regarding the |
bug: astropy.wcs.WCS() constructor adds newline to CTYPE1?
|
For info, this is causing a failure with Python 3 (see Jenkins) |
|
Thanks. Fixed directly on master. |
2 similar comments
|
Thanks. Fixed directly on master. |
|
Thanks. Fixed directly on master. |
…s are read fine by io.fits, but break with wcslib (which has a less lenient parser). Add a unit test for this case.
bug: astropy.wcs.WCS() constructor adds newline to CTYPE1?
Replaced copy2 with copy in build_ext
Added license
I have a FITS file with a header that looks fine, but for some reason, when the WCS() constructor is called, it appears to prepend a newline character to CTYPE1 upon construction. I can't tell if this is a problem with
astropy.wcsor with my file, but the behavior is extremely strange regardless. I had the same problem with pywcs-1.10, but the error messages were less helpful than they are with the current version.To reproduce: grab
http://supernova.lbl.gov/~kbarbary/tmp/PTF_200906253621_i_p_mask_t084123_u012052003_f02_p002899_c07.fits (17MB)
... The result is that the wcs object is not constructed correctly because it thought the projection code was "-TA" rather than "TAN".