LowerDimensionalObject

class spectral_cube.lower_dimensional_structures.LowerDimensionalObject[source]

Bases: astropy.units.Quantity, spectral_cube.base_class.BaseNDClass

Generic class for 1D and 2D objects.

Attributes Summary

array Get a pure array representation of the LDO.
hdu
header
quantity Get a pure Quantity representation of the LDO.

Methods Summary

to(unit[, equivalencies]) Return a new LowerDimensionalObject of the same class with the specified unit.
write(filename[, format, overwrite]) Write the lower dimensional object to a file.

Attributes Documentation

array

Get a pure array representation of the LDO. Useful when multiplying and using numpy indexing tricks.

hdu
header
quantity

Get a pure Quantity representation of the LDO.

Methods Documentation

to(unit, equivalencies=[])[source]

Return a new LowerDimensionalObject of the same class with the specified unit.

See astropy.units.Quantity.to for further details.

write(filename, format=None, overwrite=False)[source]

Write the lower dimensional object to a file.

Parameters:

filename : str

The path to write the file to

format : str

The kind of file to write. (Currently limited to ‘fits’)

overwrite : bool

If True, overwrite filename if it exists