View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

iraf fits images in matlab

Tom Duvall wrote on Apr 10, 2007

I have been having trouble reading fits files written from iraf in matlab.
I have been able to read fits files from two other sources (one is idl)
in matlab's general fitsread function. There is something in the header which
causes a problem. I guessed it might have to do with putting the 'end' card
at the end of the 2880-character block, but I padded out the header with dummy
variables and that did not help. I tried several images with no luck. The
error messages are not particularly enlightening. Have others had this
problem? Is there a solution?
Tom

Mike Fitzpatrick wrote on Apr 10, 2007

Tom,

If you posted the error message it might provide a clue, otherwise it sounds like a MATLAB forum question. You could see whether it makes a difference that the image was created with the FITS kernel (e.g. by appending a .fits to an output filename) or with the WFITS task. Either way the image should be compliant with the standard so the error may be in the FITS reader side of things.

-Mike

Tom Duvall wrote on Apr 10, 2007

An experienced user told me that a newer version of matlab should
have the problem fixed. I tried that and it worked.
The version that worked: Version 7.1.0.183 (R14) Service Pack 3
The one that did not: Version 6.5.1.199709 Release 13 (Service Pack 1)
Thanks for the suggestions.
Tom

Last post on Apr 10, 2007