scopesim.source.source_fields.TableSourceField#

class scopesim.source.source_fields.TableSourceField(field: ~astropy.table.table.Table, spectra: dict, *, meta: dict = <factory>)#

Bases: SpectrumSourceField

Source field with table of point source(s).

Added in version 0.9.0.

__init__(field: ~astropy.table.table.Table, spectra: dict, *, meta: dict = <factory>) None#

Methods

__init__(field, spectra, *[, meta])

from_arrays(x, y, ref, weight, spectra, **kwargs)

Construct source table from arrays for each column.

from_file(filename, spectra, **kwargs)

Load source table from file.

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

name

Name of the object (if set).

spectrum

Return single spectrum and ref if only one spectrum in spectra.

field

spectra

meta

classmethod from_arrays(x, y, ref, weight, spectra: dict[int, SourceSpectrum], **kwargs)#

Construct source table from arrays for each column.

classmethod from_file(filename: Path | str, spectra: dict[int, SourceSpectrum], **kwargs)#

Load source table from file.

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

Calculate and return footprint corner points in unit.

property name: str#

Name of the object (if set).

plot(axes, color) None#

Plot source.

shift(dx, dy) None#

Shift source by dx, dy.

property spectrum: SourceSpectrum#

Return single spectrum and ref if only one spectrum in spectra.