View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

dealing with non-standard FITS files.

rowe wrote on Dec 19, 2007

I have some CCD images that IRAF simply skips when trying to read. They all have this line at the top of the header:

SIMPLE = F / FITS Standard

From reading around the F seems to indicate that the file has some non-standard formating.

The FITS file can be displayed with DS9 just fine. Anyway to access this file within the IRAF environment?

Thanks,
Jason

Mike Fitzpatrick wrote on Dec 19, 2007

SIMPLE=F means, according to the FITS standard, that the file is NOT FITS standard. IRAF (both the FITS kernel and the RFITS task) check this field and simply punt if it isn't true, the CFITSIO code used in DS9 may be more lenient. In practice many files put SIMPLE=T even if they use non-standard conventions (e.g. the ESO HIERARCH keywords) and the tasks read them fine.

I think your options are to change the value, or look at something like the IMPORT task to read the image as a raw raster file. If the file really isn't conforming then changing the value may still be an error. What's the origin of these files?

-Mike

rowe wrote on Dec 19, 2007

I figured it'd be something involving an edit to the header.

The only way I've figured out how to do this is using the cfitsio routines. I read in the FITS file then write out a new FITS file with the SIMPLE=F changed to SIMPLE=T. It's not an elegant solution as it's heavy on disk io and I have about 400 GBs of images.

I just want to do some quick stats on the files with IRAF rather than having to write my own routines to do this. I'm guessing there's no easy way to make the software assume the F-type is the same as the T-type?

Thanks,
Jason

Mike Fitzpatrick wrote on Dec 19, 2007

I'm guessing there's no easy way to make the software assume the F-type is the same as the T-type?


Not unless you want to edit code and rebuild the system.

The good news is, you can use CFITSIO to rewrite the files and get your holiday shopping done while it processes the 400Gb of data. 8-)

Cheers,
-Mike[/quote]

Last post on Dec 19, 2007