Source code for ska_oso_pdm.sb_definition.mccs.mccs_allocation

"""
The ska_oso_pdm.sb_definition.mccs.mccs_allocation module defines
a simple Python representation of the MCCS allocation
"""

from pydantic import Field

from ska_oso_pdm._shared import MCCSAllocationID, PdmObject, SubArrayLOW

from ..scan_definition import ScanDefinition

__all__ = ["Aperture", "MCCSAllocation", "SubarrayBeamConfiguration"]


MAX_SUBARRAY_BEAM_ID = 48
MAX_STATION_ID = 511


[docs] class Aperture(PdmObject): """ Aperture specifies how the aperture of a subarray beam should be configured. :param station_id: ID of station :param substation_id: ID of sub station :param weighting_key: weighting key value """ station_id: int = Field(ge=0, le=MAX_STATION_ID) substation_id: int weighting_key: str = "uniform"
[docs] class SubarrayBeamConfiguration(PdmObject): """ SubarrayBeamConfiguration specifies how SKA LOW sub-array should be configured. :param apertures: list of aperture in this subarray :param subarray_beam_id: ID of subarray beam this config maps to :param scan_sequence: a list of ScanDefinitions that this SubarrayBeam will perform. Note the number of ScanDefinitions and the duration of each them should be the same for each SubarrayBeam in the SBDefinition """ apertures: list[Aperture] = Field(default_factory=list) subarray_beam_id: int = Field(ge=1, le=MAX_SUBARRAY_BEAM_ID) scan_sequence: list[ScanDefinition] = Field(default_factory=list)
[docs] class MCCSAllocation(PdmObject): """ MCCSAllocation is a Python representation of the MCCS allocation segment of a scheduling block. :param mccs_allocation_id: stations ID's to allocate :param selected_subarray_definition: name of pre-defined/standard configuration :param subarray_beams: subarray beam list """ mccs_allocation_id: MCCSAllocationID selected_subarray_definition: SubArrayLOW subarray_beams: list[SubarrayBeamConfiguration] = Field(default_factory=list)