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(*args: Any, **kwargs: Any)[source]

AssignResourcesRequest is a Python representation of the structured argument for a TMC CentralNode.AssignResourcesRequest request.

Parameters:
Raises:

ValueError – if mccs is allocated with dish and sdp_config

classmethod from_dish(subarray_id: int, dish_allocation: DishAllocation, sdp_config: SDPConfiguration | None = None, interface: str | None = None, transaction_id: str | None = 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: SDPConfiguration | None = None, interface: str | None = None, transaction_id: str | None = 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(*args: Any, **kwargs: Any)[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(*args: Any, **kwargs: Any)[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

  • 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.

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

DishAllocation represents the DISH allocation part of an AssignResources request and response.

Parameters:

receptor_ids – (optional) IDs of the receptors to add to this allocation

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(*args: Any, **kwargs: Any)[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

  • visibility_beam_id – visibility_beam_id

class Channel(*args: Any, **kwargs: Any)[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(*args: Any, **kwargs: Any)[source]

Class to hold Dependencies for Channel Configuration

Parameters:
  • channels_id – channels_id

  • spectral_windows – spectral_windows

class EBScanType(*args: Any, **kwargs: Any)[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(*args: Any, **kwargs: Any)[source]

Class to hold EBScanTypeBeam Configuration

Parameters:
  • field_id – field_id

  • channels_id – channels_id

  • polarisations_id – polarisations_id

class ExecutionBlockConfiguration(*args: Any, **kwargs: Any)[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(*args: Any, **kwargs: Any)[source]

Class to hold Field configuration

Parameters:
  • field_id – field_id

  • pointing_fqdn – pointing_fqdn

  • phase_dir – Phase direction

class PbDependency(*args: Any, **kwargs: Any)[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(*args: Any, **kwargs: Any)[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(*args: Any, **kwargs: Any)[source]

Class to hold Dependencies for Polarisation Configuration

Parameters:
  • polarisations_id – Polarisation definitions id

  • corr_type – corr_type

class ProcessingBlockConfiguration(*args: Any, **kwargs: Any)[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(*args: Any, **kwargs: Any)[source]

Class to hold SDP Configuration

Parameters:
  • interface – url string to determine JsonSchema version

  • transaction_id – string ID for tracking requests

  • processing_blocks – A Processing Block is an atomic unit of data processing for the purpose of SDP’s internal scheduler

  • execution_block – execution_block

  • resources – resources

class SDPWorkflow(*args: Any, **kwargs: Any)[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(*args: Any, **kwargs: Any)[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.

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

Class to hold ScriptConfiguration

Parameters:
  • name – The name of the processing script

  • kind – The kind of processing script

  • version – Version of the processing script

ska_tmc_cdm.messages.central_node.mccs

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

ApertureConfiguration is a Python representation of the structured argument for a TMC CentralNode.AssignResourcesRequest.

Parameters:
  • station_id – station id to allocate

  • aperture_id – aperture id to allocate

class MCCSAllocate(*args: Any, **kwargs: Any)[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

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

SubArrayBeamsConfiguration is a Python representation of the structured argument for a TMC CentralNode.AssignResourcesRequest.

Parameters:
  • subarray_beam_ids – beam id’s to allocate

  • apertures – list of ApertureConfiguration objects

  • number_of_channels – number of channels 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(*args: Any, **kwargs: Any)[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.

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

ReleaseResourcesRequest is the object representation of the JSON argument for an MCCSController.ReleaseResources command.

ska_tmc_cdm.messages.mccssubarray.assigned_resources

class AssignedResources(*args: Any, **kwargs: Any)[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(*args: Any, **kwargs: Any)[source]

Class to hold all subarray configuration.

Parameters:
  • stations – a list of station configurations

  • subarray_beams – a list of subarray beam configurations

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

A class to hold station configuration

Parameters:

station_id – stations id

class SubarrayBeamConfiguration(*args: Any, **kwargs: Any)[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.

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

ScanRequest represents the request argument for MCCSSubarray.Scan call.

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(*args: Any, **kwargs: Any)[source]

AssignedResources models the structured JSON returned when the MCCSSubarray.assigned_resources Tango attribute is read.

Parameters:
is_empty() bool[source]

Determine that the current MCCSAllocation instance is empty (none of the attribute Lists are populated)

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

MCCSAllocation is a Python representation of the structured JSON representing the resources assigned to an MCCS subarray.

Parameters:
  • subarray_beam_ids (List[int]) – the lisdt of SubArray Beam IDs

  • station_ids (List[int]) – stations id’s to MCCSAllocation

  • channel_blocks (List[int]) – channel_blocks

is_empty() bool[source]

Determine that the current MCCSAllocation instance is empty (none of the attribute Lists are populated)

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(*args: Any, **kwargs: Any)[source]

ConfigureRequest encapsulates the arguments required for the TMC SubArrayNode.Configure() command.

Parameters:

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 FK5Target(*args: Any, **kwargs: Any)[source]
class ICRSTarget(*args: Any, **kwargs: Any)[source]
class PointingConfiguration(*args: Any, **kwargs: Any)[source]

PointingConfiguration specifies where the subarray receptors are going to point.

class PointingCorrection(value)[source]

Operation to apply to the pointing correction model. MAINTAIN: continue applying the current pointing correction model UPDATE: wait for (if necessary) and apply new pointing calibration solution RESET: reset the applied pointing correction to the pointing model defaults

class ReceiverBand(value)[source]

ReceiverBand is an enumeration of SKA MID receiver bands.

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

alias of ICRSTarget

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 BeamsConfiguration(*args: Any, **kwargs: Any)[source]

Class to hold PST Beams Configuration.

Parameters:
  • pst_beam_id – pst_beam_id

  • stn_beam_id – stn_beam_id

  • stn_weights – stn_weights

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

DEPRECATED, future work should make use of MidCBFConfiguration

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(*args: Any, **kwargs: Any)[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

  • common – the common CSP elements to set

  • cbf_config – the CBF configurations to set [DEPRECATED]

  • midcbf – the MID CBF configurations to set

  • lowcbf – the LOW CBF configurations to set

  • pst_config – the PST configurations to set

  • pss_config – the PSS configurations to set

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

Class to hold the CSP sub-elements.

Parameters:
  • config_id – CSP configuration ID

  • frequency_band – the frequency band to set

  • subarray_id – subarray_id

  • band_5_tuning – band 5 receiver to set (optional)

  • eb_id – eb_id

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

Class to hold Correlation Configuration.

Parameters:

processing_regions – processing_regions

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

DEPRECATED IN CSP CONFIGURE SCAN 4.0

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 FSPFunctionMode(value)[source]

FSPFunctionMode is an enumeration of the available FSP modes.

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

Class to hold Low CBF Configuration.

Parameters:
  • stations – stations

  • vis – vis

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

Class to hold all FSP and VLBI configurations.

Note: frequency band offset (FBO) Bands 1 and 2 should be specified for Stream 1 only. Bands 5a and 5b input from the receptor consists of two data streams (1 and 2)

Parameters:
  • frequency_band_offset_stream1 – a specified offset so that the entire observed band is shifted in Hz

  • frequency_band_offset_stream2 – a specified offset so that the entire observed band is shifted in Hz

  • correlation – correlation specific parameters

  • vlbi_config – the VLBI configurations to set, it is optional

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

Class to hold PST configuration items :param beam: List of beam configurations :param config_id: configuration id :param cheetah: cheetah pipeline configuration :param ddtr: ddtr configuration :param sps: sps configuration

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

Class to hold Processing Region Configuration.

Parameters:
  • fsp_ids – fsp_ids

  • receptors – receptors

  • start_freq – start_freq

  • channel_width – channel_width

  • channel_count – channel_count

  • integration_factor – integration_factor

  • sdp_start_channel_id – sdp_start_channel_id

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

Class to hold Search Beams.

Parameters:
  • pss_beam_id – pss_beam_id

  • stn_beam_id – stn_beam_id

  • stn_weights – stn_weights

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

Class to hold SearchBeams Configuration.

Parameters:
  • firmware – firmware

  • beams – beams

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

Class to hold Stations Configuration.

Parameters:
  • stns – stns

  • stn_beams – stn_beams

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

Class to hold Stations Beam Configuration.

Parameters:
  • stn_beam_id – stn_beam_id

  • beam_id – beam_id

  • freq_ids – freq_ids

  • delay_poly – delay_poly

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

Class to hold the parameters relevant only for the current sub-array device.

Parameters:

sub-array_name – Name of the sub-array

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

Class to hold TimingBeams Configuration.

Parameters:
  • fsp – fsp

  • firmware – firmware

  • beams – beams

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

Class to hold Vis Configuration firmware

Parameters:
  • fsp – fsp

  • stn_beams – stn_beams

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

Class to hold Visibility(Vis) Configuration.

Parameters:
  • function_mode – function_mode

  • fsp_ids – fsp_ids

  • firmware – firmware

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

Class to hold Vis Stations Beam Configuration.

Parameters:
  • stn_beam_id – stn_beam_id

  • host – host

  • port – port

  • mac – mac

  • integration_ms – integration_ms

ska_tmc_cdm.messages.subarray_node.configure.dish

Python model of the Dish configure JSON schema “https://schema.skao.int/ska-dish-configure/1.0”.

Descriptions are copied from the schema implementation. For validation consistent with ska-telmodel, validation is not coded in the Pydantic model but enforced at serialisation time via the ska-telmodel schema.

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

DishConfiguration specifies how SKA MID dishes in a sub-array should be configured.

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

PeriodicNoiseGenerator maps the ‘Periodic’ subschema of Dish configure v1.0.

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

PseudoRandomNoiseGenerator maps the ‘PseudoRandom’ noise diode subschema of Dish configure v1.0.

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

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.

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

Message class to hold SDP configuration aspect of a TMC SubArrayNode.Configure call.

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(*args: Any, **kwargs: Any)[source]

Class to hold all subarray configuration. :param subarray_beam_configs: a list of subarray beam configurations :type subarray_beam_configs: List[SubarrayBeamConfiguration]

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

A class to hold Subarray Beam aperatures configuration items :param aperture_id: Aperture ID. :type aperture_id: str :param weighting_key_ref: Descriptive ID for the aperture weights in the aperture database. :type weighting_key_ref: str :param calibration_id: Calibration ID. :type calibration_id: str

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

A class to hold subarray_beam configuration attributes

Parameters:
  • subarray_beam_id (int) – stationbeam’s id

  • update_rate (float) – frequency of new Az/El during scan

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

A class to hold Subarray Beam logical bands configuration items :param start_channel: Start channel value. :type start_channel: str :param number_of_channels: No of channels :type number_of_channels: str

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

A class to hold Subarray Beam sky coordinates configuration items :param reference_frame: Must be one of: [“topocentric”, “ICRS”, “galactic”] :type reference_frame: str :param c1: first coordinate, RA or azimuth, in degrees :type c1: float :param c2: second coordinate, RA or azimuth, in degrees :type c2: float

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.

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

Class to hold TMC configuration

Parameters:

scan_duration – Elapsed time for the scan

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(*args: Any, **kwargs: Any)[source]

ScanRequest represents the JSON for a SubArrayNode.scan call.

Parameters:

ska_tmc_cdm.schemas

The schemas for the SKA Configuration Data Model (CDM).

ska_tmc_cdm.schemas.codec

This module contains a Codec class that provides a public interface for clients to de/serialise CDM classes from/to JSON. Basically this spares clients having to remember to pass all the arguments to model_dump()

ska_tmc_cdm.schemas.shared

This module contains high-level functions that invoke validation against the telmodel schemas.

semantic_validate_json(data, process_fn=<function _identity>, **_)[source]

Validate JSON using the Telescope Model schema.

The process_fn argument can be used to process semantically correct but schematically invalid Python to something equivalent but valid, e.g., to convert a list of Python tuples to a list of lists.

Parameters:
  • data – Jsonable dict containing parsed object values

  • process_fn – data processing function called before validation

Returns:

validate_json(data: dict, process_fn: ~typing.Callable = <function _identity>, strictness: int | None = None)[source]

Validate JSON using the Telescope Model schema.

The process_fn argument can be used to process semantically correct but schematically invalid Python to something equivalent but valid, e.g., to convert a list of Python tuples to a list of lists.

Parameters:
  • data – Dict containing parsed object values

  • process_fn – data processing function called before validation

Returns: