ftsdata.SingleSidedOpdData
- class ftsdata.SingleSidedOpdData(*args, hits=<object object>, **kwargs)[source]
Class to handle OPD cube of FTS cubes.
This is the shared base class for interferogram cubes. Three geometry-specific subclasses implement the actual inversion:
DoubleSidedOpdDatafor a symmetric OPD axis with the ZPD centred;OneSidedOpdDatafor positive OPDs with the ZPD at the start;SingleSidedOpdDatafor asymmetric OPD axes.
from_array()and the FITS/HDF5 readers dispatch to the appropriate subclass automatically when called on the base class. When the OPD geometry is unknown, useOpdData(an alias of this class) as the generic entry point.- Parameters:
- data
ndarrayorFTSData The actual data contained in this
FTSDataobject. Not that this will always be copies by reference , so you should make copy thedatabefore passing it in if that’s the desired behavior.- uncertainty
NDUncertainty, optional Uncertainties on the data.data.wcs.world_axis_physical_types
- mask
ndarray-like, optional Mask for the data, given as a boolean Numpy array or any object that can be converted to a boolean Numpy array with a shape matching that of the data. The values must be
Falsewhere the data is valid andTruewhen it is not (like Numpy masked arrays). Ifdatais a numpy masked array, providingmaskhere will causes the mask from the masked array to be ignored.- hits
ndarray-like, optional Hit map for the data, given as a int Numpy array or any object that can be converted to a int Numpy array with a shape matching that of the data.
- flags
ndarray-like orFlagCollection, optional Flags giving information about each pixel. These can be specified either as a Numpy array of any type (or an object which can be converted to a Numpy array) with a shape matching that of the data, or as a
FlagCollectioninstance which has a shape matching that of the data.- wcs
WCS, optional WCS-object containing the world coordinate system for the data.
- meta
dict-like object, optional Metadata for this object. “Metadata” here means all information that is included with this object but not part of any other attribute of this particular object. e.g., creation date, unique identifier, simulation parameters, exposure time, telescope name, etc.
- unit
UnitBaseinstance or str, optional The units of the data.
- data
- __init__(*args, hits=<object object>, **kwargs)
Methods
__init__(*args[, hits])add(operand[, operand2])Performs addition by evaluating
self+operand.convert_unit_to(unit[, equivalencies])Returns a new
NDDataobject whose values have been converted to a new unit.divide(operand[, operand2])Performs division by evaluating
self/operand.from_array(opd, data[, hits, mask])Construct FTS data from arrays.
get_axis_from_repr(plane)Retrieve data axis from representation
max(**kwargs)mean(**kwargs)min(**kwargs)mip([axes, level, attr])Return a 'Multum In Parvo' of a given level on the data along given axes.
multiply(operand[, operand2])Performs multiplication by evaluating
self*operand.opd_trim([fraction])subtract(operand[, operand2])Performs subtraction by evaluating
self-operand.sum(**kwargs)to_dset([dset_mask, dset_uncertainty, ...])Create the IDIA HDF5 datasets and attributes from a FTSData object.
to_hdu([hdu_data, hdu_mask, ...])Creates an HDUList object from a FTSData object.
to_spectra([apodization, output_shape, ...])Invert an interferograms cube using the (enhanced) Forman method.
Attributes
datandarray-like : The stored dataset.dtypenumpy.dtypeof this object's data.flagshitsndarra : Hits in the dataset, if any.
maskany type : Mask for the dataset, if any.
metanaxis_opdndiminteger dimensions of this object's data.
opd_axisopd_wcspsfImage representation of the PSF for the dataset.
readshapeshape tuple of this object's data.
sizeinteger size of this object's data.
uncertaintyany type : Uncertainty in the dataset, if any.
unitUnit: Unit for the dataset, if any.wcsany type : A world coordinate system (WCS) for the dataset, if any.
weightsReturn the weights as inverse variance regardless of the uncertainty type
write