ska_tmc_cspsubarrayleafnode.delay_model package

Submodules

ska_tmc_cspsubarrayleafnode.delay_model module

DelayManager class for delay calculation in SKA Mid and SKA Low.

class ska_tmc_cspsubarrayleafnode.delay_model.AntennaParams

Bases: object

Antenna parameters class.

class ska_tmc_cspsubarrayleafnode.delay_model.DelayManager(csp_sln_cm: CspSLNComponentManagerLow | CspSLNComponentManagerMid, telmodel_source: str, telmodel_path: str, delay_model_time_in_advance: int, delay_cadence: int, logger: logging.Logger | None)

Bases: object

The class that includes common methods required for delay calculation in SKA Mid and SKA Low.

calculate_delay_model() None

Calculates the delay model using KatPoint library.

Raises:

NotImplementedError – If the method is not implemented by the respective delay manager class.

clear_next_polynomial_time()

This method resets the value of next polynomial time after configure command End or Aborted

create_antenna_objects(antenna_params: AntennaParams) NotImplementedError

Creates KatPoint Antenna objects from antenna parameters.

Parameters:

antenna_params (dict) – Dictionary containing antenna parameters.

Raises:

NotImplementedError – If the method is not implemented by the respective delay manager class.

delay_model_handler(delay_cadence: int)

Handles the periodic calculation of the delay model.

Parameters:

argin (int) – Delay model update interval in seconds.

ensure_antenna_params(antenna_params: dict) Tuple[Dict[str, Any], str]

Method to fetch data from TelModel source

Parameters:
  • antenna_parmas (dict) – Received antenna params in Configure command,

  • empty. (else) –

Returns:

Validated antenna parameters and status message.

Return type:

Tuple[Dict[str, Any], str]

fetch_antenna_params() Tuple[dict[Any, Any], str]

Fetch antenna params from telmodel.

fetch_data() dict[Any, Any]

Method to retry using python retry library at frequency of 1 sec. This also logs a warning message with the error faced while trying.

set_dummy_targets() Tuple[ska_tango_base.commands.ResultCode, str]

Sets dummy targets for delay calculation.

Raises:

NotImplementedError – If the method is not implemented by the respective delay manager class.

start() None

Starts the delay model calculator thread.

stop() None

Stops the delay model calculator thread.

update_config_params() Tuple[ska_tango_base.commands.ResultCode, str]

Updates configuration parameters related to assigned resources during assign, release, or configure commands execution.

Raises:

NotImplementedError – If the method is not implemented by the respective delay manager class.

validate_antenna_params(message: str, antenna_params: dict) str

Validates antenna parameters for required ‘receptors’ key and existing errors.

Parameters:
  • message (str) – Message if any while downloading the data

  • antenna_params (dict) – antenna layout data

Returns:

Error message if validation fails, empty string otherwise.

Return type:

str

class ska_tmc_cspsubarrayleafnode.delay_model.Location

Bases: object

Location class for storing geodetic coordinates.

ska_tmc_cspsubarrayleafnode.delay_model.get_antenna_params(antenna_params: dict[str, Any])

Returns AntennaParams object from provided antenna parameters.

Parameters:

antenna_params – Dictionary containing antenna parameters.

Returns:

AntennaParams object.

ska_tmc_cspsubarrayleafnode.delay_model_mid module

DelayManagerMid class

class ska_tmc_cspsubarrayleafnode.delay_model_mid.DelayManagerMid(csp_sln_cm, telmodel_source: str, telmodel_path: str, delay_model_time_in_advance: int, delay_cadence: float, delay_validity_period: float, logger)

Bases: DelayManager

A class that calculates geometric delays for SKA Mid

calculate_delay_model()

Calculate delays using KatPoint library.

Convert delay corrections from H/V basis to X/Y polarisation basis. It is assumed that the convention that horizontal (H) delays correspond to X polarisation coefficients, while vertical (V) delays are applied as a Y polarisation offset.

Returns:

None

calculate_delays(time_t0, weather_data)

Calculate geometric delay values using KATPoint library.

Parameters:
  • time_t0 – reference time for delay calculation

  • weather_data – dict with keys “pressure”,”temperature”,”humidity”

Returns:

Tuple containing dictionaries with fifth order polynomial coefficients per antenna for horizontal and vertical delays.

create_antenna_objects(antenna_params)

Creates KatPoint Antenna objects from antenna parameters.

Parameters:

antenna_params (dict) – Dictionary containing antenna parameters.

Returns:

List of KatPoint Antenna objects.

Return type:

list

set_dummy_targets()

Set dummy targets for mid.

Returns:

Tuple[ResultCode, str]: result code and message

update_config_params()

Update configuration parameters related to assigned resources during assign, release, or configure commands execution.

Returns:

(ResultCode, Message)

ska_tmc_cspsubarrayleafnode.delay_model_low module

DelayManagerLow class

class ska_tmc_cspsubarrayleafnode.delay_model_low.DelayManagerLow(csp_sln_cm: CspSLNComponentManagerLow, telmodel_source: str, telmodel_path: str, delay_model_time_in_advance: int, delay_cadence: int, delay_validity_period: float, logger: Logger)

Bases: DelayManager

A class that calculates geometric delays for SKA Low

calculate_delay_model() None

Calculate delays using the KatPoint library and update the delay model JSON.

calculate_delays(time_t0: <module 'datetime' from '/home/docs/.asdf/installs/python/3.10.19/lib/python3.10/datetime.py'>, antenna_names: list[str]) dict[str, Any]

Calculate geometric delay values using the KATPoint library.

Parameters:
  • time_t0 – Initial time for delay calculation

  • antenna_names – List of antenna names

Returns:

Dictionary containing fifth order polynomial coefficients per antenna

create_antenna_objects(antenna_params: dict[str, Any]) list[katpoint.Antenna]

Creates KatPoint Antenna objects from antenna parameters.

Parameters:

antenna_params (dict) – Dictionary containing antenna parameters.

Returns:

List of KatPoint Antenna objects.

Return type:

list

delay_model_handler(delay_cadence: int) None

Handles the periodic calculation of the delay model.

Parameters:

delay_cadence (int) – Delay model update interval in seconds.

set_dummy_targets() tuple[ska_tango_base.commands.ResultCode, str]

Set dummy targets for the delay correction object.

Returns:

Tuple of ResultCode and message string

update_config_params() tuple[ska_tango_base.commands.ResultCode, str]

Update configuration parameters related to the resources assigned.

This method updates parameters every time assign, release, or configure commands are executed.

Returns:

Tuple of ResultCode and message string

ska_tmc_cspsubarrayleafnode.delay_model_pst_beam module

Warning

The PST delay model requires “field” key present under timing_beams section.

DelayManager class for PST beam calculation.

class ska_tmc_cspsubarrayleafnode.delay_model_pst_beam.DelayManagerPSTBeam(csp_sln_cm, telmodel_source: str, telmodel_path: str, pst_delay_model_time_in_advance: int, pst_delay_cadence: int, pst_delay_validity_period: int, pst_beam_id: int, ra: float, dec: float, logger)

Bases: DelayManagerLow

A class that calculates geometric delays for PST Beams for SKA Low

calculate_delay_model()

Calculate delays using the KatPoint library and update the delay model PST Beam JSON. Returns:

calculate_delays(time_t0, antenna_names)

Calculate geometric delay values using the KATPoint library.

Parameters:
  • time_t0 – Initial time for delay calculation

  • antenna_names – List of antenna names

Returns:

Dictionary containing fifth order polynomial coefficients per antenna

delay_model_handler(delay_cadence)

Handles the periodic calculation of the delay model for PST Beams.

Parameters:

delay_cadence (int) – Delay model update interval in seconds.

update_config_params() tuple[ska_control_model.ResultCode, str]

Update configuration parameters related to the resources assigned. This method updates parameters every time assign, release, or configure commands are executed.

Returns:

Tuple of ResultCode and message string

ska_tmc_cspsubarrayleafnode.delay_model_pss_beam module

DelayManager class for PSS beam calculation.

class ska_tmc_cspsubarrayleafnode.delay_model_pss_beam.DelayManagerPSSBeam(csp_sln_cm, telmodel_source: str, telmodel_path: str, pss_delay_model_time_in_advance: int, pss_delay_cadence: int, pss_delay_validity_period: int, pss_beam_id: int, ra: float, dec: float, logger)

Bases: DelayManagerLow

A class that calculates geometric delays for PSS Beams for SKA Low

calculate_delay_model()

Calculate delays using the KatPoint library and update the delay model PSS Beam JSON. Returns:

calculate_delays(time_t0, antenna_names)

Calculate geometric delay values using the KATPoint library.

Parameters:
  • time_t0 – Initial time for delay calculation

  • antenna_names – List of antenna names

Returns:

Dictionary containing fifth order polynomial coefficients per antenna

delay_model_handler(delay_cadence)

Handles the periodic calculation of the delay model for Configured PSS Beams.

Parameters:

delay_cadence (int) – Delay model update interval in seconds.

update_config_params() tuple[ska_control_model.ResultCode, str]

Update configuration parameters related to the resources assigned. This method updates parameters every time assign, release, or configure commands are executed.

Returns:

Tuple of ResultCode and message string

Weather Station Device

The Weather Station is a device responsible for collecting key environmental parameters used by the Delay Manager to compute accurate delay values. These parameters include:

  • Temperature

  • Humidity

  • Pressure

The device must be activated before it begins reporting data. This is achieved by setting its adminMode to 0, which transitions it into the operational state.

Usage

To enable the Weather Station device, execute the following instruction:

weather_Station_dev_proxy.adminMode = 0

Once enabled, the device begins transmitting environmental data at regular intervals. The Delay Manager utilizes this data to calculate corrections or compensations needed for signal timing and synchronization, which is critical in high-precision systems such as telescope arrays, scientific instrumentation, or time-sensitive communication networks.

Device Integration

The Weather Station integrates with other components in the system architecture, typically communicating with:

  • Delay Manager service

  • Central monitoring and control systems

  • Logging and diagnostics modules

A consistent 10.00/10 Python linting score indicates that all related Python code associated with the device’s configuration, data collection, and interface passes static analysis checks and adheres to code quality standards.

Command Timeout

The CommandTimeout attribute is introduced to allow updating the timeout value for commands without requiring a redeployment. This provides flexibility in tuning the timeout dynamically at runtime based on operational needs.

The CommandTimeOutDefault property is also introduced, which can be used to set a default timeout value during the deployment phase. This ensures that an initial timeout value is preconfigured when the component starts for the first time.

Usage

  • CommandTimeout attribute - Can be updated at runtime without redeployment. - Helps in adapting to varying command execution times.

  • CommandTimeOutDefault property - Configurable in the deployment configuration (e.g., values.yaml). - Sets the initial timeout value at startup.