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