Datasets and Detectors

A scan typically includes at least one detector.

Detectors are defined as devices that produce data. The data produced by a detector is described by a table of Datasets. Each Dataset typically describes a path within an HDF file.

Most scans include at least one detector block in the device layer and that block must include a DatasetTablePart. This part adds a datasets attribute to the block which allows clients to determine the location and shape of the data being produced by the detector.

Every part that produces data must return from configure() an Infos of type DatasetProducedInfo for each dataset it will produce.

The DataSetTablePart collects these Infos and publishes them in the datasets Attribute.

Dataset tables should be NeXus compatible and as such would contain a primary set, any number of secondary and monitor sets plus a position_set for each dimension of the scan. It would also contain a position_value for each dimension if axis read-backs are available. The definitions of these types are provided by DatasetType as follows:

scanning.utils provides shared utility functions and classes. For consistency and to avoid circular dependencies, the following rules are applied: - All types required to initialize hook classes are in the hooks namespace - All types required to initialize info classes are in the infos namespace - util depends on hooks and infos (not vice versa)

class malcolm.modules.scanning.util.DatasetType(value)[source]

NeXus type of a produced dataset

PRIMARY = 'primary'

Detector data, like the 2D data from an imaging detector

SECONDARY = 'secondary'

Calculated from detector data, like the sum of each frame

RAW = 'raw'

Raw data sets (used when linking to raw odin datasets)

MONITOR = 'monitor'

Data that only makes sense when considered with detector data, like a measure of beam current with an ion chamber

POSITION_SET = 'position_set'

The demand positions of an axis as specified by the generator

POSITION_VALUE = 'position_value'

The readback positions of an axis that moves during the scan

POSITION_MIN = 'position_min'

The minimum value of the readback position of an axis in each frame

POSITION_MAX = 'position_max'

The maximum value of the readback position of an axis in each frame