cfitsio - not opening FITS file
Bruce O'Neel
oneel at arupa.gsfc.nasa.gov
Tue Nov 26 14:32:47 EST 1996
>
> I am attempting to use cfitsio to read FITS images and convert them to
>our in-house image format for processing. I have coded and compiled a
>program which opens a FITS file and then reads its image data. I am
>running into trouble as soon as I attempt to open the FITS file (which
>has correct permissions set). The status returned by the
>fits_open_file() routine is indecipherable ( status == 260934144 ) and
>produces no error message on the error message stack, so I'm clueless as
>to where the problem lies.
>
> I am running on an SGI, IRIX 5.3. I am compiling using SGI's native
>C++ compiler (is the problem that I am using these routines with C++
>instead of plain C ?)
>
Hi,
Clive Page is correct. Try changing your code to
//---------------------------------------------------------------------
Boolean
nrifFrame::readFromFITSFile (const char *fits_name)
{
// local variables
fitsfile *fptr;
int status = 0;
// ^^^
// That was the change
// open the FITS file
if (fits_open_file (&fptr,
fits_name,
READONLY,
&status))
{
return Error ("Unable to open FITS file");
}
........
//---------------------------------------------------------------------
should fix your problem.
Bruce
Aspiring to be the junior vice president of water cooler refilling
[partially from Dan Meriwether]
More information about the fitsbits
mailing list