ess.snspowder.powgen.calibration.load_calibration#

ess.snspowder.powgen.calibration.load_calibration(filename, *, instrument_filename=None, instrument_name=None, mantid_args=None)[source]#

Load and return calibration data.

Warning

This function is designed to work with calibration files used by Mantid, specifically for POWGEN. It does not represent the interface used at ESS and will be removed in the future.

Uses the Mantid algorithm LoadDiffCal and stores the data in a scipp.Dataset

Note that this function requires mantid to be installed and available in the same Python environment as ess.

Parameters:
  • filename (str | Path) – The name of the calibration file to load.

  • instrument_filename (Optional[str], default: None) – Instrument definition file.

  • instrument_name (Optional[str], default: None) – Name of the instrument.

  • mantid_args (Optional[dict], default: None) – Dictionary with additional arguments for the LoadDiffCal Mantid algorithm.

Returns:

Dataset – A Dataset containing the calibration data and masking.