scopesim_targets.cluster.Cluster#

class scopesim_targets.cluster.Cluster(position: SkyCoord | tuple[float, float] | Mapping[str, float | Quantity], population: Population, morphology: Morphology)#

Bases: Target

__init__(position: SkyCoord | tuple[float, float] | Mapping[str, float | Quantity], population: Population, morphology: Morphology) None#

Methods

__init__(position, population, morphology)

resolve_position([parent_position])

Resolve target position or offset.

to_source()

Convert to ScopeSim Source object.

Attributes

offset

Target offset from parent.

position

Target position (center) as SkyCoord.

property offset: dict#

Target offset from parent.

property position: SkyCoord#

Target position (center) as SkyCoord.

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?

  1. self.offset set? -> resolve offset to parent position

  2. otherwise use parent position

  1. self.offset set, but no parent position present -> Error

  2. 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

abstractmethod to_source() Source#

Convert to ScopeSim Source object.