Search code examples
imagesyntaxidl-programming-language

IDL READFITS() syntax error


I'm trying to use the READFITS() function on IDL 8.3 on Mac 10.9.3

My input on the IDL promt:

readfits('image.fits',h, /EXTEN, /SILENT)

Result:

readfits('image.fits',h, /EXTEN, /SILENT)
                          ^
% Syntax error.

*note: the '^' is below '/EXTEN'

Maybe it will help, so here is a link to the IDL help page on using READFITS() --> http://www.exelisvis.com/docs/readfits.html

I tried using the brackets like they show on that help page, but it still didn't work, so I'm stuck now. Didn't know if anyone here has experience reading .fits files in IDL.


Solution

  • ok, so it turns out the readfits procedure isn't included in IDL's original library, so I just had to download AstroLib (contains lots of useful astronomy procedures - including Readfits). The original syntax then worked.