-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'i18_pymalcolm' into 'master'
Add Xspress ODIN support See merge request controls/python3/pymalcolm!1
- Loading branch information
Showing
10 changed files
with
748 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import parts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
malcolm/modules/xspress3/blocks/xspress3_odin_runnable_block.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
- builtin.parameters.string: | ||
name: mri_prefix | ||
description: Malcolm resource id of the Block and prefix for children | ||
|
||
- builtin.parameters.string: | ||
name: pv_prefix | ||
description: PV prefix for driver and all plugins | ||
|
||
- builtin.parameters.string: | ||
name: config_dir | ||
description: Where to store saved configs | ||
|
||
- builtin.parameters.string: | ||
name: label | ||
description: Beamline specific label for the detector | ||
default: Xspress 3 | ||
|
||
- builtin.parameters.string: | ||
name: drv_suffix | ||
description: PV suffix for detector driver | ||
|
||
- builtin.parameters.int32: | ||
name: processes | ||
description: Number of FR/FP pairs | ||
|
||
- builtin.parameters.int32: | ||
name: num_datasets | ||
description: Total number of datasets that will be writen | ||
|
||
- builtin.parameters.string: | ||
name: writer_suffix | ||
description: PV suffix for Odin data writer | ||
default: OD | ||
|
||
- scanning.controllers.RunnableController: | ||
mri: $(mri_prefix) | ||
config_dir: $(config_dir) | ||
description: | | ||
Xspress3 is a solid state detector capable of acquiring at high count rates | ||
- builtin.parameters.string: | ||
name: sum_name | ||
description: name of the sum dataset | ||
|
||
- builtin.parts.LabelPart: | ||
value: $(label) | ||
|
||
- xspress3.blocks.xspress3_driver_block: | ||
mri: $(mri_prefix):$(drv_suffix) | ||
prefix: $(pv_prefix):$(drv_suffix) | ||
|
||
- ADCore.parts.DetectorDriverPart: | ||
name: Xspress3Odin | ||
mri: $(mri_prefix):$(drv_suffix) | ||
|
||
- scanning.parts.ExposureDeadtimePart: | ||
name: DEADTIME | ||
readout_time: 7e-5 | ||
|
||
- builtin.parts.IconPart: | ||
svg: $(yamldir)/../icons/quantum_detectors.svg | ||
|
||
# Adding what might be needed for the Xspress3 Odin writer | ||
|
||
- builtin.parameters.string: | ||
name: secondary_set | ||
description: Name of secondary dataset to link in nxs file | ||
default: sum | ||
|
||
- xspress3.blocks.xspress3_writer_block: | ||
mri: $(mri_prefix):$(writer_suffix) | ||
prefix: $(pv_prefix):$(writer_suffix) | ||
|
||
- xspress3.parts.XspressWriterPart: | ||
name: XSPRESSWRITER | ||
mri: $(mri_prefix):$(writer_suffix) | ||
sum_name: $(sum_name) | ||
secondary_set: $(secondary_set) | ||
num_pairs: $(processes) | ||
num_datasets: $(num_datasets) | ||
|
||
- scanning.parts.DatasetTablePart: | ||
name: DSET |
119 changes: 119 additions & 0 deletions
119
malcolm/modules/xspress3/blocks/xspress3_writer_block.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
- builtin.parameters.string: | ||
name: mri | ||
description: Malcolm resource id of the Block | ||
|
||
- builtin.parameters.string: | ||
name: prefix | ||
description: The root PV for the all records | ||
|
||
- builtin.defines.docstring: | ||
value: | | ||
Hardware block corresponding to PVs used for Odin File Writer | ||
- OdinDataDriver.template should have pv prefix $(prefix) | ||
- builtin.controllers.StatefulController: | ||
mri: $(mri) | ||
description: $(docstring) | ||
|
||
- ca.parts.CALongPart: | ||
name: numCapture | ||
description: Number of frames to capture | ||
pv: $(prefix):NumCapture | ||
rbv_suffix: _RBV | ||
|
||
- ca.parts.CALongPart: | ||
name: numCaptured | ||
description: Number of frames captured since last 'start' | ||
rbv: $(prefix):NumCaptured_RBV | ||
|
||
- ca.parts.CALongPart: | ||
name: numProcesses | ||
description: number of receiver/writer pairs and hence HDF files | ||
rbv: $(prefix):NumProcesses_RBV | ||
|
||
- ca.parts.CALongPart: | ||
name: imageHeight | ||
description: Height of the data frames | ||
pv: $(prefix):ImageHeight | ||
rbv_suffix: _RBV | ||
|
||
- ca.parts.CALongPart: | ||
name: imageWidth | ||
description: Width of the data frames | ||
pv: $(prefix):ImageWidth | ||
rbv_suffix: _RBV | ||
|
||
- ca.parts.CALongPart: | ||
name: numFramesChunks | ||
description: Size of chunks in frames | ||
pv: $(prefix):NumFramesChunks | ||
rbv_suffix: _RBV | ||
|
||
- ca.parts.CALongPart: | ||
name: numRowChunks | ||
description: Number of Rows per Chunk | ||
pv: $(prefix):NumRowChunks | ||
rbv_suffix: _RBV | ||
|
||
- ca.parts.CALongPart: | ||
name: numColChunks | ||
description: Number of Columns per Chunk | ||
pv: $(prefix):NumColChunks | ||
rbv_suffix: _RBV | ||
|
||
- ca.parts.CALongPart: | ||
name: blockSize | ||
description: Number of contiguous frames written to each file | ||
pv: $(prefix):BlockSize | ||
rbv_suffix: _RBV | ||
|
||
- ca.parts.CALongPart: | ||
name: blocksPerFile | ||
description: Number of blocks per file | ||
pv: $(prefix):BlocksPerFile | ||
rbv_suffix: _RBV | ||
|
||
- ca.parts.CAStringPart: | ||
name: dataType | ||
description: type of the pixel data | ||
rbv: $(prefix):DataType | ||
|
||
# Filename | ||
- ca.parts.CACharArrayPart: | ||
name: filePath | ||
description: Directory to write files into | ||
pv: $(prefix):FilePath | ||
rbv_suffix: _RBV | ||
|
||
- ca.parts.CACharArrayPart: | ||
name: fileName | ||
description: Filename within directory | ||
pv: $(prefix):FileName | ||
rbv_suffix: _RBV | ||
|
||
# commands | ||
- ca.parts.CAActionPart: | ||
name: start | ||
description: Demand for starting acquisition | ||
pv: $(prefix):Capture | ||
status_pv: $(prefix):WriteStatus | ||
good_status: Write OK | ||
|
||
- ca.parts.CAActionPart: | ||
name: stop | ||
description: Demand for stopping acquisition | ||
pv: $(prefix):Capture | ||
value: 0 | ||
wait: False | ||
|
||
# status | ||
- ca.parts.CABooleanPart: | ||
name: running | ||
description: If detector is currently acquiring | ||
rbv: $(prefix):Capture_RBV | ||
|
||
- ca.parts.CACharArrayPart: | ||
name: writeMessage | ||
description: Error message if in error | ||
rbv: $(prefix):WriteMessage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Expose a nice namespace | ||
from malcolm.core import submodule_all | ||
|
||
from .xspresswriterpart import AMri, APartName, XspressWriterPart | ||
|
||
__all__ = submodule_all(globals()) |
Oops, something went wrong.