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.Dataset interpolating 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.

  • vdop (DataArray | None) – Velocity 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 default DEFAULTS_MUSE.ccd_gain=10.0 electron / DN.

Returns:

The combined response function dataset.

Return type:

Dataset

Raises:

ValueError – If response_file does not exist, an interpolation method is invalid, the logT/vdop axes are malformed, or the loaded dataset is missing the SG_resp variable or the logT/vdop coordinates.