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

array

Get a pure array representation of the LDO.

hdu

quantity

Get a pure Quantity representation of the LDO.

write

Methods Summary

read(*args, **kwargs)

shrink_mask()

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
quantity

Get a pure Quantity representation of the LDO.

write = <spectral_cube.io.core.LowerDimensionalObjectWrite object>

Methods Documentation

read(*args, **kwargs)[source]
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.