ska_ost_senscalc.low.api

These functions map to the API paths, with the returned value being the API response

Connexion maps the function name to the operationId in the OpenAPI document path

ska_ost_senscalc.low.api.continuum_calculate(**kwargs) Tuple[ContinuumSensitivityCalculateResponse | ErrorResponse, HTTPStatus][source]

HTTP GET request handler for /api/low/continuum/calculate endpoint.

Combines the request parameters for xcalculator and weighting calculations and returns a dictionary with the sensitivities, the weighting continuum and spectral results, and the transformed results which combine sensitivity with the weighting results for the respective spectral mode into a format easy to use for the front-end.

Parameters:

kwargs – the HTTP parameters

Returns:

a tuple of the response body (which is either a ContinuumCalculateResponse or an ErrorResponse) and HTTP status, which Connexion will wrap into a Response

ska_ost_senscalc.low.api.pss_calculate(**kwargs) Tuple[PSSSensitivityResponse | ErrorResponse, HTTPStatus][source]

Function which HTTP GET requests to /api/low/pss/calculate are routed to.

Parameters:

kwargs – the HTTP parameters

Returns:

a tuple of the response body (which is either a ska_ost_senscalc.low.service.SensitivityResponse or an ErrorResponse) and HTTP status, which Connexion will wrap into a Response

ska_ost_senscalc.low.api.subarrays()[source]

Function that GET requests to the /api/low/subarrays are routed to.

Returns a response containing a list of available subarrays

ska_ost_senscalc.low.api.zoom_calculate(**kwargs) Tuple[ZoomSensitivityResponse | ErrorResponse, HTTPStatus][source]

HTTP GET request handler for /api/low/zoom/calculate endpoint. Combines the request parameters from calculate and weighting calls and creates a dictionary with the responses from the original combined requests, so it can be used to calculate the transformed results for low zoom. It then combines and transforms the responses into the results returned to the UI, which is returned along the weighting response and the warnings from the original calculate response.

Parameters:

kwargs – the HTTP parameters

Returns:

a tuple of the response body (which is either a ska_ost_senscalc.low.service.ZoomSensitivityResponse or an ErrorResponse) and HTTP status, which Connexion will wrap into a Response