[AstroPy] AstroPy Digest, Vol 119, Issue 8

Frederic V. Hessman hessman at astro.physik.uni-goettingen.de
Thu Aug 18 02:44:49 EDT 2016


Thanks for all the suggestions!

From: Demitri Muna
> Not speaking as someone who wrote the software, but it wouldn't be an easy thing to do. The FITS format is extremely specific on a byte-to-byte basis, and trying to understand how a file is broken wouldn't be straightforward. I actually recommend such a program should not be part of astropy.io.fits but something standalone, but that's neither here nor there.

True, but in the real world one encounters this kind of problem, and astropy is for astronomers, not for computer scientists…

> Do you know what software wrote that file? I'd strongly argue that any FITS writer should not output invalid files in the first place. My guess is that it came from IDL, which as far as FITS writers go, is the wild west.

These were from CCDSoft, where one might have expected more checking, but English-speaking customers are unlikely to use umlauts, so ….

From: Derek Homeier
> 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.

I’d forgotten vi -b, obviously the solution of choice for a small number of images!

In the meanwhile, I fixed things using my ImageJ FitsJ class and a few lines of java (ugh!).  Would have been nicer to catch an astropy.io.fits.LazyFITSProgrammer exception.

Rick


More information about the AstroPy mailing list