util
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.ConfigureParams(generator: Anno(name='AGenerator', typ=<class 'scanpointgenerator.core.compoundgenerator.CompoundGenerator'>, description='Generator instance providing specification for scan'), axesToMove: Optional[Union[Anno(name='AAxesToMove', typ=<class 'str'>, description='List of axes in inner dimension of generator that should be moved'), Sequence[str]]] = None, breakpoints: Optional[Anno(name='ABreakpoints', typ=<class 'numpy.int32'>, description='List of points at which the run will return in Armed state')] = None, **kwargs: Any)[source]
- Parameters
generator (CompoundGenerator) – Generator instance providing specification for scan
axesToMove (str) – List of axes in inner dimension of generator that should be moved
breakpoints (int32) – List of points at which the run will return in Armed state
- class malcolm.modules.scanning.util.PointGeneratorMeta(description: Anno(name='AMetaDescription', typ=<class 'str'>, description='Description of what this element represents') = '', tags: Union[Anno(name='ATags', typ=<class 'str'>, description='Generic text tags for client tools to interpret'), Sequence[str], str] = (), writeable: Anno(name='AWriteable', typ=<class 'bool'>, description='Whether this element is currently writeable') = False, label: Anno(name='ALabel', typ=<class 'str'>, description='A human readable label for the element') = '')[source]
- Parameters
- attribute_class
alias of
malcolm.core.models.NTUnion
- class malcolm.modules.scanning.util.DatasetTable(name: Union[Anno(name='ADatasetNames', typ=<class 'str'>, description='Dataset names'), Sequence[str]], filename: Union[Anno(name='AFilenames', typ=<class 'str'>, description='Filenames of HDF files relative to fileDir'), Sequence[str]], type: Union[Anno(name='ADatasetTypes', typ=<enum 'DatasetType'>, description='Types of dataset'), Sequence[malcolm.modules.scanning.infos.DatasetType]], rank: Union[Anno(name='ARanks', typ=<class 'numpy.int32'>, description='Rank (number of dimensions) of the dataset'), Sequence[numpy.int32]], path: Union[Anno(name='APaths', typ=<class 'str'>, description='Dataset paths within HDF files'), Sequence[str]], uniqueid: Union[Anno(name='AUniqueIDs', typ=<class 'str'>, description='UniqueID array paths within HDF files'), Sequence[str]])[source]
- Parameters
name (str) – Dataset names
filename (str) – Filenames of HDF files relative to fileDir
type (DatasetType) – Types of dataset
rank (int32) – Rank (number of dimensions) of the dataset
path (str) – Dataset paths within HDF files
uniqueid (str) – UniqueID array paths within HDF files
- class malcolm.modules.scanning.util.DetectorTable(enable: Union[Anno(name='AEnable', typ=<class 'bool'>, description='Whether the detectors are enabled or not'), Sequence[bool]], name: Union[Anno(name='ADetectorNames', typ=<class 'str'>, description='Detector names'), Sequence[str]], mri: Union[Anno(name='ADetectorMris', typ=<class 'str'>, description='Detector block mris'), Sequence[str]], exposure: Union[Anno(name='AExposures', typ=<class 'float'>, description='Exposure of each detector frame for the current scan'), Sequence[float]], framesPerStep: Union[Anno(name='AFramesPerStep', typ=<class 'numpy.int32'>, description='Number of detector frames for each generator point'), Sequence[numpy.int32]])[source]