scopesim_targets.point_source.PointSourceTarget#
- class scopesim_targets.point_source.PointSourceTarget(position: SkyCoord | tuple[float, float] | Mapping[str, float | Quantity] | None = None, spectrum: SourceSpectrum | SpectralType | str | None = None, brightness: Any | None = None)#
Bases:
SpectrumTargetBase class for Point Source Targets.
- __init__(position: SkyCoord | tuple[float, float] | Mapping[str, float | Quantity] | None = None, spectrum: SourceSpectrum | SpectralType | str | None = None, brightness: Any | None = None) None#
Methods
__init__([position, spectrum, brightness])redshift_spectrum(spectrum, position)Doppler shift spectrum based on position z or v_rad.
resolve_position([parent_position])Resolve target position or offset.
resolve_spectrum(spectrum[, brightness])Create SpeXtrum instance from spectrum identifier.
source_spectra([start])Create spectra dict for Source conversion.
Convert to ScopeSim Source object.
to_table([local_frame])Convert to table for Source conversion.
Attributes
Target brightness information.
Target offset from parent.
Target position (center) as SkyCoord.
Target spectral information.
- property brightness: Brightness#
Target brightness information.
- property offset: dict#
Target offset from parent.
- property position: SkyCoord#
Target position (center) as SkyCoord.
- static redshift_spectrum(spectrum: Spextrum, position: SkyCoord) Spextrum#
Doppler shift spectrum based on position z or v_rad.
- resolve_position(parent_position: SkyCoord | None = None)#
Resolve target position or offset.
This uses the following lookup order: 1. self.position set? -> use that 2. parent position present?
self.offset set? -> resolve offset to parent position
otherwise use parent position
self.offset set, but no parent position present -> Error
default to (0, 0)
- Parameters:
parent_position (SkyCoord | None, optional) – Position of any parent target. If None (the default), self.offset must not be set.
- Raises:
ValueError – Raised if self.offset set, but parent_position is None.
- Returns:
position – Resolved position as SkyCoord object.
- Return type:
SkyCoord
- static resolve_spectrum(spectrum: SourceSpectrum | SpectralType | str, brightness: Brightness | None = None) SourceSpectrum#
Create SpeXtrum instance from spectrum identifier.
Can resolve a
SpectralTypeinstance (next-closest available template spectrum) or a string that is a valid entry in the SpeXtrum database.Todo
Actually implement this “next-closest available template”, see #68.
- Return type:
Spextrum
- source_spectra(start: int = 0) dict[int, SourceSpectrum]#
Create spectra dict for Source conversion.
- property spectrum: SourceSpectrum | SpectralType | str#
Target spectral information.
- to_source() Source#
Convert to ScopeSim Source object.
- to_table(local_frame=None) Table#
Convert to table for Source conversion.