[AstroPy] Fixing broken FITS headers

Xavier Gnata xavier.gnata at gmail.com
Thu Aug 18 18:18:45 EDT 2016


>
> On Aug 17, 2016, at 10:50 AM, Derek Homeier <derek at astro.physik.uni-goettingen.de> wrote:
>
>> If it is not a large number of files, you might simply edit the headers with ‘vi -b’ and, as Demitri
>> noted, make sure to replace each umlaut with two ASCII chars.
>
> Nice tip! If you resize your terminal window to display 80 characters in width it will be pretty obvious what kind of padding is needed.
>
> Demitri


I faced the same issue some months ago and I fixed it with a small 
python *script*. I found it already pretty disgusting.
Using an editor to fix our data is against most of the best practices 
when it comes to data handling.
fitsio with pyhon3 is *broken*. It use to be ok with python2.7.
Ok, these files are not following the standard. However, io.fits was 
able to open them without a warning with python2.7. That's bad but 
that's to late to change that. A fair amount of data has been produced 
that way. We need to be able to read then again with up to date means.
It does work anymore with python3 (8 years after the first python3 
release). That's not what one can expect from an io lib and from such a 
widely used scientific data format.
I hope it will  be fixed asap.

Xavier



More information about the AstroPy mailing list