Skip to content

BaseCorrection

Base classes: PythonDevice

dataInput

InputChannel

Fast data sources (fastSources)

Type
VECTOR_STRING
Access mode
INITONLY
Assignment
OPTIONAL
Description
Sources to get data from. Only incoming hashes from these sources will be processed. This will typically be a single entry of the form: '[instrument]DET[detector]/DET/[channel]:xtdf'.
Default value
[]

Output buffer size limit (outputShmemBufferSize)

Type
UINT32
Access mode
INITONLY
Assignment
OPTIONAL
Description
Corrected trains are written to shared memory locations. These are pre-allocated and re-used (circular buffer). This parameter determines how much memory to set aside for that buffer.
Default value
10

availableScenes

Type
VECTOR_STRING
Access mode
READONLY
Assignment
OPTIONAL
Default value
['overview', 'constant_overrides']

Use shared memory (useShmemHandles)

Type
BOOL
Access mode
INITONLY
Assignment
OPTIONAL
Description
If enabled, shared memory handles will be used to avoid copying the main image data on the dataOutput channel. Note that these handles need to be dereferenced (typically by a group matcher) to get the data off the correction node.
Default value
True

Use infiniband (useInfiniband)

Type
BOOL
Access mode
INITONLY
Assignment
OPTIONAL
Description
If enabled, device will during initialization try to bind its main data output channel (dataOutput) to its node's infiniband interface. Default interface is used if no 'ib0' interface is found.
Default value
True

Geometry device (geometryDevice)

Type
STRING
Access mode
INITONLY
Assignment
OPTIONAL
Default value
empty string

Data format (in/out) (dataFormat)

Output image data dtype (dataFormat.outputImageDtype)

Type
STRING
Access mode
RECONFIGURABLE
Assignment
OPTIONAL
Description
The (numpy) dtype to use for outgoing image data. Input is cast to float32, corrections are applied, and only then will the result be cast to outputImageDtype. Be aware that casting to integer type causes truncation rather than rounding.
Options:
float32, float16, uint16
Default value
float32

Frames (dataFormat.inputFrames)

Type
UINT32
Access mode
READONLY
Assignment
OPTIONAL
Description
Number of frames on input
Default value
0

Output axis order (dataFormat.outputAxisOrder)

Type
STRING
Access mode
RECONFIGURABLE
Assignment
OPTIONAL
Description
Axes of main data output can be reordered after correction. Axis order is specified as string consisting of 'f' (frames), 'ss' (slow scan), and 'ff' (fast scan). Anything but the default f-ss-fs order implies reordering - this axis ordering is based on the data we get from the detector (/ receiver), so how ss and fs maps to what may be considered x and y is detector-dependent.
Options:
f-ss-fs, f-fs-ss, ss-f-fs, ss-fs-f, fs-f-ss, fs-ss-f
Default value
f-ss-fs

Input data shape (dataFormat.inputDataShape)

Type
VECTOR_UINT32
Access mode
READONLY
Assignment
OPTIONAL
Description
Image data shape in incoming data (from reader / DAQ). Updated based on latest train processed. Note that axis order may look wonky due to DAQ quirk.
Default value
[]

Output data shape (dataFormat.outputDataShape)

Type
VECTOR_UINT32
Access mode
READONLY
Assignment
OPTIONAL
Description
Image data shape for data output from this device. Takes into account axis reordering, if applicable. Even without that, workarounds.overrideInputAxisOrder likely makes this differ from dataFormat.inputDataShape.
Default value
[]

dataFormat.cellId

Type
VECTOR_UINT32
Access mode
READONLY
Assignment
OPTIONAL
Default value
[]

dataFormat.pulseId

Type
VECTOR_UINT32
Access mode
READONLY
Assignment
OPTIONAL
Default value
[]

Workarounds (workarounds)

Override input axis order (workarounds.overrideInputAxisOrder)

Type
BOOL
Access mode
RECONFIGURABLE
Assignment
OPTIONAL
Description
The shape of the image data ndarray as received from the DataAggregator is sometimes wrong - the axes are actually in a different order than the ndarray shape suggests. If this flag is on, the shape of the ndarray will be overridden with the axis order which was expected.
Default value
True

Spurious future train ID threshold (workarounds.trainFromFutureThreshold)

Type
UINT64
Access mode
RECONFIGURABLE
Assignment
OPTIONAL
Description
Some detectors occasionally send a train with incorrect and much too large train ID. To avoid these 'future trains' from interfering with train matching, use this threshold to discard them immediately. If a train arrives with an ID which exceeds the current train ID from the time server by more than this threshold, the train is ignored.
Default value
10000

Load most recent constants (loadMostRecentConstants)

Type
Slot
Access mode
RECONFIGURABLE
Description
Calling this slot will flush all constant buffers and cause the device to start querying CalCat for the most recent constants (all constants applicable for this device) available with the currently set constant parameters. This should typically be called after instantiating pipeline, after changing parameters, or after generating new constants.

inputDataState

Type
STRING
Access mode
READONLY
Assignment
OPTIONAL
Default value
NORMAL

deviceInternalsState

Type
STRING
Access mode
READONLY
Assignment
OPTIONAL
Default value
NORMAL

processingState

Type
STRING
Access mode
READONLY
Assignment
OPTIONAL
Default value
NORMAL

Train ID (trainId)

Type
UINT64
Access mode
READONLY
Assignment
OPTIONAL
Description
ID of latest train processed by this device.
Default value
0

Performance measures (performance)

Processing time (performance.processingTime)

Type
DOUBLE
Access mode
READONLY
Assignment
OPTIONAL
Default value
0.0

Rate (performance.rate)

Type
DOUBLE
Access mode
READONLY
Assignment
OPTIONAL
Description
Actual rate with which this device gets, processes, and sends trains. This is a simple windowed moving average.
Default value
0.0

Input delay (performance.inputDelay)

Type
DOUBLE
Access mode
READONLY
Assignment
OPTIONAL
Description
Measured delay on the input channel. Measured by difference between 'now' and timestamp in input metadata.
Default value
0.0

performance.ratioOfRecentTrainsReceived

Type
DOUBLE
Access mode
READONLY
Assignment
OPTIONAL
Description
Of the latest trains (from last received train, going back [some buffer range]), how many did we receive? This estimate is updated when new trains come in, so is unreliable if nothing is coming at all.
Default value
0.0

Correction steps (corrections)

Access mode
RECONFIGURABLE

warningLamps

Type
VECTOR_STRING
Access mode
INITONLY
Assignment
OPTIONAL
Default value
['deviceInternalsState', 'inputDataState', 'processingState']

Addons (addons)

Access mode
RECONFIGURABLE