scopesim.source.source_fields.CubeSourceField#

class scopesim.source.source_fields.CubeSourceField(*args, **kwargs)#

Bases: HDUSourceField

Source field with 3D data cube.

Added in version 0.9.0.

__init__(field: ~astropy.io.fits.hdu.image.ImageHDU, from_hdul: bool = False, *, meta: dict = <factory>) None#

Methods

__init__(field[, from_hdul, meta])

from_hdulist(hdulist[, ext])

Load source cube from HDUL.

get_corners([unit])

Calculate and return footprint corner points in unit.

plot(axes, color)

Plot source.

shift(dx, dy)

Shift source by dx, dy.

Attributes

bunit

Extract BUNIT from header and parse into astropy Unit.

data

Shortcut for field.data.

from_hdul

header

Shortcut for field.header.

img_size

Shortcut for field.data.shape.

is_bunit_spatially_differential

Return True if BUNIT includes any "per solid angle" parts.

name

Name of the object (if set).

pixel_area

Area covered by one pixel in arcsec**2.

wave

Construct wavelength axis for cube in um.

waveset

Construct wavelength axis for cube in um.

wcs

field

meta

property bunit: Unit#

Extract BUNIT from header and parse into astropy Unit.

If the BUNIT keyword is not present in the header, this will return the dimensionless unit, which should result in consistent behavior.

Added in version 0.11.1.

property data: ndarray#

Shortcut for field.data.

classmethod from_hdulist(hdulist: HDUList, ext: int = 0, **kwargs)#

Load source cube from HDUL.

get_corners(unit: Unit | str = 'arcsec') ndarray#

Calculate and return footprint corner points in unit.

property header: Header#

Shortcut for field.header.

property img_size: str#

Shortcut for field.data.shape.

property is_bunit_spatially_differential: bool#

Return True if BUNIT includes any “per solid angle” parts.

Added in version 0.11.1.

property name: str#

Name of the object (if set).

property pixel_area: Annotated[Quantity, Unit('arcsec2')]#

Area covered by one pixel in arcsec**2.

Added in version 0.11.1.

plot(axes, color) None#

Plot source.

shift(dx, dy) None#

Shift source by dx, dy.

property wave: Quantity#

Construct wavelength axis for cube in um.

Deprecated since version 0.10.0: Use .waveset instead for consistency with other code.

property waveset: Quantity#

Construct wavelength axis for cube in um.