read_response#
- muse.instrument.utils.read_response(
- response_file,
- *,
- logT=None,
- vdop=None,
- slit=None,
- logT_method='nearest',
- vdop_method='nearest',
- gain=<Quantity 10. electron / DN>,
Reads a response function into an
xarray.Datasetinterpolating if needed in vdop, and logT.- Parameters:
response_file (
str|Path) – Response function in Xarray readable format (netCDF file or Zarr store).logT (
DataArray|None) – Temperature axis to (re)sample onto.slit (
DataArray|None) – Number of slits array of integers.logT_method (
str) – Interpolation method for logT, by default “nearest”. Allowed values are “nearest”, “linear”, “cubic” and “quadratic”.vdop_method (
str) – Interpolation method for vdop, by default “nearest”. Allowed values are “nearest”, “linear”, “cubic” and “quadratic”.gain (
Quantity) – Camera gain, convertible to electron/DN, by defaultDEFAULTS_MUSE.ccd_gain=10.0 electron / DN.
- Returns:
The combined response function dataset.
- Return type:
- Raises:
ValueError – If
response_filedoes not exist, an interpolation method is invalid, thelogT/vdopaxes are malformed, or the loaded dataset is missing theSG_respvariable or thelogT/vdopcoordinates.