io

This module contains parsers for different instruments that return Scan objects.

Module Contents

Functions

from_i07

Instantiates a Scan from the path to an I07 nexus file, a beam centre coordinate tuple, a detector distance and a sample out-of-plane vector.

API

io.from_i07(path_to_nx: Union[str, pathlib.Path], beam_centre: Tuple[int], detector_distance: float, setup: str, path_to_data: str = '', using_dps: bool = False, experimental_hutch=0) fast_rsm.scan.Scan

Instantiates a Scan from the path to an I07 nexus file, a beam centre coordinate tuple, a detector distance and a sample out-of-plane vector.

Args:
path_to_nx:

Path to the nexus file containing the scan metadata.

beam_centre:

A (y, x) tuple of the beam centre, measured in the usual image coordinate system, in units of pixels.

detector_distance:

The distance between the sample and the detector.

setup:

What was the experimental setup? Can be “vertical”, “horizontal” or “DCD”.

path_to_data:

Path to the directory in which the images are stored. Defaults to ‘’, in which case a bunch of reasonable directories will be searched for the images. This is useful in case you store the small .nxs file in a different place to the potentially very large image data (e.g. .nxs files on a local disc, .h5 files on portable hard drive).

Returns:

Corresponding instance of fast_rsm.scan.Scan