fits_ccddata_reader

ccdproc.fits_ccddata_reader(filename, hdu=0, unit=None, hdu_uncertainty=u'UNCERT', hdu_mask=u'MASK', hdu_flags=None, **kwd)[source]

Generate a CCDData object from a FITS file.

Parameters:

filename : str

Name of fits file.

hdu : int, optional

FITS extension from which CCDData should be initialized. If zero and and no data in the primary extention, it will search for the first extension with data. The header will be added to the primary header.

unit : astropy.units.Unit, optional

Units of the image data. If this argument is provided and there is a unit for the image in the FITS header (the keyword BUNIT is used as the unit, if present), this argument is used for the unit.

hdu_uncertainty : str or None, optional

FITS extension from which the uncertainty should be initialized. If the extension does not exist the uncertainty of the CCDData is None. Default is 'UNCERT'.

hdu_mask : str or None, optional

FITS extension from which the mask should be initialized. If the extension does not exist the mask of the CCDData is None. Default is 'MASK'.

hdu_flags : str or None, optional

Currently not implemented. Default is None.

kwd :

Any additional keyword parameters are passed through to the FITS reader in astropy.io.fits; see Notes for additional discussion.

Notes

FITS files that contained scaled data (e.g. unsigned integer images) will be scaled and the keywords used to manage scaled data in astropy.io.fits are disabled.