Antenna subpackage
This subpackage implements antenna functionality for MCCS.
- class AntennaComponentManager(*args: Any, **kwargs: Any)[source]
A component manager for managing the component of an MCCS antenna Tango device.
Since there is no way to monitor and control an antenna directly, this component manager simply proxies certain commands to the FieldStation and/or tile Tango device.
- __init__(field_station_name: str, antenna_id: int, tile_trl: str, tile_channels: tuple[int, int], logger: Logger, communication_state_callback: Callable[[ska_control_model.CommunicationStatus], None], component_state_callback: Callable[[...], None]) None[source]
Initialise a new instance.
- Parameters:
field_station_name – the TRL of the Tango device for this antenna’s FieldStation.
antenna_id – the logical id of this antenna (1-256)
tile_trl – the TRL of the Tango device for this antenna’s tile.
tile_channels – the tile ADC channels containing Y and X signal from this antenna.
logger – a logger for this object to use
communication_state_callback – callback to be called when the status of the communications channel between the component manager and its component changes
component_state_callback – callback to be called when the component state changes
- configure(task_callback: Callable | None = None, *, interface: str | None = None, antenna_config: dict, tile_config: dict) tuple[ska_control_model.TaskStatus, str][source]
Submit the configure method.
This method returns immediately after it submitted self._configure for execution.
- Parameters:
interface – the schema version this is running against.
antenna_config – antenna config
tile_config – tile config
task_callback – Update task state, defaults to None
- Returns:
a result code and response string
- off(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the off slow task.
This method returns immediately after it submitted self._off for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
task status and message
- on(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the on slow task.
This method returns immediately after it submitted self._on for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
task status and message
- property power_state: ska_control_model.PowerState | None
Return my power state.
- Returns:
my power state
- property power_state_lock: RLock
Return the power state lock of this component manager.
- Returns:
the power state lock of this component manager.
- reset(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Reset the antenna; this is not implemented.
This raises NotImplementedError because the antenna is passive hardware and cannot meaningfully be reset.
- Parameters:
task_callback – Update task state, defaults to None
- Raises:
NotImplementedError – because the antenna’s power state is not controlled via the Tile device; it is controlled via the FieldStation device.
- standby(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Put the antenna into standby state; this is not implemented.
This raises NotImplementedError because the antenna has no standby state.
- Parameters:
task_callback – Update task state, defaults to None
- Raises:
NotImplementedError – because the antenna has no standby state.
- start_communicating() None[source]
Establish communication with the component, then start monitoring.
- stop_communicating() None[source]
Cease monitoring the component, and break off all communication with it.
- class AntennaHealthModel(*args: Any, **kwargs: Any)[source]
A health model for an antenna.
- __init__(component_state_callback: Callable[[...], None], thresholds: dict[str, float] | None = None) None[source]
Initialise a new instance.
- Parameters:
component_state_callback – callback to be called whenever there is a change to this component’s state, including the health model’s evaluated health state.
thresholds – the threshold parameters for the health rules
- evaluate_health() ska_control_model.HealthState[source]
Compute overall health of the station.
The overall health is based on the fault and communication status of the station overall, together with the health of the FieldStation, antennas and tiles that it manages.
This implementation simply sets the health of the station to the health of its least healthy component.
- Returns:
an overall health of the station
- fieldstation_health_changed(fieldstation_health: ska_control_model.HealthState | None) None[source]
Handle a change in FieldStation health.
- Parameters:
fieldstation_health – the health state of the FieldStation
- tile_adc_rms_changed(tile_adc_rms: tuple[float, float] | None) None[source]
Handle a change in tile adc reading.
- Parameters:
tile_adc_rms – the adc reading from the tile
- tile_health_changed(tile_health: ska_control_model.HealthState | None) None[source]
Handle a change in tile health.
- Parameters:
tile_health – the health state of the tile
- class MccsAntenna(*args: Any, **kwargs: Any)[source]
An implementation of an antenna Tango device for MCCS.
- Configure(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Configure the antenna device attributes.
Also configures children device that are connected to the antenna.
- Parameters:
argin – Configuration parameters encoded in a json string
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
- class InitCommand(*args: Any, **kwargs: Any)[source]
Class that implements device initialisation for the MCCS antenna device.
- do(*args: Any, **kwargs: Any) tuple[ska_control_model.ResultCode, str][source]
Stateless hook for device initialisation.
Initialises the attributes and properties of the
MccsAntenna.- Parameters:
args – positional args to the component manager method
kwargs – keyword args to the component manager method
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- __init__(*args: Any, **kwargs: Any) None[source]
Initialise this device object.
- Parameters:
args – positional args to the init
kwargs – keyword args to the init
- bandpassCoefficient() list[float][source]
Return the bandpassCoefficient attribute.
- Returns:
bandpass coefficients
- calibrationCoefficient() list[float][source]
Get the Calibration coefficients.
The coefficients to be applied for the next frequency channel in the calibration cycle.
- Returns:
the calibration coefficients
- create_component_manager() AntennaComponentManager[source]
Create and return a component manager for this device.
- Returns:
a component manager for this device.
- delayRates() list[float][source]
Return the delayRates attribute.
- Returns:
delay rate for each beam
- fieldNodeLatitude() float[source]
Return the fieldNodeLatitude attribute.
- Returns:
the Latitude of field node centre
- fieldNodeLongitude() float[source]
Return the fieldNodeLongitude attribute.
- Returns:
the Longitude of field node centre
- init_command_objects() None[source]
Initialise the command handlers for commands supported by this device.
- logicalAntennaId() int[source]
Return the logical antenna ID attribute.
- Returns:
the logical antenna ID
- pointingCoefficient() list[float][source]
Return the pointingCoefficient attribute.
- Returns:
the pointing coefficients
- simulationMode(value: ska_control_model.SimulationMode) None[source]
Set the simulation mode of this device.
- Parameters:
value – the new simulation mode
- Raises:
ValueError – because this device cannot be put into simulation mode.
- timestampOfLastSpectrum() str[source]
Return the timestampOfLastSpectrum attribute.
- Returns:
the timestamp of the last spectrum
- xDisplacement() float[source]
Return the horizontal displacement east attribute.
- Returns:
the horizontal displacement eastwards from station reference position
- xPolarisationFaulty() bool[source]
Return the xPolarisationFaulty attribute.
- Returns:
the x-polarisation faulty flag
- xPolarisationScalingFactor() list[int][source]
Return the logical antenna ID attribute.
- Returns:
the x polarisation scaling factor
- yDisplacement() float[source]
Return the horizontal displacement north attribute.
- Returns:
the horizontal displacement northwards from station reference position
- yPolarisationFaulty() bool[source]
Return the yPolarisationFaulty attribute.
- Returns:
the y-polarisation faulty flag
- Antenna component manager
AntennaComponentManagerAntennaComponentManager.__init__()AntennaComponentManager.configure()AntennaComponentManager.currentAntennaComponentManager.off()AntennaComponentManager.on()AntennaComponentManager.power_stateAntennaComponentManager.power_state_lockAntennaComponentManager.reset()AntennaComponentManager.standby()AntennaComponentManager.start_communicating()AntennaComponentManager.stop_communicating()AntennaComponentManager.temperatureAntennaComponentManager.voltage
- Antenna device
MccsAntennaMccsAntenna.Configure()MccsAntenna.InitCommandMccsAntenna.__init__()MccsAntenna.altitude()MccsAntenna.antennaId()MccsAntenna.bandpassCoefficient()MccsAntenna.calibrationCoefficient()MccsAntenna.create_component_manager()MccsAntenna.current()MccsAntenna.delayRates()MccsAntenna.delays()MccsAntenna.delete_device()MccsAntenna.fieldNodeLatitude()MccsAntenna.fieldNodeLongitude()MccsAntenna.first()MccsAntenna.gain()MccsAntenna.init_command_objects()MccsAntenna.init_device()MccsAntenna.logicalAntennaId()MccsAntenna.pointingCoefficient()MccsAntenna.position()MccsAntenna.rms()MccsAntenna.simulationMode()MccsAntenna.spectrumX()MccsAntenna.spectrumY()MccsAntenna.temperature()MccsAntenna.timestampOfLastSpectrum()MccsAntenna.voltage()MccsAntenna.xDisplacement()MccsAntenna.xPolarisationFaulty()MccsAntenna.xPolarisationScalingFactor()MccsAntenna.yDisplacement()MccsAntenna.yPolarisationFaulty()MccsAntenna.yPolarisationScalingFactor()MccsAntenna.zDisplacement()
main()
- Antenna health model
- Antenna health rules