readfits

sofia_redux.instruments.flitecam.readfits.readfits(filename)[source]

Return the data array from the input file.

Reads a specified raw FLITECAM FITS file and returns a new HDUList with the flux image in the primary extension with EXTNAME = FLUX.

Raw FLITECAM data frequently has problems with WCS definition. This algorithm attempts to correct the most common WCS problems and return standardized WCS definition. However, some raw files may be unfixable; in that case, an error is raised and the file must be manually fixed before proceeding.

Parameters:
filenamestr

File path of the file to be read.

Returns:
astropy.io.fits.HDUList

Output HDUList.

Raises:
ValueError

If the FITS header is unreadable.