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) → <sphinx.ext.autodoc.importer._MockObject object at 0x7ff4b54a3610>[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
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 errorsParameters: - 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.
-
static
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: int = None, dish_allocation: ska_tmc_cdm.messages.central_node.common.DishAllocation = None, sdp_config: ska_tmc_cdm.messages.central_node.sdp.SDPConfiguration = None, mccs: ska_tmc_cdm.messages.central_node.mccs.MCCSAllocate = None, interface: str = None, transaction_id: str = None)[source]¶ AssignResourcesRequest is a Python representation of the structured argument for a TMC CentralNode.AssignResourcesRequest request.
-
classmethod
from_dish
(subarray_id: int, dish_allocation: ska_tmc_cdm.messages.central_node.common.DishAllocation, sdp_config: ska_tmc_cdm.messages.central_node.sdp.SDPConfiguration = None, interface: str = None, transaction_id: str = None)[source]¶ Create a new AssignResourcesRequest object.
Parameters: - subarray_id – the numeric SubArray ID (1..16)
- dish_allocation – object holding the DISH resource allocation for this request.
- sdp_config – sdp configuration
Returns: AssignResourcesRequest object
-
classmethod
from_mccs
(subarray_id: int, mccs: ska_tmc_cdm.messages.central_node.mccs.MCCSAllocate, sdp_config: ska_tmc_cdm.messages.central_node.sdp.SDPConfiguration = None, interface: str = None, transaction_id: 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
-
classmethod
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: str = None, transaction_id: str = None, subarray_id: int = None, release_all: bool = False, dish_allocation: Optional[ska_tmc_cdm.messages.central_node.common.DishAllocation] = None)[source]¶ ReleaseResourcesRequest is a Python representation of the structured request for a TMC CentralNode.ReleaseResources call.
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
SDPWorkflow
(name: str, kind: str, version: str)[source]¶ Class to hold SDPWorkflows for ProcessingBlock
-
class
SDPConfiguration
(eb_id: str, max_length: float, scan_types: List[ska_tmc_cdm.messages.central_node.sdp.ScanType], processing_blocks: List[ska_tmc_cdm.messages.central_node.sdp.ProcessingBlockConfiguration], interface: str = None)[source]¶ Class to hold SDPConfiguration
-
class
ProcessingBlockConfiguration
(pb_id: str, workflow: ska_tmc_cdm.messages.central_node.sdp.SDPWorkflow, parameters: Dict[KT, VT], dependencies: List[ska_tmc_cdm.messages.central_node.sdp.PbDependency] = None)[source]¶ Class to hold ProcessingBlock configuration
-
class
PbDependency
(pb_id: str, pb_type: List[str])[source]¶ Class to hold Dependencies for ProcessingBlock
ska_tmc_cdm.messages.central_node.mccs¶
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: Optional[str] = 'https://schema.skao.int/ska-low-mccs-assignresources/2.0', subarray_id: int, subarray_beam_ids: List[int] = None, station_ids: List[List[int]] = None, channel_blocks: List[int] = None)[source]¶ AssignResourcesRequest is the object representation of the JSON argument for an MCCSController.Allocate command.
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: Optional[str] = 'https://schema.skao.int/ska-low-mccs-assignedresources/2.0', subarray_beam_ids: List[int] = None, station_ids: List[List[int]] = None, channel_blocks: List[int] = None)[source]¶ AssignedResources is the object representation of the JSON returned by the MCCSSubarray.assigned_resources attribute.
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: Optional[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.
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
MCCSAllocation
(subarray_beam_ids: List[int], station_ids: List[List[int]], channel_blocks: List[int])[source]¶ MCCSAllocation is a Python representation of the structured JSON representing the resources assigned to an MCCS subarray.
-
class
AssignedResources
(*, interface: Optional[str] = 'https://schema.skao.int/ska-low-tmc-assignedresources/2.0', mccs: ska_tmc_cdm.messages.subarray_node.assigned_resources.MCCSAllocation)[source]¶ AssignedResources models the structured JSON returned when the MCCSSubarray.assigned_resources Tango attribute is read.
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: ska_tmc_cdm.messages.subarray_node.configure.core.PointingConfiguration = None, dish: ska_tmc_cdm.messages.subarray_node.configure.core.DishConfiguration = None, sdp: ska_tmc_cdm.messages.subarray_node.configure.sdp.SDPConfiguration = None, csp: ska_tmc_cdm.messages.subarray_node.configure.csp.CSPConfiguration = None, mccs: ska_tmc_cdm.messages.subarray_node.configure.mccs.MCCSConfiguration = None, tmc: ska_tmc_cdm.messages.subarray_node.configure.tmc.TMCConfiguration = None, interface: Optional[str] = 'https://schema.skao.int/ska-tmc-configure/2.0', transaction_id: Optional[str] = None)[source]¶ ConfigureRequest encapsulates the arguments required for the TMC SubArrayNode.Configure() command.
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
PointingConfiguration
(target: ska_tmc_cdm.messages.subarray_node.configure.core.Target)[source]¶ PointingConfiguration specifies where the subarray receptors are going to point.
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
CSPConfiguration
(interface: str = None, subarray_config: ska_tmc_cdm.messages.subarray_node.configure.csp.SubarrayConfiguration = None, common_config: ska_tmc_cdm.messages.subarray_node.configure.csp.CommonConfiguration = None, cbf_config: ska_tmc_cdm.messages.subarray_node.configure.csp.CBFConfiguration = None, pst_config: ska_tmc_cdm.messages.subarray_node.configure.csp.PSTConfiguration = None, pss_config: ska_tmc_cdm.messages.subarray_node.configure.csp.PSSConfiguration = None)[source]¶ Class to hold all CSP configuration.
-
class
FSPConfiguration
(fsp_id: int, function_mode: ska_tmc_cdm.messages.subarray_node.configure.csp.FSPFunctionMode, frequency_slice_id: int, integration_factor: int, zoom_factor: int, channel_averaging_map: List[Tuple] = None, output_link_map: List[Tuple] = None, channel_offset: int = None, zoom_window_tuning: int = None)[source]¶ FSPConfiguration defines the configuration for a CSP Frequency Slice Processor.
-
class
CBFConfiguration
(fsp_configs: List[ska_tmc_cdm.messages.subarray_node.configure.csp.FSPConfiguration], vlbi_config: ska_tmc_cdm.messages.subarray_node.configure.csp.VLBIConfiguration = None)[source]¶ Class to hold all FSP and VLBI configurations.
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[ska_tmc_cdm.messages.subarray_node.configure.mccs.StnConfiguration], subarray_beam_configs: List[ska_tmc_cdm.messages.subarray_node.configure.mccs.SubarrayBeamConfiguration])[source]¶ Class to hold all subarray configuration.
-
class
StnConfiguration
(station_id: int)[source]¶ A class to hold station configuration configuration
-
class
SubarrayBeamConfiguration
(subarray_beam_id: int, station_ids: List[int], channels: List[List[int]], update_rate: float, target: ska_tmc_cdm.messages.subarray_node.configure.mccs.SubarrayBeamTarget, antenna_weights: List[float], phase_centre: List[float])[source]¶ A class to hold subarray_beam configuration attributes
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.
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, **kwargs)[source]¶ Marshmallow schema for the AssignResourcesRequest class.
-
class
AssignResourcesResponseSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the AssignResourcesResponse class.
-
create_response
(data, **_)[source]¶ 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
-
-
class
ReleaseResourcesRequestSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the ReleaseResourcesRequest class.
-
create_request
(data, **_)[source]¶ 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
-
filter_args
(data, **_)[source]¶ Filter Marshmallow’s JSON based on the value of release_all.
If release_all is True, other resource definitions should be stripped from the request. If release_all for MID set to False, the ‘release_all’ key itself should be stripped. If release_all_low for LOW set to False, the ‘release_all_low’ key itself should be stripped.
Parameters: - data – Marshmallow-provided dict containing parsed object values
- _ – kwargs passed by Marshmallow
Returns: dict suitable for request submission
-
-
class
DishAllocationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the DishAllocation class.
-
class
DishAllocationResponseSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the DishAllocation class when received in the response.
-
create
(data, **_)[source]¶ 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
SDPConfigurationSchema
(*args, **kwargs)[source]¶ Marsmallow class for the SDPConfiguration class
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, **kwargs)[source]¶ Marshmallow schema for the AssignResourcesRequest class.
-
class
AssignResourcesResponseSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the AssignResourcesResponse class.
-
create_response
(data, **_)[source]¶ 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
-
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
DishAllocationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the DishAllocation class.
-
class
DishAllocationResponseSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the DishAllocation class when received in the response.
-
create
(data, **_)[source]¶ 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
-
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
SDPWorkflowSchema
(*args, **kwargs)[source]¶ Represents the type of workflow being configured on the SDP
-
class
ProcessingBlockSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the ProcessingBlock class.
-
class
SDPConfigurationSchema
(*args, **kwargs)[source]¶ Marsmallow class for the SDPConfiguration class
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.
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, **kwargs)[source]¶ Marshmallow schema for the MCCSController AllocateRequest class.
-
create_allocaterequest
(data, **_) → ska_tmc_cdm.messages.mccscontroller.allocate.AllocateRequest[source]¶ 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.
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, **kwargs)[source]¶ Marshmallow schema for the MCCSSubarray AssignedResources class.
-
create_allocaterequest
(data, **_) → ska_tmc_cdm.messages.mccssubarray.assigned_resources.AssignedResources[source]¶ 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, **kwargs)[source]¶ Marshmallow schema for the mccssubarray.ConfigureRequest class
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.
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
MCCSAllocationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the MCCSAllocation class.
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
ConfigureRequestSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.ConfigureRequest class.
-
class
DishConfigurationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.DishConfiguration class.
-
convert
(dish_configuration: ska_tmc_cdm.messages.subarray_node.configure.core.DishConfiguration, **_)[source]¶ 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
-
-
class
PointingSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.Pointing class.
-
class
TargetSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.Target class
-
convert_to_icrs
(target: ska_tmc_cdm.messages.subarray_node.configure.core.Target, **_)[source]¶ 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
-
-
class
CSPConfigurationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.CSPConfiguration class
-
class
SubarrayConfigurationSchema
(*args, **kwargs)[source]¶
-
class
CommonConfigurationSchema
(*args, **kwargs)[source]¶ -
convert
(common_configuration: ska_tmc_cdm.messages.subarray_node.configure.csp.CommonConfiguration, **_)[source]¶ 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
-
-
class
CBFConfigurationSchema
(*args, **kwargs)[source]¶
-
class
FSPConfigurationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.FSPConfiguration class
-
convert
(fsp_configuration: ska_tmc_cdm.messages.subarray_node.configure.csp.FSPConfiguration, **_)[source]¶ 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
-
-
class
SDPConfigurationSchema
(*args, **kwargs)[source]¶ Marshmallow class for the SDPConfiguration class
-
class
MCCSConfigurationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.MCCSConfiguration class
-
create
(data, **_)[source]¶ - 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:
-
filter_nulls_and_validate_schema
(data, **_)[source]¶ 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
StnConfigurationSchema
(*args, **kwargs)[source]¶
-
class
SubarrayBeamConfigurationSchema
(*args, **kwargs)[source]¶ -
create
(data, **_) → ska_tmc_cdm.messages.subarray_node.configure.mccs.SubarrayBeamConfiguration[source]¶ - 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
-
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, **kwargs)[source]¶ Marshmallow schema for the subarray_node.ConfigureRequest class.
-
class
DishConfigurationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.DishConfiguration class.
-
convert
(dish_configuration: ska_tmc_cdm.messages.subarray_node.configure.core.DishConfiguration, **_)[source]¶ 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
-
-
class
PointingSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.Pointing class.
-
class
TargetSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.Target class
-
convert_to_icrs
(target: ska_tmc_cdm.messages.subarray_node.configure.core.Target, **_)[source]¶ 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
-
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
CSPConfigurationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.CSPConfiguration class
-
class
FSPConfigurationSchema
(*args, **kwargs)[source]¶ Marshmallow schema for the subarray_node.FSPConfiguration class
-
convert
(fsp_configuration: ska_tmc_cdm.messages.subarray_node.configure.csp.FSPConfiguration, **_)[source]¶ 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
-
-
class
SubarrayConfigurationSchema
(*args, **kwargs)[source]¶
-
class
CommonConfigurationSchema
(*args, **kwargs)[source]¶ -
convert
(common_configuration: ska_tmc_cdm.messages.subarray_node.configure.csp.CommonConfiguration, **_)[source]¶ 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
-
ska_tmc_cdm.schemas.subarray_node.configure.sdp¶
This module defines Marshmallow schemas that map the SDPConfiguration message classes to/from 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, **kwargs)[source]¶ Marshmallow schema for the subarray_node.MCCSConfiguration class
-
create
(data, **_)[source]¶ - 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:
-
filter_nulls_and_validate_schema
(data, **_)[source]¶ 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
StnConfigurationSchema
(*args, **kwargs)[source]¶
-
class
SubarrayBeamConfigurationSchema
(*args, **kwargs)[source]¶ -
create
(data, **_) → ska_tmc_cdm.messages.subarray_node.configure.mccs.SubarrayBeamConfiguration[source]¶ - 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
-
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, **kwargs)[source]¶ Create the Schema for ScanDuration using timedelta
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, **kwargs)[source]¶ ScanRequestSchema is the Marshmallow schema that marshals a ScanRequest to/from JSON.