LowerDimensionalObject¶
- class spectral_cube.lower_dimensional_structures.LowerDimensionalObject(value, unit=None, dtype=None, copy=True, order=None, subok=False, ndmin=0)[source]¶
Bases:
Quantity
,BaseNDClass
,HeaderMixinClass
Generic class for 1D and 2D objects.
Attributes Summary
Get a pure array representation of the LDO.
Get a pure
Quantity
representation of the LDO.Methods Summary
read
(*args, **kwargs)Copy of the numpy masked_array shrink_mask method.
to
(unit[, equivalencies, freq])Return a new
Projection
of the same class with the specified unit.Attributes Documentation
- array¶
Get a pure array representation of the LDO. Useful when multiplying and using numpy indexing tricks.
- hdu¶
- write = <spectral_cube.io.core.LowerDimensionalObjectWrite object>¶
Methods Documentation
- shrink_mask()[source]¶
Copy of the numpy masked_array shrink_mask method. This is essentially a hack needed for matplotlib to show images.
- to(unit, equivalencies=[], freq=None)[source]¶
Return a new
Projection
of the same class with the specified unit.See
astropy.units.Quantity.to
for further details.