API
ska_tmc_cdm.jsonschema
ska_tmc_cdm.jsonschema.json_schema
The JSON Schema module contains methods for fetching version-specific JSON schemas using interface uri and validating the structure of JSON against these schemas.
- class JsonSchema[source]
JSON Schema use for validating the structure of JSON data
- static get_schema_by_uri(uri: str) ska_telmodel.schema.Schema [source]
Retrieve JSON Schemas from remote server.
- Parameters:
uri – Interface Version URI
- Returns:
Interface schema
- Raises:
SchemaNotFound if URI does not resolve to a schema
- static semantic_validate_schema(instance: dict, uri: str) None [source]
Validate an instance dictionary under the given schema.
- Parameters:
uri – The schema to validate with
instance – The instance to validate
- Returns:
None, in case of valid data otherwise, it raises an exception.
- static validate_schema(uri: str, instance: dict, strictness=None) None [source]
Validate an instance dictionary under the given schema.
strictness can be set from 0-2. Values equal:
0: permissive warnings 1: permissive errors and strict warnings 2: strict errors
- Parameters:
uri – The schema to validate with
instance – The instance to validate
strictness – strictness level
- Returns:
None, in case of valid data otherwise, it raises an exception.
ska_tmc_cdm.messages
The ska_tmc_cdm.messages package contains modules that maps Tango structured arguments to Python.
ska_tmc_cdm.messages.central_node
The ska_tmc_cdm.messages.central_node package holds modules that translate TMC Central Node requests and responses to and from Python.
ska_tmc_cdm.messages.central_node.assign_resources
The messages module provides simple Python representations of the structured request and response for the TMC CentralNode.AssignResources command.
- class AssignResourcesRequest(subarray_id: Optional[int] = None, dish_allocation: Optional[DishAllocation] = None, sdp_config: Optional[SDPConfiguration] = None, mccs: Optional[MCCSAllocate] = None, interface: Optional[str] = None, transaction_id: Optional[str] = None)[source]
AssignResourcesRequest is a Python representation of the structured argument for a TMC CentralNode.AssignResourcesRequest request.
- Parameters:
subarray_id – the numeric SubArray ID (1..16)
dish_allocation – object holding the DISH resource allocation for this request.
sdp_config – sdp configuration
mccs – MCCS subarray allocation
interface – url string to determine JsonSchema version, defaults to https://schema.skao.int/ska-tmc-assignresources/2.1 for Mid and https://schema.skao.int/ska-low-tmc-assignresources/3.2 for Low if not set
transaction_id – ID for tracking requests
- Raises:
ValueError – if mccs is allocated with dish and sdp_config
- classmethod from_dish(subarray_id: int, dish_allocation: DishAllocation, sdp_config: Optional[SDPConfiguration] = None, interface: Optional[str] = None, transaction_id: Optional[str] = None)[source]
Create a new AssignResourcesRequest object. :param subarray_id: the numeric SubArray ID (1..16) :param dish_allocation: object holding the DISH resource allocation for this request. :param sdp_config: sdp configuration :return: AssignResourcesRequest object
- classmethod from_mccs(subarray_id: int, mccs: MCCSAllocate, sdp_config: Optional[SDPConfiguration] = None, interface: Optional[str] = None, transaction_id: Optional[str] = None)[source]
Create a new AssignResourcesRequest object.
- Parameters:
subarray_id – the numeric SubArray ID (1..16)
mccs – MCCS subarray allocation
sdp_config – SDP configuration
interface – url string to determine JsonSchema version
- Returns:
AssignResourcesRequest object
- class AssignResourcesResponse(dish_allocation: Optional[DishAllocation] = None)[source]
AssignResourcesResponse is a Python representation of the structured response from a TMC CentralNode.AssignResources request.
ska_tmc_cdm.messages.central_node.release_resources
The release_resources module provides simple Python representations of the structured request and response for a TMC CentralNode.ReleaseResources call.
- class ReleaseResourcesRequest(*, interface: Optional[str] = 'https://schema.skao.int/ska-tmc-releaseresources/2.1', transaction_id: Optional[str] = None, subarray_id: Optional[int] = None, release_all: bool = False, dish_allocation: Optional[DishAllocation] = None)[source]
ReleaseResourcesRequest is a Python representation of the structured request for a TMC CentralNode.ReleaseResources call.
- Parameters:
interface – url string to determine JsonSchema version, defaults to https://schema.skao.int/ska-tmc-releaseresources/2.1 if not set
transaction_id – ID for tracking requests
subarray_id – the numeric SubArray ID (1..16)
release_all – True to release all sub-array resources, False to
release just those resources specified as other arguments :param dish_allocation: object holding the DISH resource allocation to release for this request.
ska_tmc_cdm.messages.central_node.common
The messages module provides simple Python representations of the structured request and response for the TMC CentralNode.AssignResources command.
ska_tmc_cdm.messages.central_node.sdp
The messages module provides simple Python representations of the structured request and response for the TMC CentralNode.AssignResources command.
- class BeamConfiguration(beam_id: Optional[str] = None, function: Optional[str] = None, search_beam_id: Optional[int] = None, timing_beam_id: Optional[int] = None, vlbi_beam_id: Optional[int] = None)[source]
Class to hold Dependencies for Beam Configuration
- Parameters:
beam_id – Name to identify the beam within the SDP configuration.
function – Identifies the type and origin of the generated beam data.
search_beam_id – search_beam_id
timing_beam_id – timing_beam_id
vlbi_beam_id – vlbi_beam_id
- class Channel(count: int, start: int, stride: Optional[int], freq_min: float, freq_max: float, link_map: Optional[list[list]], spectral_window_id: Optional[str] = None)[source]
Class to hold Channels for ScanType
Create a new Channel object.
- Parameters:
count – Number of channels
start – First channel ID
stride – Distance between subsequent channel IDs
freq_min – Lower bound of first channel
freq_max – Upper bound of last channel
link_map – Channel map that specifies which network link is going to get used to send channels to SDP. Intended to allow SDP to optimize network and receive node configuration.
spectral_window_id – spectral_window_id
- class ChannelConfiguration(channels_id: ~typing.Optional[str] = None, spectral_windows: list[ska_tmc_cdm.messages.central_node.sdp.Channel] = <factory>)[source]
Class to hold Dependencies for Channel Configuration
- Parameters:
channels_id – channels_id
spectral_windows – spectral_windows
- class EBScanType(scan_type_id: ~typing.Optional[str] = None, beams: dict[str, ska_tmc_cdm.messages.central_node.sdp.EBScanTypeBeam] = <factory>, derive_from: ~typing.Optional[str] = None)[source]
Class to hold EBScanType configuration
- Parameters:
scan_type_id – scan_type_id
beams – Beam parameters for the purpose of the Science Data Processor.
derive_from – derive_from
- class EBScanTypeBeam(field_id: Optional[str] = None, channels_id: Optional[str] = None, polarisations_id: Optional[str] = None)[source]
Class to hold EBScanTypeBeam Configuration
- Parameters:
field_id – field_id
channels_id – channels_id
polarisations_id – polarisations_id
- class ExecutionBlockConfiguration(eb_id: ~typing.Optional[str] = None, max_length: ~typing.Optional[float] = None, context: dict = <factory>, beams: ~typing.Optional[list[ska_tmc_cdm.messages.central_node.sdp.BeamConfiguration]] = None, channels: ~typing.Optional[list[ska_tmc_cdm.messages.central_node.sdp.ChannelConfiguration]] = None, polarisations: ~typing.Optional[list[ska_tmc_cdm.messages.central_node.sdp.PolarisationConfiguration]] = None, fields: ~typing.Optional[list[ska_tmc_cdm.messages.central_node.sdp.FieldConfiguration]] = None, scan_types: ~typing.Optional[list[ska_tmc_cdm.messages.central_node.sdp.EBScanType]] = None)[source]
Class to hold ExecutionBlock configuration
- Parameters:
eb_id – Execution block ID to associate with processing
max_length – Hint about the maximum observation length to support by the SDP.
context – Free-form information from OET, see ADR-54
beams – Beam parameters for the purpose of the Science Data Processor.
channels – Spectral windows per channel configuration.
polarisations – Polarisation definition.
fields – Fields / Targets
scan_types – Scan types. Associates scans with per-beam fields & channel configurations
- class FieldConfiguration(field_id: Optional[str] = None, pointing_fqdn: Optional[str] = None, phase_dir: Optional[PhaseDir] = None)[source]
Class to hold Field configuration
- Parameters:
field_id – field_id
pointing_fqdn – pointing_fqdn
phase_dir – Phase direction
- class PbDependency(pb_id: str, kind: list[str])[source]
Class to hold Dependencies for ProcessingBlock
- Parameters:
pb_id – Unique identifier for this processing block
kind – The kind of processing script (realtime or batch)
- class PhaseDir(ra: Optional[list[float]] = None, dec: Optional[list[float]] = None, reference_time: Optional[str] = None, reference_frame: Optional[str] = None)[source]
Class to hold PhaseDir configuration
- Parameters:
ra – Right Ascension in degrees (see ADR-49)
dec – Declination in degrees (see ADR-49)
reference_time – reference_time,
reference_frame – Specification of the reference frame or system for a set of pointing coordinates (see ADR-49)
- class PolarisationConfiguration(polarisations_id: ~typing.Optional[str] = None, corr_type: list[str] = <factory>)[source]
Class to hold Dependencies for Polarisation Configuration
- Parameters:
polarisations_id – Polarisation definitions id
corr_type – corr_type
- class ProcessingBlockConfiguration(pb_id: Optional[str] = None, workflow: Optional[SDPWorkflow] = None, parameters: Optional[dict] = None, dependencies: Optional[list[ska_tmc_cdm.messages.central_node.sdp.PbDependency]] = None, sbi_ids: Optional[list[str]] = None, script: Optional[ScriptConfiguration] = None)[source]
Class to hold ProcessingBlock configuration
- Parameters:
pb_id – Processing block ID
workflow – Specification of the workflow to be executed along with configuration parameters for the workflow.
parameters – Processing script parameters
dependencies – Dependencies on other processing blocks
sbi_ids – list of scheduling block ids
script – Processing script description (dictionary for now)
- class SDPConfiguration(eb_id: Optional[str] = None, max_length: Optional[float] = None, scan_types: Optional[list[ska_tmc_cdm.messages.central_node.sdp.ScanType]] = None, processing_blocks: Optional[list[ska_tmc_cdm.messages.central_node.sdp.ProcessingBlockConfiguration]] = None, execution_block: Optional[ExecutionBlockConfiguration] = None, resources: Optional[dict] = None, interface: Optional[str] = None)[source]
Class to hold SDP Configuration
- Parameters:
eb_id – Execution block ID to associate with processing
max_length – Hint about the maximum observation length to support by the SDP.
scan_types – Scan types to be supported on subarray
processing_blocks – A Processing Block is an atomic unit of data processing for the purpose of SDP’s internal scheduler
execution_block – execution_block
interface – url string to determine JsonSchema version
resources – resources
- class SDPWorkflow(name: str, kind: str, version: str)[source]
Class to hold SDPWorkflows for ProcessingBlock
Create a new SDPWorkflow object.
- Parameters:
name – The name of the processing script
kind – The kind of processing script
version – Version of the processing script
- class ScanType(scan_type_id: str, reference_frame: str, ra: str, dec: str, channels: list[ska_tmc_cdm.messages.central_node.sdp.Channel])[source]
Class to hold ScanType configuration
- Parameters:
scan_type_id – (any scan type)
reference_frame – Specification of the reference frame or system for a set of pointing coordinates
ra – Right Ascension in degrees
dec – Declination in degrees
channels – Expected channel configuration.
ska_tmc_cdm.messages.central_node.mccs
- class MCCSAllocate(station_ids: list[list[int]], channel_blocks: list[int], subarray_beam_ids: list[int])[source]
MCCSAllocate is a Python representation of the structured argument for a TMC CentralNode.AssignResourcesRequest.
- Parameters:
station_ids – stations IDs to allocate
channel_blocks – number of channel groups to assign
subarray_beam_ids – station beam id’s to allocate
ska_tmc_cdm.messages.mccscontroller.allocate
The allocate module defines a Python object model for the structured JSON given in an MCCSController.Allocate call.
- class AllocateRequest(*, interface: ~typing.Optional[str] = 'https://schema.skao.int/ska-low-mccs-assignresources/2.0', subarray_id: int, subarray_beam_ids: list[int] = <factory>, station_ids: list[list[int]] = <factory>, channel_blocks: list[int] = <factory>)[source]
AssignResourcesRequest is the object representation of the JSON argument for an MCCSController.Allocate command.
- Parameters:
subarray_id – the numeric SubArray ID
subarray_beam_ids – subarray beam IDs to allocate to the subarray
station_ids – IDs of stations to allocate
channel_blocks – channels to allocate
interface – the JSON schema this object claims to be compliant with
ska_tmc_cdm.messages.mccscontroller.releaseresources
The allocate module defines a Python object model for the structured JSON that forms the argument for an MCCSController.ReleaseResources call.
ska_tmc_cdm.messages.mccssubarray.assigned_resources
- class AssignedResources(interface: str = 'https://schema.skao.int/ska-low-mccs-assignedresources/2.0', subarray_beam_ids: list[int] = <factory>, station_ids: list[list[int]] = <factory>, channel_blocks: list[int] = <factory>)[source]
AssignedResources is the object representation of the JSON returned by the MCCSSubarray.assigned_resources attribute.
- Parameters:
subarray_beam_ids – subarray beam IDs to allocate to the subarray
station_ids – IDs of stations to allocate
channel_blocks – channels to allocate
interface – the JSON schema this object claims to be compliant with
ska_tmc_cdm.messages.mccssubarray.configure
The mccssubarray.configure module contains a Python object model for the various structured bits of JSON given in an MCCSSubarray.Configure call.
- class ConfigureRequest(*, interface: str = 'https://schema.skao.int/ska-low-mccs-configure/2.0', stations: list[ska_tmc_cdm.messages.mccssubarray.configure.StationConfiguration], subarray_beams: list[ska_tmc_cdm.messages.mccssubarray.configure.SubarrayBeamConfiguration])[source]
Class to hold all subarray configuration.
- Parameters:
stations – a list of station configurations
subarray_beams – a list of subarray beam configurations
- class StationConfiguration(station_id: int)[source]
A class to hold station configuration
- Parameters:
station_id – stations id
- class SubarrayBeamConfiguration(*, subarray_beam_id: int, station_ids: list[int], update_rate: float, channels: list[list[int]], sky_coordinates: list[float], antenna_weights: list[float], phase_centre: list[float])[source]
A class to hold subarray beam configuration attributes
- Parameters:
subarray_beam_id – subarray beam ID
station_ids – station IDs
channels – channels to form subarray beam
update_rate – frequency of new Az/El during scan
sky_coordinates – Az/El specification with rates
antenna_weights – antenna weights, 1 per station
phase_centre – phase centre of subarray beam
ska_tmc_cdm.messages.mccssubarray.scan
The scan module defines Python object representations of the structured request for an MCCSSubarray.Scan command.
ska_tmc_cdm.messages.subarray_node
The ska_tmc_cdm.messages.subarray_node package holds modules containing classes that represent arguments, requests, and responses for TMC SubArrayNode devices.
ska_tmc_cdm.messages.subarray_node.assigned_resources
TMC Assigned Resources
- class AssignedResources(*, interface: Optional[str] = 'https://schema.skao.int/ska-low-tmc-assignedresources/2.0', mccs: MCCSAllocation)[source]
AssignedResources models the structured JSON returned when the MCCSSubarray.assigned_resources Tango attribute is read.
- Parameters:
interface – JSON schema this instance conforms to, defaults to https://schema.skao.int/ska-low-tmc-assignedresources/2.0 if not set
mccs – the MCCSAllocation describing the allocated resources
ska_tmc_cdm.messages.subarray_node.configure
The configure package contains modules that define Python classes for all of the permissible arguments for a SubArrayNode.configure() call.
- class ConfigureRequest(pointing: Optional[PointingConfiguration] = None, dish: Optional[DishConfiguration] = None, sdp: Optional[SDPConfiguration] = None, csp: Optional[CSPConfiguration] = None, mccs: Optional[MCCSConfiguration] = None, tmc: Optional[TMCConfiguration] = None, interface: Optional[str] = None, transaction_id: Optional[str] = None)[source]
ConfigureRequest encapsulates the arguments required for the TMC SubArrayNode.Configure() command.
- Parameters:
pointing – Pointing configuration
dish – Dish configuration
sdp – SDP configuration
csp – CSP configuration
mccs – MCCS configuration
tmc – TMCS configuration
interface – Interface URI. Defaults to https://schema.skao.int/ska-tmc-configure/2.2 for Mid and https://schema.skao.int/ska-low-tmc-configure/3.1 for Low
transaction_id – Optional transaction ID
ska_tmc_cdm.messages.subarray_node.configure.core
The configure.common module contains simple Python representations of the structured request and response for the TMC SubArrayNode.Configure command.
As configurations become more complex, they may be rehomed in a submodule of this package.
- class DishConfiguration(receiver_band: ReceiverBand)[source]
DishConfiguration specifies how SKA MID dishes in a sub-array should be configured. At the moment, this is limited to setting the receiver band.
- class PointingConfiguration(target: Target)[source]
PointingConfiguration specifies where the subarray receptors are going to point.
- class Target(ra: dataclasses.InitVar[Union[str, int, float, astropy.units.quantity.Quantity, NoneType]] = None, dec: dataclasses.InitVar[Union[str, int, float, astropy.units.quantity.Quantity, NoneType]] = None, target_name: str = '', reference_frame: dataclasses.InitVar[str] = 'icrs', unit: dataclasses.InitVar[str | astropy.units.core.Unit | tuple[str | astropy.units.core.Unit, str | astropy.units.core.Unit]] = (Unit('hourangle'), Unit('deg')), ca_offset_arcsec: float = 0.0, ie_offset_arcsec: float = 0.0)[source]
Target encapsulates source coordinates and source metadata.
The SubArrayNode ICD specifies that RA and Dec must be provided, hence non-ra/dec frames such as galactic are not supported.
ska_tmc_cdm.messages.subarray_node.configure.csp
The configure.csp module contains Python classes that represent the various aspects of CSP configuration that may be specified in a SubArrayNode.configure command.
- class CBFConfiguration(fsp_configs: List[FSPConfiguration], vlbi_config: Optional[dict] = None)[source]
Class to hold all FSP and VLBI configurations.
- Parameters:
fsp_configs – the FSP configurations to set
vlbi_config – the VLBI configurations to set, it is optional
- class CSPConfiguration(interface: Optional[str] = None, subarray: Optional[SubarrayConfiguration] = None, common: Optional[CommonConfiguration] = None, cbf_config: Optional[CBFConfiguration] = None, pst_config: Optional[Union[PSTConfiguration, dict]] = None, pss_config: Optional[Union[PSSConfiguration, dict]] = None, lowcbf: Optional[LowCBFConfiguration] = None)[source]
Class to hold all CSP configuration. In order to support backward compatibility, We have kept old attributes as it is and added support of new attributes as per ADR-18
- Parameters:
interface – url string to determine JsonSchema version
subarray – Sub-array configuration to set
common – the common CSP elemenets to set
cbf_config – the CBF configurations to set
pst_config – the PST configurations to set
pss_config – the PSS configurations to set
- class CommonConfiguration(config_id: str, frequency_band: Optional[ReceiverBand] = None, subarray_id: Optional[int] = None, band_5_tuning: Optional[List[float]] = None)[source]
Class to hold the CSP sub-elements.
- Parameters:
config_id – CSP configuration ID
frequency_band – the frequency band to set
subarray_id – an ID of sub-array device
band_5_tuning – band 5 receiver to set (optional)
- class FSPConfiguration(fsp_id: int = <factory>, function_mode: ~ska_tmc_cdm.messages.subarray_node.configure.csp.FSPFunctionMode = <factory>, frequency_slice_id: int = <factory>, integration_factor: int = <factory>, zoom_factor: int = <factory>, channel_averaging_map: ~typing.Optional[~typing.List[~typing.Tuple]] = None, output_link_map: ~typing.Optional[~typing.List[~typing.Tuple]] = None, channel_offset: ~typing.Optional[int] = None, zoom_window_tuning: ~typing.Optional[int] = None)[source]
FSPConfiguration defines the configuration for a CSP Frequency Slice Processor.
Channel averaging map is an optional list of 20 x (int,int) tuples.
- Parameters:
fsp_id – FSP configuration ID [1..27]
function_mode – FSP function mode
frequency_slice_id – frequency slicer ID [1..26]
zoom_factor – zoom factor [0..6]
integration_factor – integration factor [1..10]
channel_averaging_map – Optional channel averaging map
output_link_map – Optional output link map
channel_offset – Optional FSP channel offset
zoom_window_tuning – Optional zoom window tuning
- Raises:
ValueError – Invalid parameter values entered
- class LowCBFConfiguration(stations: Optional[StationConfiguration] = None, vis: Optional[VisConfiguration] = None)[source]
Class to hold Low CBF Configuration.
- Parameters:
stations – stations
vis – vis
- class StationConfiguration(stns: Optional[List[List[int]]] = None, stn_beams: Optional[List[StnBeamConfiguration]] = None)[source]
Class to hold Stations Configuration.
- Parameters:
stns – stns
stn_beams – stn_beams
- class StnBeamConfiguration(stn_beam_id: Optional[int] = None, freq_ids: Optional[List[int]] = None, host: Optional[List[Tuple[int, str]]] = None, port: Optional[List[Tuple[int, int, int]]] = None, mac: Optional[List[Tuple[int, str]]] = None, integration_ms: Optional[int] = None)[source]
Class to hold Stations Beam Configuration.
- Parameters:
stn_beam_id – stn_beam_id
freq_ids – freq_ids
host – host
port – port
mac – mac
integration_ms – integration_ms
- class SubarrayConfiguration(subarray_name: str)[source]
Class to hold the parameters relevant only for the current sub-array device.
- Parameters:
sub-array_name – Name of the sub-array
- class VisConfiguration(fsp: Optional[VisFspConfiguration] = None, stn_beams: Optional[List[StnBeamConfiguration]] = None)[source]
Class to hold Vis Configuration.
- Parameters:
fsp – fsp
stn_beams – stn_beams
ska_tmc_cdm.messages.subarray_node.configure.sdp
The configure.sdp module contains Python classes that represent the various aspects of SDP configuration that may be specified in a SubArrayNode.configure command.
ska_tmc_cdm.messages.subarray_node.configure.mccs
The configure.mccs module contains Python classes that represent the various aspects of MCCS configuration that may be specified in a SubArray.configure command.
- class MCCSConfiguration(*, station_configs: List[StnConfiguration], subarray_beam_configs: List[SubarrayBeamConfiguration])[source]
Class to hold all subarray configuration.
- Parameters:
station_configs (List[StnConfiguration]) – a list of station configurations
subarray_beam_configs (List[SubarrayBeamConfiguration]) – a list of subarray beam configurations
- class StnConfiguration(station_id: int)[source]
A class to hold station configuration configuration
- Parameters:
station_id (int) – stations id
- class SubarrayBeamConfiguration(subarray_beam_id: int, station_ids: List[int], channels: List[List[int]], update_rate: float, target: SubarrayBeamTarget, antenna_weights: List[float], phase_centre: List[float])[source]
A class to hold subarray_beam configuration attributes
- Parameters:
subarray_beam_id (int) – stationbeam’s id
station_ids (List[int]) – station id’s
channels (List[Tuple]) – channels to form station beam
update_rate (float) – frequency of new Az/El during scan
target (SubarrayBeamTarget) – Az/El specification with target source
antenna_weights (List[float]) – antenna_weights
phase_centre (List[float]) – phase_centre
- class SubarrayBeamTarget(az: float, el: float, target_name: str, reference_frame: str)[source]
Target encapsulates source coordinates and source metadata.
The SubArrayNode ICD specifies that az and el must be provided
- Parameters:
az – Az specification with rates
el – El specification with rates
target_name – target name
reference_frame – Target coordinate reference frame
ska_tmc_cdm.messages.subarray_node.configure.tmc
Configuration specific to TMC. scan_duration (in seconds) is the duration to be used for all scan commands following this configuration.
ska_tmc_cdm.messages.subarray_node.scan
The scan module defines simple Python representations of the structured request for a TMC SubArrayNode.Scan command.
- class ScanRequest(*, interface: Optional[str] = None, transaction_id: Optional[str] = None, subarray_id: Optional[int] = None, scan_id: int)[source]
ScanRequest represents the JSON for a SubArrayNode.scan call.
- Parameters:
interface – Interface URI. Defaults to https://schema.skao.int/ska-tmc-scan/2.1 for Mid and https://schema.skao.int/ska-low-tmc-scan/4.0 for Low
transaction_id – optional transaction ID
subarray_id – the numeric SubArray ID
scan_id – integer scan ID
ska_tmc_cdm.schemas
The schemas for the SKA Configuration Data Model (CDM).
ska_tmc_cdm.schemas.central_node
The schemas.central_node package contains Marshmallow schemas that convert JSON to/from the Python classes contained in ska_tmc_cdm.messages.central_node.
- class AssignResourcesRequestSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the AssignResourcesRequest class.
- create_request(data, **_)
Convert parsed JSON back into an AssignResources request object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
AssignResources object populated from data
- dish
alias of
DishAllocationSchema
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for CBF configuration
- mccs
alias of
MCCSAllocateSchema
- sdp_config
alias of
SDPConfigurationSchema
- class AssignResourcesResponseSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the AssignResourcesResponse class.
- create_response(data, **_)
Convert parsed JSON from an AssignResources response back into an AssignResourcesResponse object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
AssignResourcesResponse object populated from data
- dish
alias of
DishAllocationResponseSchema
- class DishAllocationResponseSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the DishAllocation class when received in the response.
- create(data, **_)
Convert parsed JSON from an AssignResources response back into a DishAllocation object.
This ‘duplicate’ schema is required as the DishAllocation is found under a different JSON key in the response as compared to the request.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
DishAllocation object populated from data
- class DishAllocationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the DishAllocation class.
- create(data, **_)
Convert parsed JSON back into a DishAllocation object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
DishAllocation object populated from data
- class MCCSAllocateSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the MCCSAllocate class.
- create_mccs_allocate(data, **_)
Convert parsed JSON back into a MCCSAllocate object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
MCCSAllocate object populated from data
- class ReleaseResourcesRequestSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the ReleaseResourcesRequest class.
- create_request(data, **_)
Convert parsed JSON from an ReleaseResources request back into an ReleaseResourcesRequest object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
ReleaseResourcesRequest object populated from data
- dish
alias of
DishAllocationSchema
- validate_on_dump(data, **_)
Validating the structure of JSON against schemas and Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for SubArrayNode configuration
- class SDPConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the SDPConfiguration class
- create_sdp_config(data, **_)
Convert parsed JSON back into a SDPConfiguration object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- execution_block
alias of
ExecutionBlockConfigurationSchema
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- processing_blocks
alias of
ProcessingBlockSchema
- scan_types
alias of
ScanTypeSchema
ska_tmc_cdm.schemas.central_node.assign_resources
The schemas.central_node module defines Marshmallow schemas that map TMC Central Node message classes to/from a JSON representation.
- class AssignResourcesRequestSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the AssignResourcesRequest class.
- create_request(data, **_)
Convert parsed JSON back into an AssignResources request object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
AssignResources object populated from data
- dish
alias of
DishAllocationSchema
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for CBF configuration
- mccs
alias of
MCCSAllocateSchema
- sdp_config
alias of
SDPConfigurationSchema
- class AssignResourcesResponseSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the AssignResourcesResponse class.
- create_response(data, **_)
Convert parsed JSON from an AssignResources response back into an AssignResourcesResponse object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
AssignResourcesResponse object populated from data
- dish
alias of
DishAllocationResponseSchema
ska_tmc_cdm.schemas.central_node.common
The schemas.central_node module defines Marshmallow schemas that map TMC Central Node message classes to/from a JSON representation.
- class DishAllocationResponseSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the DishAllocation class when received in the response.
- create(data, **_)
Convert parsed JSON from an AssignResources response back into a DishAllocation object.
This ‘duplicate’ schema is required as the DishAllocation is found under a different JSON key in the response as compared to the request.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
DishAllocation object populated from data
- class DishAllocationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the DishAllocation class.
- create(data, **_)
Convert parsed JSON back into a DishAllocation object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
DishAllocation object populated from data
ska_tmc_cdm.schemas.central_node.sdp
The schemas.central_node module defines Marshmallow schemas that map TMC Central Node message classes to/from a JSON representation.
- class BeamConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the BeamConfiguration class
- create_beam_config(data, **_)
Convert parsed JSON back into a BeamConfiguration object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- class ChannelConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the ChannelConfiguration class
- create_channel_config(data, **_)
Convert parsed JSON back into a ChannelConfiguration object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- spectral_windows
alias of
ChannelSchema
- class ChannelSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the SubBand class.
- create_channel(data, **_)
Convert parsed JSON back into a Channel object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SubBand object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- class EBScanTypeBeamSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the EBScanTypeBeam class
- create_ebscantypebeams_config(data, **_)
Convert parsed JSON back into a EBScanTypeBeam object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- class EBScanTypeSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the EBScanTypeBeam class
- create_ebscantype_config(data, **_)
Convert parsed JSON back into a EBScanType object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- class ExecutionBlockConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the ExecutionBlockConfiguration class
- create_executionblock_config(data, **_)
Convert parsed JSON back into a ExecutionBlockConfiguration object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- class FieldConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the FieldConfiguration class
- create_polarisation_config(data, **_)
Convert parsed JSON back into a FieldConfiguration object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- phase_dir
alias of
PhaseDirSchema
- class PbDependencySchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the PbDepedency class.
- create_pb_dependency(data, **_)
Convert parsed JSON back into a PbDependency object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
PbDependency object populated from data
- class PhaseDirSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the PhaseDir class
- create_phase_dir_config(data, **_)
Convert parsed JSON back into a PhaseDir object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- class PolarisationConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the PolarisationConfiguration class
- create_polarisation_config(data, **_)
Convert parsed JSON back into a PolarisationConfiguration object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- class ProcessingBlockSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the ProcessingBlock class.
- create_processing_block_config(data, **_)
Convert parsed JSON back into a ProcessingBlock object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
PB object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- script
alias of
ScriptConfigurationSchema
- workflow
alias of
SDPWorkflowSchema
- class SDPConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marsmallow class for the SDPConfiguration class
- create_sdp_config(data, **_)
Convert parsed JSON back into a SDPConfiguration object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- execution_block
alias of
ExecutionBlockConfigurationSchema
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- processing_blocks
alias of
ProcessingBlockSchema
- scan_types
alias of
ScanTypeSchema
- class SDPWorkflowSchema(*args: Any, **kwargs: Any)[source]
Represents the type of workflow being configured on the SDP
- create_sdp_wf(data, **_)
Convert parsed JSON back into a SDP Workflow object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDP Workflow object populated from data
- class ScanTypeSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the ScanType class.
- channels
alias of
ChannelSchema
- create_scan_type(data, **_)
Convert parsed JSON back into a ScanType object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
ScanType object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
- class ScriptConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the ScriptConfiguration class.
- create_executionblock_config(data, **_)
Convert parsed JSON back into a ScriptConfiguration object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SDPConfiguration object populated from data
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for PB configuration
ska_tmc_cdm.schemas.central_node.mccs
The schemas.central_node module defines Marshmallow schemas that map TMC Central Node message classes to/from a JSON representation.
- class MCCSAllocateSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the MCCSAllocate class.
- create_mccs_allocate(data, **_)
Convert parsed JSON back into a MCCSAllocate object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
MCCSAllocate object populated from data
ska_tmc_cdm.schemas.codec
The codec module contains classes used by clients to marshall CDM classes to and from JSON. This saves the clients having to instantiate and manipulate the Marshmallow schema directly.
- class MarshmallowCodec[source]
MarshmallowCodec marshalls and unmarshalls CDM classes.
The mapping of CDM classes to Marshmallow schema is defined in this class.
- dumps(obj, validate: bool = True, strictness: Optional[int] = None)[source]
Return a string JSON representation of a CDM instance.
The default strictness of the Telescope Model schema validator can be overridden by supplying the validate argument.
- Parameters:
obj – the instance to marshall to JSON
validate – True to enable schema validation
strictness – optional validation strictness level (0=min, 2=max)
- Returns:
JSON representation of obj
- load_from_file(cls, path, validate: bool = True, strictness: Optional[int] = None)[source]
Load an instance of a CDM class from disk.
- Parameters:
cls – the class to create from the file
path – the path to the file
validate – True to enable schema validation
strictness – optional validation strictness level (0=min, 2=max)
- Returns:
an instance of cls
- loads(cdm_class, json_data, validate: bool = True, strictness: Optional[int] = None)[source]
Create an instance of a CDM class from a JSON string.
The default strictness of the Telescope Model schema validator can be overridden by supplying the validate argument.
- Parameters:
cdm_class – the class to create from the JSON
json_data – the JSON to unmarshall
validate – True to enable schema validation
strictness – optional validation strictness level (0=min, 2=max)
- Returns:
an instance of cls
ska_tmc_cdm.schemas.mccscontroller.allocate
The schemas.central_node module defines Marshmallow schemas that map MCCSController AllocateRequest message classes to/from their JSON representation.
- class AllocateRequestSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the MCCSController AllocateRequest class.
- create_allocaterequest(data, **_) AllocateRequest
Convert parsed JSON back into an AllocateRequest object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
AllocateRequest object populated from data
ska_tmc_cdm.schemas.mccscontroller.releaseresources
The releaseresources module defines Marshmallow schemas that map MCCSController ReleaseResourcesRequest objects to/from their JSON representation.
- class ReleaseResourcesRequestSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the ReleaseResourcesRequest class.
- create_request(data, **_)
Convert parsed JSON from an ReleaseResources request back into an ReleaseResourcesRequest object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
ReleaseResourcesRequest object populated from data
ska_tmc_cdm.schemas.mccssubarray.assigned_resources
The assigned_resources module defines Marshmallow schemas that maps the MCCSSubarray.assigned_resources attribute to/from a JSON representation.
- class AssignedResourcesSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the MCCSSubarray AssignedResources class.
- create_allocaterequest(data, **_) AssignedResources
Convert parsed JSON back into an AssignedResources object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
AssignedResources object populated from data
ska_tmc_cdm.schemas.mccssubarray.configure
The configure module defines Marshmallow schemas that maps the MCCSSubarray.Configure call arguments to/from a JSON representation.
- class ConfigureRequestSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the mccssubarray.ConfigureRequest class
- create(data, **_) ConfigureRequest
Convert parsed JSON back into a ConfigureRequest object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
ConfigureRequest instance populated to match JSON
- stations
alias of
StationConfigurationSchema
- subarray_beams
alias of
SubarrayBeamConfigurationSchema
- class StationConfigurationSchema(*args: Any, **kwargs: Any)[source]
- create(data, **_) StationConfiguration
Convert parsed JSON back into a StationConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
StnConfiguration instance populated to match JSON
- class SubarrayBeamConfiguration(*, subarray_beam_id: int, station_ids: list[int], update_rate: float, channels: list[list[int]], sky_coordinates: list[float], antenna_weights: list[float], phase_centre: list[float])[source]
A class to hold subarray beam configuration attributes
- Parameters:
subarray_beam_id – subarray beam ID
station_ids – station IDs
channels – channels to form subarray beam
update_rate – frequency of new Az/El during scan
sky_coordinates – Az/El specification with rates
antenna_weights – antenna weights, 1 per station
phase_centre – phase centre of subarray beam
ska_tmc_cdm.schemas.mccssubarray.scan
The schemas module defines Marshmallow schemas that map CDM message classes and data model classes to/from a JSON representation.
- class ScanRequestSchema(*args: Any, **kwargs: Any)[source]
Create the Schema for ScanRequest
- create_scanrequest(data, **_)
Convert parsed JSON back into a ScanRequest
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
ScanRequest instance populated to match JSON
ska_tmc_cdm.schemas.subarray_node
The schemas.subarray_node package contains Marshmallow schemas that convert JSON to/from the Python classes contained in ska_tmc_cdm.messages.subarray_node.
ska_tmc_cdm.schemas.subarray_node.assigned_resources
This module defines Marshmallow schemas that map CDM classes to/from JSON.
- class AssignedResourcesSchema(*args: Any, **kwargs: Any)[source]
AssignedResourcesSchema maps the AssignedResources class to/from a JSON representation.
- create_assigned_resources(data, **_)
Convert parsed JSON back into an AssignedResources object
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
AssignedResources object populated from data
- mccs
alias of
MCCSAllocationSchema
- class MCCSAllocationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the MCCSAllocation class.
- create_mccs_allocation(data, **_)
Convert parsed JSON back into a MCCSAllocation object.
- Parameters:
data – Marshmallow-provided dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
MCCSAllocation object populated from data
ska_tmc_cdm.schemas.subarray_node.configure
The schemas module defines Marshmallow schemas that map CDM message classes and data model classes to/from a JSON representation.
- class CBFConfigurationSchema(*args: Any, **kwargs: Any)[source]
- create(data, **_)
Convert parsed JSON back into a CBFConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
CBFConfiguration instance populated to match JSON
- Return type:
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for CBF configuration
- fsp_configs
alias of
FSPConfigurationSchema
- class CSPConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.CSPConfiguration class
- cbf_config
alias of
CBFConfigurationSchema
- common
alias of
CommonConfigurationSchema
- create(data, **_)
Convert parsed JSON back into a CSPConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
CSPConfiguration instance populated to match JSON
- lowcbf
alias of
LowCBFConfigurationSchema
- subarray
alias of
SubarrayConfigurationSchema
- validate_on_dump(data, **_)
Validating the structure of JSON against schemas and Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for SubArrayNode configuration
- class CommonConfigurationSchema(*args: Any, **kwargs: Any)[source]
- convert(common_configuration: CommonConfiguration, **_)
Process CommonConfiguration instance so that it is ready for conversion to JSON.
- Parameters:
CommonConfiguration – Common configuration to process
_ – kwargs passed by Marshmallow
- Returns:
CommonConfiguration instance populated to match JSON
- create(data, **_)
Convert parsed JSON back into a CSPConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
CommonConfiguration instance populated to match JSON
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for FSP configuration
- class ConfigureRequestSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.ConfigureRequest class.
- create_configuration(data, **_)
Converted parsed JSON backn into a subarray_node.ConfigureRequest object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
ConfigurationRequest instance populated to match JSON
- csp
alias of
CSPConfigurationSchema
- dish
alias of
DishConfigurationSchema
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for SubArrayNode configuration
- mccs
alias of
MCCSConfigurationSchema
- pointing
alias of
PointingSchema
- sdp
alias of
SDPConfigurationSchema
- tmc
alias of
TMCConfigurationSchema
- class DishConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.DishConfiguration class.
- convert(dish_configuration: DishConfiguration, **_)
Process DishConfiguration instance so that it is ready for conversion to JSON.
- Parameters:
dish_configuration – the dish configuration
_ – kwargs passed by Marshmallow
- Returns:
DishConfiguration instance populated to match JSON
- create_dish_configuration(data, **_)
Converted parsed JSON back into a subarray_node.DishConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
DishConfiguration instance populated to match JSON
- class FSPConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.FSPConfiguration class
- convert(fsp_configuration: FSPConfiguration, **_)
Process FSPConfiguration instance so that it is ready for conversion to JSON.
- Parameters:
fsp_configuration – FSP configuration to process
_ – kwargs passed by Marshmallow
- Returns:
FspConfiguration instance populated to match JSON
- create(data, **_)
Convert parsed JSON back into a FSPConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
FSPConfiguration instance populated to match JSON
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for FSP configuration
- class LowCBFConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.LowCBFConfiguration class
- create(data, **_)
Convert parsed JSON back into a LowCBFConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
LowCBFConfiguration instance populated to match JSON
- stations
alias of
StationConfigurationSchema
- vis
alias of
VisConfigurationSchema
- class MCCSConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.MCCSConfiguration class
- create(data, **_)
Convert parsed JSON back into a MCCSConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
MCCSConfiguration instance populated to match JSON
- Return type:
- station_configs
alias of
StnConfigurationSchema
- subarray_beam_configs
alias of
SubarrayBeamConfigurationSchema
- class PointingSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.Pointing class.
- create(data, **_)
Convert parsed JSON back into a subarray_node.Pointing object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
Pointing instance populated to match JSON
- target
alias of
TargetSchema
- class SDPConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow class for the SDPConfiguration class
- create_sdp_configuration(data, **_)
Convert parsed JSON back into a set containing all the scans :param data: dict containing parsed JSON values :param _: kwargs passed by Marshmallow :return: SDPConfiguration instance populated to match JSON
- class StnConfigurationSchema(*args: Any, **kwargs: Any)[source]
- create(data, **_)
Convert parsed JSON back into a StnConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
StnConfiguration instance populated to match JSON
- Return type:
- class SubarrayBeamConfigurationSchema(*args: Any, **kwargs: Any)[source]
- create(data, **_) SubarrayBeamConfiguration
Convert parsed JSON back into a SubarrayBeamConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SubarrayBeamConfiguration instance populated to match JSON
- target
alias of
SubarrayBeamTargetSchema
- class SubarrayConfigurationSchema(*args: Any, **kwargs: Any)[source]
- create(data, **_)
Convert parsed JSON back into a SubarrayConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SubarrayConfiguration instance populated to match JSON
- Return type:
- class TargetSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.Target class
- convert_to_icrs(target: Target, **_)
Process Target co-ordinates by converting them to ICRS frame before the JSON marshalling process begins.
- Parameters:
target – Target instance to process
_ – kwargs passed by Marshallow
- Returns:
SexagesimalTarget with ICRS ra/dec expressed in hms/dms
- create_target(data, **_)
Convert parsed JSON back into a Target object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
Target instance populated to match JSON
- omit_optional_fields_with_default_values(data, **_)
Don’t bother sending JSON fields with null/empty/default values.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for JSON serialization as a Target
ska_tmc_cdm.schemas.subarray_node.configure.core
The schemas module defines Marshmallow schemas that map shared CDM message classes for SubArrayNode configuration to/from a JSON representation.
- class ConfigureRequestSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.ConfigureRequest class.
- create_configuration(data, **_)
Converted parsed JSON backn into a subarray_node.ConfigureRequest object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
ConfigurationRequest instance populated to match JSON
- csp
alias of
CSPConfigurationSchema
- dish
alias of
DishConfigurationSchema
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for SubArrayNode configuration
- mccs
alias of
MCCSConfigurationSchema
- pointing
alias of
PointingSchema
- sdp
alias of
SDPConfigurationSchema
- tmc
alias of
TMCConfigurationSchema
- class DishConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.DishConfiguration class.
- convert(dish_configuration: DishConfiguration, **_)
Process DishConfiguration instance so that it is ready for conversion to JSON.
- Parameters:
dish_configuration – the dish configuration
_ – kwargs passed by Marshmallow
- Returns:
DishConfiguration instance populated to match JSON
- create_dish_configuration(data, **_)
Converted parsed JSON back into a subarray_node.DishConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
DishConfiguration instance populated to match JSON
- class PointingSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.Pointing class.
- create(data, **_)
Convert parsed JSON back into a subarray_node.Pointing object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
Pointing instance populated to match JSON
- target
alias of
TargetSchema
- class TargetSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.Target class
- convert_to_icrs(target: Target, **_)
Process Target co-ordinates by converting them to ICRS frame before the JSON marshalling process begins.
- Parameters:
target – Target instance to process
_ – kwargs passed by Marshallow
- Returns:
SexagesimalTarget with ICRS ra/dec expressed in hms/dms
- create_target(data, **_)
Convert parsed JSON back into a Target object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
Target instance populated to match JSON
- omit_optional_fields_with_default_values(data, **_)
Don’t bother sending JSON fields with null/empty/default values.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for JSON serialization as a Target
ska_tmc_cdm.schemas.subarray_node.configure.csp
This module defines Marshmallow schemas that map the CDM classes for SubArrayNode CSP configuration to/from JSON.
- class CBFConfigurationSchema(*args: Any, **kwargs: Any)[source]
- create(data, **_)
Convert parsed JSON back into a CBFConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
CBFConfiguration instance populated to match JSON
- Return type:
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for CBF configuration
- fsp_configs
alias of
FSPConfigurationSchema
- class CSPConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.CSPConfiguration class
- cbf_config
alias of
CBFConfigurationSchema
- common
alias of
CommonConfigurationSchema
- create(data, **_)
Convert parsed JSON back into a CSPConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
CSPConfiguration instance populated to match JSON
- lowcbf
alias of
LowCBFConfigurationSchema
- subarray
alias of
SubarrayConfigurationSchema
- validate_on_dump(data, **_)
Validating the structure of JSON against schemas and Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for SubArrayNode configuration
- class CommonConfigurationSchema(*args: Any, **kwargs: Any)[source]
- convert(common_configuration: CommonConfiguration, **_)
Process CommonConfiguration instance so that it is ready for conversion to JSON.
- Parameters:
CommonConfiguration – Common configuration to process
_ – kwargs passed by Marshmallow
- Returns:
CommonConfiguration instance populated to match JSON
- create(data, **_)
Convert parsed JSON back into a CSPConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
CommonConfiguration instance populated to match JSON
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for FSP configuration
- class FSPConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.FSPConfiguration class
- convert(fsp_configuration: FSPConfiguration, **_)
Process FSPConfiguration instance so that it is ready for conversion to JSON.
- Parameters:
fsp_configuration – FSP configuration to process
_ – kwargs passed by Marshmallow
- Returns:
FspConfiguration instance populated to match JSON
- create(data, **_)
Convert parsed JSON back into a FSPConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
FSPConfiguration instance populated to match JSON
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for FSP configuration
- class LowCBFConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.LowCBFConfiguration class
- create(data, **_)
Convert parsed JSON back into a LowCBFConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
LowCBFConfiguration instance populated to match JSON
- stations
alias of
StationConfigurationSchema
- vis
alias of
VisConfigurationSchema
- class SubarrayConfigurationSchema(*args: Any, **kwargs: Any)[source]
- create(data, **_)
Convert parsed JSON back into a SubarrayConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SubarrayConfiguration instance populated to match JSON
- Return type:
ska_tmc_cdm.schemas.subarray_node.configure.sdp
This module defines Marshmallow schemas that map the SDPConfiguration message classes to/from JSON.
- class SDPConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow class for the SDPConfiguration class
- create_sdp_configuration(data, **_)
Convert parsed JSON back into a set containing all the scans :param data: dict containing parsed JSON values :param _: kwargs passed by Marshmallow :return: SDPConfiguration instance populated to match JSON
ska_tmc_cdm.schemas.subarray_node.configure.mccs
This module defines Marshmallow schemas that map the CDM classes for SubArrayNode MCCS configuration to/from JSON.
- class MCCSConfigurationSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.MCCSConfiguration class
- create(data, **_)
Convert parsed JSON back into a MCCSConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
MCCSConfiguration instance populated to match JSON
- Return type:
- station_configs
alias of
StnConfigurationSchema
- subarray_beam_configs
alias of
SubarrayBeamConfigurationSchema
- class StnConfigurationSchema(*args: Any, **kwargs: Any)[source]
- create(data, **_)
Convert parsed JSON back into a StnConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
StnConfiguration instance populated to match JSON
- Return type:
- class SubarrayBeamConfigurationSchema(*args: Any, **kwargs: Any)[source]
- create(data, **_) SubarrayBeamConfiguration
Convert parsed JSON back into a SubarrayBeamConfiguration object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
SubarrayBeamConfiguration instance populated to match JSON
- target
alias of
SubarrayBeamTargetSchema
- class SubarrayBeamTargetSchema(*args: Any, **kwargs: Any)[source]
Marshmallow schema for the subarray_node.Target class
- create_target(data, **_)
Convert parsed JSON back into a Target object.
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
Target instance populated to match JSON
ska_tmc_cdm.schemas.subarray_node.configure.tmc
The schemas module defines Marshmallow schemas that map CDM message classes and data model classes to/from a JSON representation.
- class TMCConfigurationSchema(*args: Any, **kwargs: Any)[source]
Create the Schema for ScanDuration using timedelta
- convert_scan_duration_number_to_timedelta(data, **_)
Convert parsed JSON back into a TMConfiguration
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
TMCConfiguration instance populated to match JSON
- convert_scan_duration_timedelta_to_float(data: TMCConfiguration, **_)
Process scan_duration and convert it to a float
- Parameters:
data – the scan_duration timedelta
_ – kwargs passed by Marshallow
- Returns:
float converted
- omit_default_values_from_configuration(data, **_)
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict output for JSON serialization
ska_tmc_cdm.schemas.subarray_node.scan
The ska_tmc_cdm.schemas.subarray_node.scan module contains Marshmallow schema that map ska_tmc_cdm.schemas.subarray_node.scan message classes to/from JSON.
- class ScanRequestSchema(*args: Any, **kwargs: Any)[source]
ScanRequestSchema is the Marshmallow schema that marshals a ScanRequest to/from JSON.
- create_scanrequest(data, **_)
Convert parsed JSON back into a ScanRequest
- Parameters:
data – dict containing parsed JSON values
_ – kwargs passed by Marshmallow
- Returns:
ScanRequest instance populated to match JSON
- filter_nulls(data, **_)
Filter out null values from JSON.
- Parameters:
data – Marshmallow-provided dict containing parsed object values
_ – kwargs passed by Marshmallow
- Returns:
dict suitable for SubArrayNode configuration