malcolm.modules.scanning.infos

class malcolm.modules.scanning.infos.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

class malcolm.modules.scanning.infos.ParameterTweakInfo(parameter: str, value: Any)[source]

Info about a configure() parameter that needs to be tweaked

Parameters
  • parameter – Parameter name, e.g. “generator”

  • value – The value it should be changed to

class malcolm.modules.scanning.infos.ConfigureParamsInfo(metas: Dict[str, malcolm.core.models.VMeta], required: List[str], defaults: Dict[str, Any])[source]

Info about the parameters that should be passed to the Part in configure. The Controller will validate these when Block.configure() is called, and pass them to all Parts that have registered interest in them.

Parameters
  • metas – Metas for the extra parameters

  • required – List of required parameters

  • defaults – Default values for parameters

class malcolm.modules.scanning.infos.RunProgressInfo(steps: int)[source]

Info about how far the current run has progressed

Parameters

steps – The number of completed steps

class malcolm.modules.scanning.infos.MinTurnaroundInfo(gap: float, interval: float)[source]

Info about the minimum time gap that should be left between points that are not joined together

Parameters
  • gap – The minimum time gap in seconds

  • interval – the minimum interval between two turnaround points

class malcolm.modules.scanning.infos.DatasetProducedInfo(name: str, filename: str, type: malcolm.modules.scanning.infos.DatasetType, rank: int, path: str, uniqueid: str)[source]

Declare that we will write the following dataset to file

Parameters
  • name – Dataset name

  • filename – Filename relative to the fileDir we were given

  • type – What NeXuS dataset type it produces

  • rank – The rank of the dataset including generator dims

  • path – The path of the dataset within the file

  • uniqueid – The path of the UniqueID dataset within the file

class malcolm.modules.scanning.infos.MotionTrigger(value)[source]

Request from a trigger source to the motion controller of what triggers it needs

NONE = 0

No Triggers required

ROW_GATE = 1

Trigger that spans each continuous joined section

EVERY_POINT = 2

One trigger for each point

class malcolm.modules.scanning.infos.MotionTriggerInfo(trigger: malcolm.modules.scanning.infos.MotionTrigger)[source]

Declare that we need triggers of a certain sort from the motor controller

Parameters

trigger – What type is required

class malcolm.modules.scanning.infos.DetectorMutiframeInfo(mri: str)[source]

Declare that we are able to produce mutiple frames per point for this detector

Parameters

mri – The mri of the detector in the DetectorTable

class malcolm.modules.scanning.infos.ExposureDeadtimeInfo(readout_time: float, frequency_accuracy: float, min_exposure: float)[source]

Detector exposure time should be generator.duration - deadtime

Parameters
  • readout_time – The per frame readout time of the detector

  • frequency_accuracy – The crystal accuracy in ppm

  • min_exposure – The minimum exposure time this detector supports

calculate_exposure(duration: float, exposure: float = 0.0) float[source]

Calculate the exposure to set the detector to given the duration of the frame and the readout_time and frequency_accuracy

calculate_minimum_duration(exposure: float) float[source]

Calculate the minimum frame duration required for the frame

calculate_maximum_exposure(duration: float) float[source]

Calculate the maximum possible exposure based on a duration