Observing Constraints Validation module (ska_oso_services.validation.constraints)
- class ska_oso_services.validation.constraints.TargetLSTConstraints(target: ska_oso_pdm.Target, lst_constraint: ska_oso_pdm.sb_definition.LSTConstraint)[source]
- class ska_oso_services.validation.constraints.TargetElevation(min: astropy.units.Quantity, max: astropy.units.Quantity, mid: astropy.units.Quantity)[source]
- ska_oso_services.validation.constraints.validate_constraints(constraints_context: ValidationContext[ska_oso_pdm.sb_definition.ObservingConstraints]) list[ValidationIssue][source]
- param constraints_context: a ValidationContext containing ObserveringConstraints
object to be validated
- return: the collated list of ValidationIssues resulting from applying each of the
relevant ObservingConstraints validators
- ska_oso_services.validation.constraints.validate_icrs_galactic_target_elevation_limits_are_within_their_lst_constraint(constraints_context: ValidationContext) list[ValidationIssue][source]
function to check that the targets in the scans have an elevation above the limit set in the constraints throughout their individual LST windows
- :param constraints_context:a ValidationContext containing an Observing
Constraint to be validated
- Returns:
a list of validation issues if the targets exceed the elevation limits
- ska_oso_services.validation.constraints.validate_sso_targets_do_not_have_separation_constraints(constraints_context: ValidationContext[ska_oso_pdm.sb_definition.ObservingConstraints]) list[ValidationIssue][source]
function to check that e.g. an observation of Jupiter does not have a jupiter separation constraint
- :param constraints_context:a ValidationContext containing an Observing
Constraint to be validated
- Returns:
a list of validation issues if the targets and separation constraints are incompatible
- ska_oso_services.validation.constraints.calculate_elevation_implied_from_lst_constraint(telescope: ska_oso_pdm.TelescopeType, target: ska_oso_pdm.Target, lst_constraint: ska_oso_pdm.sb_definition.LSTConstraint) TargetElevation[source]
private function to calculate the altitude of a target at a given hourangle and telescope
- ska_oso_services.validation.constraints.create_target_lst_list(targets: list[ska_oso_pdm.Target], scan_definitions: list[ska_oso_pdm.sb_definition.ScanDefinition] | list[list[ska_oso_pdm.sb_definition.ScanDefinition]], sbd_lst_constraint: ska_oso_pdm.sb_definition.LSTConstraint) list[TargetLSTConstraints][source]
the LST constraint in the SBD is for starting the SBD, therefore each target has its own LST window during which it must be validated; a target that might not have risen when the SBD is executed may well be valid when its own scan commences. This function is to create an LSTConstraint for each target, based on the window when its scan will be executed