ska_ost_senscalc.mid.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.mid.api.continuum_calculate(**kwargs) Tuple[ContinuumCalculateResponse | ErrorResponse, HTTPStatus][source]
Function which HTTP GET requests to /mid/continuum/calculate are routed to.
Combines the request parameters for calculator 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
ska_ost_senscalc.mid.service.ContinuumCalculateResponseor anErrorResponse) and HTTP status, which Connexion will wrap into a Response
- ska_ost_senscalc.mid.api.pss_calculate(**kwargs) Tuple[PSSSensitivityResponse | ErrorResponse, HTTPStatus][source]
Function which HTTP GET requests to /mid/pss/calculate are routed to.
Sends the request parameters to the service layer and builds a Response from the calculator output.
Note that we will reuse a lot of the continuum functions here. This because PSS does exactly the same as continuum except for a slight modification to the continuum sensitivity.
- Parameters:
kwargs – the HTTP parameters
- Returns:
a tuple of the response body (which is either a
ska_ost_senscalc.mid.service.PSSSensitivityResponseor anErrorResponse) and HTTP status, which Connexion will wrap into a Response
- ska_ost_senscalc.mid.api.subarrays()[source]
Function that GET requests to the /subarrays endpoint are mapped to.
Returns a response containing a list of available subarrays
- ska_ost_senscalc.mid.api.zoom_calculate(**kwargs) Tuple[list[SingleZoomSensitivityResponse] | ErrorResponse, HTTPStatus][source]
Function which HTTP GET requests to /mid/zoom/calculate are routed to.
Sends the requests parameters to the service layer and builds a Response from the calculator output.
- Parameters:
kwargs – the HTTP parameters
- Returns:
a tuple of the response body (which is either a
ska_ost_senscalc.mid.service.SensitivityResponseor anErrorResponse) and HTTP status, which Connexion will wrap into a Response