hera_sim.components.SimulationComponent¶
- class hera_sim.components.SimulationComponent(**kwargs)[source]¶
Base class for defining simulation component models.
- This class serves two main purposes:
Provide a simple interface for discovering simulation component models (see
list_discoverable_components()
).Ensure that each subclass can create abstract methods.
The
component()
: class decorator provides a simple way of accomplishing the above, while also providing some useful extra features.- Variables:
is_multiplicative (bool) – Specifies whether the model
cls
is a multiplicative effect. This parameter lets theSimulator
class determine how to apply the effect simulated bycls
. Default setting is False (i.e. the model is assumed to be additive unless specified otherwise).return_type (str | None) – Whether the returned result is per-antenna, per-baseline, or the full data array. This tells the
Simulator
how it should handle the returned result.attrs_to_pull (dict) – Dictionary mapping parameter names to
Simulator
attributes to be retrieved when setting up for simulation.
Methods
__call__
(**kwargs)Compute the component model.
Get all the aliases by which this model can be identified.
get_model
(mdl)Get a model with a particular name (including aliases).
get_models
([with_aliases])Get a dictionary of models associated with this component.
Attributes
Mapping between parameter names and Simulator attributes
Whether this systematic multiplies existing visibilities
Whether this systematic contains a randomized component
Whether the returned value is per-antenna, per-baseline, or the full array