ska_ost_senscalc.low.service

The service layer is responsible for turning validated inputs into the relevant calculation inputs, calling any calculation functions and collating the results.

ska_ost_senscalc.low.service.convert_continuum_input_and_calculate(calc_weight_input: ContinuumCalculatorAndWeightingInput) → ContinuumSensitivityResponse[source]
Parameters:

user_input – A ContinuumCalculatorAndWeightingInput object containing the parameters sent by the user having been validated and converted for the calculator and weighting calculations.

Returns:

a SensitivityResponse with the calculated sensitivity and its units along with weighting results and the transformed results containing the results combining calculate and weighting results in a format easily usable by the UI.

ska_ost_senscalc.low.service.convert_pss_input_and_calculate(user_input: dict) → PSSSensitivityResponse[source]
Parameters:

user_input – A kwarg dict of the HTTP parameters sent by the user

Returns:

a dict containing the calculated sensitivity and its units

ska_ost_senscalc.low.service.convert_zoom_input_and_calculate(params: ZoomCalculatorAndWeightingInput) → list[ZoomSensitivityResponse][source]
Parameters:

user_input – A kwarg dict of the HTTP parameters sent by the user

Returns:

a dict containing the calculated sensitivity and its units

ska_ost_senscalc.low.service.get_subarray_response()[source]

return the appropriate subarray objects

ska_ost_senscalc.low.service.lookup_a_over_t_service(start_freq_mhz: float, stop_freq_mhz: float, step_freq_mhz: float = 1.0, num_stations: int | None = None, az: float | None = None, el: float | None = None, start_lst: float | None = None, end_lst: float | None = None) → list[source]

Service function for the lookup_a_over_t endpoint. Returns a list of dicts with freq_mhz and a_over_t for the requested frequency range and parameters.

ska_ost_senscalc.low.service.lookup_stokes_i_sefd_service(start_freq_mhz: float, stop_freq_mhz: float, step_freq_mhz: float = 1.0, num_stations: int | None = None, az: float | None = None, el: float | None = None, start_lst: float | None = None, end_lst: float | None = None) → list[source]

Service function for the lookup_stokes_i_sefd endpoint. Returns a list of dicts with freq_mhz and sefd for the requested frequency range and parameters.