ska_ost_senscalc.mid.service
The service layer is responsible for turning validated inputs into the relevant calculation inputs, calling any calculation functions and collating the results.
- class ska_ost_senscalc.mid.service.ContinuumSensitivityResponse[source]
Typed dictionary constrained to match the OpenAPI schema for the response body of a single continuum sensitivity calculation.
- class ska_ost_senscalc.mid.service.SingleZoomBaseResponse(freq_centre: ~astropy.units.quantity.Quantity, spectropolarimetry_results: ~ska_ost_senscalc.common.spectropolarimetry.SpectropolarimetryResults, warnings: list[str] = <factory>)[source]
Base data class constrained to match the OpenAPI schema for the response body of a single zoom sensitivity or integration time calculation.
- class ska_ost_senscalc.mid.service.SingleZoomIntegrationTimeResponse(freq_centre: ~astropy.units.quantity.Quantity, spectropolarimetry_results: ~ska_ost_senscalc.common.spectropolarimetry.SpectropolarimetryResults, warnings: list[str] = <factory>, spectral_integration_time: ~astropy.units.quantity.Quantity | None = None)[source]
Dataclass constrained to match the OpenAPI schema for the response body of a single zoom integration time calculation.
- class ska_ost_senscalc.mid.service.SingleZoomSensitivityResponse(freq_centre: ~astropy.units.quantity.Quantity, spectropolarimetry_results: ~ska_ost_senscalc.common.spectropolarimetry.SpectropolarimetryResults, warnings: list[str] = <factory>, spectral_sensitivity: ~astropy.units.quantity.Quantity | None = None)[source]
Dataclass constrained to match the OpenAPI schema for the response body of a single zoom sensitivity calculation.
- ska_ost_senscalc.mid.service.calculate_pss_sensitivity(params: PssRequestMid) Quantity[source]
Transform the continuum sensitivity to PSS sensitivity for a given set of PSS-specific input parameters.
- ska_ost_senscalc.mid.service.convert_continuum_input_and_calculate(params: ContinuumRequest) dict[source]
Perform the calculations, weightings and weighted results. Then collect them into the response body.
- ska_ost_senscalc.mid.service.get_subarray_response()[source]
return the appropriate subarray objects
- ska_ost_senscalc.mid.service.get_zoom_calculate_response(params: ZoomRequestPrepared) dict[source]
Extract the params from the request, convert them into the relevant calculator inputs, perform the calculations and collect the results into the response body.