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.

class ska_ost_senscalc.low.service.BeamSizeResponse[source]

BeamSizeResponse is a typed dictionary constrained to match the schema of the JSON object outlining the synthesized beam size, as contained in the parent JSON result of a weighting endpoint query.

class ska_ost_senscalc.low.service.SensitivityResponse[source]

SensitivityResponse is a typed dictionary constrained to match the schema of a single sensitivity calculation.

class ska_ost_senscalc.low.service.WeightingResponse[source]

SingleWeightingResponse is a typed dictionary constrained to match the schema of a single weighting calculation, as performed for the main continuum or zoom weighting calculation and for each chunk frequency. Child SingleWeightingResponse JSON object for each of these calculations are contained in the parent JSON result

ska_ost_senscalc.low.service.convert_beam_input_and_get_weighting(params: WeightingQuery) WeightingResponse[source]

Calculate the beam weighting from the given beam parameters.

Input arguments and external state are not modified by this function.

ska_ost_senscalc.low.service.convert_continuum_input_and_calculate(user_input: dict) SensitivityResponse[source]
Parameters:

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

Returns:

a SensitivityResponse containing the calculated sensitivity and its units

ska_ost_senscalc.low.service.convert_zoom_input_and_calculate(user_input: dict) SensitivityResponse[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