API Reference#

Top-level functions#

Mantid Compatibility#

array_from_mantid(workspace, **kwargs)

Convert Mantid workspace to a scipp data array or dataset.

from_mantid(workspace, **kwargs)

Convert Mantid workspace to a scipp data group.

load_with_mantid([filename, ...])

Load a file using Mantid.

to_mantid(data, dim[, instrument_file])

Convert data to a Mantid workspace.

fit(data, mantid_args)

Coordinate transformations (Unit conversion)#

convert(data, origin, target, scatter)

Perform a unit conversion from the given origin unit to target.

Beamline geometry#

Note that theta or scattering_angle are deliberately not supported, due to some ambiguity on how the terms are used in the community and possible confusion of theta (from Bragg’s law) with theta in spherical coordinates.

position(da)

Extract the detector pixel positions from a data array or dataset.

source_position(da)

Extract the position of the neutron source from a data array or dataset.

sample_position(da)

Extract the position of the sample from a data array or dataset.

Ltotal(da, scatter)

Extract the length of the total flight path from a data array or dataset.

L1(da)

Extract the length of the primary flight path from a data array or dataset.

L2(da)

Extract the length of the secondary flight path from a data array or dataset.

two_theta(da)

Extract the scattering angle from a data array or dataset.

incident_beam(da)

Extract the incident beam vector from a data array or dataset.

scattered_beam(da)

Extract the scattered beam vector from a data array or dataset.

Submodules#

atoms

Parameters for neutron interactions with atoms.

chopper

Chopper utilities.

conversion

Components for coordinate transformations.

io

File input and output.

logging

Utilities for logging in ScippNeutron.

peaks

Peak fitting and removal.

tof

Specifics for time-of-flight neutron-scattering data reduction, including coordinate transformations.