malcolm.modules.ADCore.util

class malcolm.modules.ADCore.util.AttributeDatasetType(value)[source]

Used to signal from a detector driver that it is producing an NDAttribute that should be published to the user, and what its NeXus type is

DETECTOR = 'detector'

Primary data that is directly relevant to the user, like a transmission diode.

MONITOR = 'monitor'

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

POSITION = 'position'

Readback position of a motor that is taking part in the experiment

class malcolm.modules.ADCore.util.DataType(value)[source]

The datatype that should be used for the NDAttribute

INT = 'INT'

int32

DOUBLE = 'DOUBLE'

float64

STRING = 'STRING'

string

DBRNATIVE = 'DBR_NATIVE'

Whatever native type the PV has

class malcolm.modules.ADCore.util.SourceType(value)[source]

Where to get the NDAttribute data from

PARAM = 'paramAttribute'

From an asyn parameter of this driver

PV = 'PVAttribute'

From a PV name

class malcolm.modules.ADCore.util.StatisticsName(value)[source]

The types of statistics calculated by the areaDetector NDPluginStats

MIN = 'MIN_VALUE'

Minimum counts in any element

MIN_X = 'MIN_X'

X position of minimum counts

MIN_Y = 'MIN_Y'

Y position of minimum counts

MAX = 'MAX_VALUE'

Maximum counts in any element

MAX_X = 'MAX_X'

X position of maximum counts

MAX_Y = 'MAX_Y'

Y position of maximum counts

MEAN = 'MEAN_VALUE'

Mean counts of all elements

SIGMA = 'SIGMA_VALUE'

Sigma of all elements

SUM = 'TOTAL'

Sum of all elements

NET = 'NET'

Sum of all elements not in background region

class malcolm.modules.ADCore.util.ExtraAttributesTable(name: Union[Anno(name='AAttributeNames', typ=<class 'str'>, description='NDAttribute name to be exported'), Sequence[str]], sourceId: Union[Anno(name='ASourceIds', typ=<class 'str'>, description='source ID for attribute (PV name for PVAttribute,asyn param name for paramAttribute)'), Sequence[str]], description: Union[Anno(name='ADescriptions', typ=<class 'str'>, description='PV descriptions'), Sequence[str]], sourceType: Union[Anno(name='ASourceTypes', typ=<enum 'SourceType'>, description='Type of attribute source'), Sequence[malcolm.modules.ADCore.util.SourceType]], dataType: Union[Anno(name='ADataTypes', typ=<enum 'DataType'>, description='Type of attribute data'), Sequence[malcolm.modules.ADCore.util.DataType]], datasetType: Union[Anno(name='AAttributeTypes', typ=<enum 'AttributeDatasetType'>, description='Types of attribute dataset'), Sequence[malcolm.modules.ADCore.util.AttributeDatasetType]])[source]
Parameters
  • name (str) – NDAttribute name to be exported

  • sourceId (str) – source ID for attribute (PV name for PVAttribute,asyn param name for paramAttribute)

  • description (str) – PV descriptions

  • sourceType (SourceType) – Type of attribute source

  • dataType (DataType) – Type of attribute data

  • datasetType (AttributeDatasetType) – Types of attribute dataset

malcolm.modules.ADCore.util.make_xml_filename(file_dir, mri, suffix='attributes')[source]

Return a Block-specific filename for attribute or layout XML file