scippneutron.to_mantid#

scippneutron.to_mantid(data, dim, instrument_file=None)[source]#

Convert data to a Mantid workspace.

The Mantid layout expect the spectra to be the Outer-most dimension, i.e. y.shape[0]. If that is not the case you might have to transpose your data to fit that, otherwise it will not be aligned correctly in the Mantid workspace.

Parameters:
  • data – Data to be converted.

  • dim – Coord to use for Mantid’s first axis (X).

  • instrument_file (default: None) – Instrument file that will be loaded into the workspace

Returns:

Workspace containing converted data. The concrete workspace type may differ depending on the content of data.