Calibration Solver Device

This module provides a Tango device for a station calibration solver.

class StationCalibrationSolverDevice(*args: Any, **kwargs: Any)[source]

A Tango device for a station calibration solver.

GetFittedGains(channels: list[int], phases: ndarray, path: str) tuple[list[ska_control_model.ResultCode], list[str]][source]

Solve for a calibration solution.

Parameters:
  • channels – The range of channels to fit over

  • phases – 2D Numpy array containing phases for every antenna at every frequency, shape [n_phases,n_ant]

  • path – The path to save the offsets, gradients, cov_matrices and costs

>>> dp = tango.DeviceProxy("low-mccs/solver/solver")
>>> config = json.dumps({
    "channels": [50, 51, 52, 53, 54, ... , 100] # Some channels to fit over
    "phases": [[0.1, 0.2], [0.3, 0.4]... ] # Some array of phases to be fit over
    "path": "some/file/path"
    }
})
>>> dp.command_inout("GetFittedGains", config)
Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

class GetFittedGainsCommand(*args: Any, **kwargs: Any)[source]

A class for the GetFittedGainsCommand() command.

__init__(command_tracker: ska_tango_base.base.CommandTracker, component_manager: StationCalibrationSolverComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

Solve(argin: str) tuple[list[ska_control_model.ResultCode], list[str]][source]

Solve for a calibration solution.

Parameters:

argin – json dictionary containing the mandatory keys data_path, solution_path, eep_path, eep_filebase, station_config_path and optional keys back_rotation, nside, niter, skymodel

Example:

>>> dp = tango.DeviceProxy("low-mccs/solver/solver")
>>> config = json.dumps({
    "data_path": ( # relative to RootPath property
        "eb-t0001-20240422-00008/correlation_burst_205_20240422_27281_0.hdf5"),
    "solution_path": ( # relative to RootPath property
        "eb-t0001-20240422-00008/correlation_burst_205_20240422_27281_0.npy"),
    "eep_filebase": "FEKO_AAVS3_vogel_256_elem_50ohm_",
    "station_config_path": [
        "car:ska-low-aavs3?main",
        "instrument/mccs-configuration/aavs3.yaml",
    ],
    "structure_version",
    "back_rotation": True,
    "nside": 32,
    "niter": 200,
    "skymodel": "gsm"
    }
})
>>> dp.command_inout("Solve", config)
Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

class SolveCommand(*args: Any, **kwargs: Any)[source]

A class for the Solve() command.

__init__(command_tracker: ska_tango_base.base.CommandTracker, component_manager: StationCalibrationSolverComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

create_component_manager() StationCalibrationSolverComponentManager[source]

Create and return a component manager for this device.

Returns:

a component manager for this device.

init_command_objects() None[source]

Initialise the command handlers for commands supported by this device.

init_device() None[source]

Initialise the device.

main(*args: str, **kwargs: str) int[source]

Entry point for module.

Parameters:
  • args – positional arguments

  • kwargs – named arguments

Returns:

exit code