EISCube
- class eispac.core.EISCube(*args, **kwargs)[source]
Bases:
NDCube
EIS Level-1 Data Cube
Subclass of NDCube. Accepts all of the standard arguments and keywords of
ndcube.NDCube
, as well as a few EIS specific parameters.- Parameters:
data (
numpy.ndarray
) – The array holding the actual data in this object.wcs (
astropy.wcs.WCS
, optional) – The WCS object containing the axes’ information, optional only ifdata
is anastropy.nddata.NDData
object.uncertainty (array_like, optional) – Uncertainty in the dataset. Ideally, it should have an attribute “uncertainty_type” that defines what kind of uncertainty is stored, for example “std” for standard deviation or “var” for variance. A metaclass defining such an interface is
NDUncertainty
, however it’s use in not mandatory. If the uncertainty has no type attribute, the uncertainty is stored as UnknownUncertainty. Defaults to None.mask (array_like, optional) – Mask for the dataset. Masks should follow the numpy convention that valid data points are marked by False and invalid ones with True. Defaults to None.
meta (dict-like object, optional) – Additional meta information about the dataset. If no meta is provided an empty collections.OrderedDict is created. Default is None.
unit (Unit-like or str, optional) – Unit for the dataset. Strings that can be converted to a Unit are allowed. Default is None.
copy (bool, optional) – Indicates whether to save the arguments as copy. True copies every attribute before saving it while False tries to save every parameter as reference. Note however that it is not always possible to save the input as reference. Default is False.
wavelength (
numpy.ndarray
, optional) – Numpy array with the corrected wavelength values for each location within the EIS raster. Must have the same dimensionality as the input data. If not given, will initialize the .wavelength property with an array of zeros.radcal (
numpy.ndarray
, optional) – Array of the radiometric calibration curve currently applied to the input data cube. Required if you wish to use the .apply_radcal() and .remove_radcal() methods
Attributes Summary
Current radiometric calibration curve
Corrected wavelength values observed by EIS
Methods Summary
apply_radcal
([input_radcal])Apply a radiometric calibration curve (user-inputted or preflight)
crop_by_coords
(*args, **kwargs)REMOVED in NDCube 2.0
Remove the applied radiometric calibration and convert data to counts
smooth_cube
([width])Smooth the data along one or more spatial axes.
sum_spectra
([wave_range, units])Sum the data along the spectral axis.
Attributes Documentation
- radcal
Current radiometric calibration curve
- wavelength
Corrected wavelength values observed by EIS
Methods Documentation
- apply_radcal(input_radcal=None)[source]
Apply a radiometric calibration curve (user-inputted or preflight)
- Parameters:
input_radcal (array_like, optional) – User-inputted radiometric calibration curve. If set to None, will use the preflight radcal curve from the .meta dict. Default is None
- Returns:
output_cube – A new EISCube class instance containing the calibrated data
- Return type:
EISCube
class instance
- remove_radcal()[source]
Remove the applied radiometric calibration and convert data to counts
- Returns:
output_cube – A new EISCube class instance containing the photon count data
- Return type:
EISCube
class instance
- smooth_cube(width=3, **kwargs)[source]
Smooth the data along one or more spatial axes.
- Parameters:
width (list or single value of ints, floats, or
Quantity
) – Number of pixels or angular distance to smooth over. If given a single value, only the y-axis will be smoothed. Floats and angular distances will be converted to the nearest whole pixel value. If a width value is even, width + 1 will be used instead. Default is width = 3**kwargs (keywords or dict) – Keyword arguments to be passed to the astropy.convolution.convolve() function.
- Returns:
output_cube – A new EISCube class instance containing the smoothed data
- Return type:
EISCube
class instance
- sum_spectra(wave_range=None, units=Unit('Angstrom'))[source]
Sum the data along the spectral axis.
- Parameters:
wave_range (list of ints, floats, or
Quantity
) – Wavelength range to sum over. Values can be input as either [min, max] or [center, half width]. Units can be specified using either Astropy units instances or by inputting a pair of ints or floats and then also using the “units” keyword. If wave_range is set to None, then entire spectra will be summed over. Default is None.units (str or
Quantity
) – Units to be used for the wavelength range if wave_range is given a list of ints or floats. Will be ignored if either wave_range is None or is given a list with Astropy units. Default is ‘Angstrom’.
- Returns:
output_cube – A new 2D
NDCube
class instance containing the summed data (NB: not a full EISCube!)- Return type:
NDCube
class instance