sourcefinder.accessors.fitsimageblob#
Attributes#
Classes#
A FITS image blob. Same as |
Module Contents#
- class sourcefinder.accessors.fitsimageblob.FitsImageBlob(hdulist, plane=None, beam=None, hdu_index=0)[source]#
Bases:
sourcefinder.accessors.fitsimage.FitsImageA FITS image blob. Same as
sourcefinder.accessors.fitsimage.FitsImagebut constructed from an in-memory FITS file, not a FITS file on disk.- Parameters:
- hdulistastropy.io.fits.HDUList
The HDU list representing the in-memory FITS file.
- planeint, default: None
If the data is a datacube, specifies which plane to use.
- beamtuple, default: None
Beam parameters in degrees, in the form (bmaj, bmin, bpa). If not supplied, the method will attempt to read these from the header.
- hdu_indexint, default: 0
The index of the HDU to use from the HDU list.
- _get_header(*args)[source]#
Retrieve the header from the specified HDU.
- Parameters:
- *argstuple
Positional arguments where:
args[0] is the HDU list (astropy.io.fits.HDUList).
args[1] is the index of the HDU to use.
- Returns:
- astropy.io.fits.Header
The header of the specified HDU.
- read_data(*args)[source]#
Read and process the data from the specified HDU.
- Parameters:
- *argstuple
Positional arguments where:
args[0] is the HDU list (astropy.io.fits.HDUList).
args[1] is the index of the HDU to use.
args[2] is the plane index (int) if the data is a datacube.
- Returns:
- numpy.ndarray
The processed 2D data array. Processing here means remove axes of length 1, select the plane index from the datacube if needed, and transpose.