ftsdata.fits_ftsdata_reader
- ftsdata.fits_ftsdata_reader(filename, hdu=0, unit=None, hdu_mask='MASK', hdu_uncertainty='UNCERT', hdu_hits='HITS', hdu_flags=None, key_uncertainty_type='UTYPE', cls=None, **kwd)[source]
Generate a FTS Data object from a FITS file.
- Parameters:
- filenamestr
Name of fits file.
- hduint, str, tuple of (str, int), optional
Index or other identifier of the Header Data Unit of the FITS file from which FTSData should be initialized. If zero and no data in the primary HDU, it will search for the first extension HDU with data. The header will be added to the primary HDU. Default is
0.- unit
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
BUNITis used as the unit, if present), this argument is used for the unit. Default isNone.- hdu_uncertaintystr 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_maskstr 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_flagsstr or None, optional
Currently not implemented. Default is
None.- key_uncertainty_typestr, optional
The header key name where the class name of the uncertainty is stored in the hdu of the uncertainty (if any). Default is
UTYPE.- 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.fitsare disabled.