-
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.
- Loading branch information
1 parent
22d40b4
commit 2583c54
Showing
5 changed files
with
204 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
- parameters.string: | ||
name: mri | ||
description: Malcolm resource id of the Block | ||
|
||
- parameters.string: | ||
name: prefix | ||
description: The root PV for the all records | ||
|
||
- controllers.DefaultController: | ||
mri: $(mri) | ||
|
||
- parts.ca.CAActionPart: | ||
name: start | ||
description: Demand for starting acquisition | ||
pv: $(prefix):Acquire | ||
|
||
- parts.ca.CAActionPart: | ||
name: stop | ||
description: Stop acquisition | ||
pv: $(prefix):StopAll | ||
value: 1 | ||
|
||
- parts.ca.CABooleanPart: | ||
name: acquiring | ||
description: If detector is currently acquiring | ||
rbv: $(prefix):Acquiring | ||
widget: led | ||
|
||
- parts.ca.CABooleanPart: | ||
name: arrayCallbacks | ||
description: Whether to produce images or not | ||
pv: $(prefix):XBUF:ArrayCallbacks | ||
rbvSuff: _RBV | ||
widget: checkbox | ||
|
||
- parts.ca.CALongPart: | ||
name: arrayCounter | ||
description: Current unique id number for frame | ||
pv: $(prefix):XBUF:ArrayCounter | ||
rbvSuff: _RBV | ||
widget: textinput | ||
|
||
- parts.ca.CAChoicePart: | ||
name: collectMode | ||
description: set spectra or mapping | ||
pv: $(prefix):CollectMode | ||
rbvSuff: _RBV | ||
widget: combo | ||
|
||
- parts.ca.CAChoicePart: | ||
name: pixelAdvanceMode | ||
description: pixel mode | ||
pv: $(prefix):PixelAdvanceMode | ||
rbvSuff: _RBV | ||
widget: combo | ||
|
||
- parts.ca.CAChoicePart: | ||
name: presetMode | ||
description: Preset Mode | ||
pv: $(prefix):PresetMode | ||
widget: combo | ||
|
||
- parts.ca.CAChoicePart: | ||
name: ignoreGate | ||
description: Ignore Gate | ||
pv: $(prefix):IgnoreGate | ||
rbvSuff: _RBV | ||
widget: combo | ||
|
||
- parts.ca.CALongPart: | ||
name: pixelsPerRun | ||
description: Pixels Per Run | ||
pv: $(prefix):PixelsPerRun | ||
rbvSuff: _RBV | ||
widget: textinput | ||
|
||
- parts.ca.CAChoicePart: | ||
name: autoPixelsPerBuffer | ||
description: Auto pixels per buffer | ||
pv: $(prefix):AutoPixelsPerBuffer | ||
rbvSuff: _RBV | ||
widget: combo | ||
|
||
- parts.ca.CALongPart: | ||
name: binsInSpectrum | ||
description: bins in spectrum | ||
pv: $(prefix):MCA1.NUSE | ||
rbv: $(prefix):MCA1:NBINS | ||
widget: textinput | ||
|
||
- parts.ca.CADoublePart: | ||
name: dxp1MaxEnergy | ||
description: MCA Max Energy | ||
pv: $(prefix):DXP1:MaxEnergy | ||
rbvSuff: _RBV | ||
widget: textinput | ||
|
||
- parts.ca.CADoublePart: | ||
name: dxp2MaxEnergy | ||
description: MCA Max Energy | ||
pv: $(prefix):DXP2:MaxEnergy | ||
rbvSuff: _RBV | ||
widget: textinput | ||
|
||
- parts.ca.CADoublePart: | ||
name: dxp3MaxEnergy | ||
description: MCA Max Energy | ||
pv: $(prefix):DXP3:MaxEnergy | ||
rbvSuff: _RBV | ||
widget: textinput | ||
|
||
- parts.ca.CADoublePart: | ||
name: dxp4MaxEnergy | ||
description: MCA Max Energy | ||
pv: $(prefix):DXP4:MaxEnergy | ||
rbvSuff: _RBV | ||
widget: textinput | ||
|
||
- parts.ca.CALongPart: | ||
name: pixelsPerBuffer | ||
description: Pixels Per Buffer | ||
pv: $(prefix):PixelsPerBuffer | ||
rbvSuff: _RBV | ||
widget: textinput | ||
|
||
- parts.ca.CAChoicePart: | ||
name: inputLogicPolarity | ||
description: Input Logic Polarity | ||
pv: $(prefix):InputLogicPolarity | ||
rbvSuff: _RBV | ||
widget: combo | ||
|
||
|
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,30 @@ | ||
- parameters.string: | ||
name: mriPrefix | ||
description: Malcolm resource id of the Block and prefix for children | ||
|
||
- parameters.string: | ||
name: pvPrefix | ||
description: PV prefix for driver and all plugins | ||
|
||
- controllers.RunnableController: | ||
mri: $(mriPrefix) | ||
|
||
- blocks.xmap.XmapDetectorDriver: | ||
mri: $(mriPrefix)-DRV | ||
prefix: $(pvPrefix) | ||
|
||
- parts.xmap.XmapDriverPart: | ||
name: DRV | ||
mri: $(mriPrefix)-DRV | ||
|
||
- blocks.ADCore.StatsPlugin: | ||
mri: $(mriPrefix)-STAT | ||
prefix: $(pvPrefix):STAT1 | ||
|
||
- parts.ADCore.StatsPluginPart: | ||
name: STAT | ||
mri: $(mriPrefix)-STAT | ||
|
||
- includes.ADCore.filewriting_collection: | ||
pvPrefix: $(pvPrefix) | ||
mriPrefix: $(mriPrefix) |
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 @@ | ||
# Find all subpackages, MethodMeta decorated callables, and YAML files | ||
from malcolm.packageutil import prepare_package | ||
|
||
__all__ = prepare_package(globals(), __name__) | ||
|
||
del prepare_package |
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 @@ | ||
# Find all subpackages, MethodMeta decorated callables, and YAML files | ||
from malcolm.packageutil import prepare_package | ||
|
||
__all__ = prepare_package(globals(), __name__) | ||
|
||
del prepare_package |
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,29 @@ | ||
from malcolm.core import method_takes, REQUIRED | ||
from malcolm.core.vmetas import PointGeneratorMeta | ||
from malcolm.controllers.runnablecontroller import RunnableController, configure_args | ||
from malcolm.parts.ADCore.detectordriverpart import DetectorDriverPart | ||
|
||
class XmapDriverPart(DetectorDriverPart): | ||
@RunnableController.Configure | ||
@RunnableController.PostRunReady | ||
@RunnableController.Seek | ||
@method_takes(*configure_args) | ||
def configure(self, task, completed_steps, steps_to_do, part_info, params): | ||
task.unsubscribe_all() | ||
task.put_many(self.child, dict(collectMode="MCA mapping", | ||
pixelAdvanceMode="Gate", | ||
presetMode="No preset", | ||
ignoreGate="No", | ||
pixelsPerRun=steps_to_do, | ||
autoPixelsPerBuffer="Manual", | ||
pixelsPerBuffer=1, | ||
binsInSpectrum=2048, | ||
dxp1MaxEnergy=4.096, | ||
dxp2MaxEnergy=4.096, | ||
dxp3MaxEnergy=4.096, | ||
dxp4MaxEnergy=4.096, | ||
inputLogicPolarity="Normal", | ||
arrayCounter=completed_steps, | ||
arrayCallbacks=True)) | ||
self.post_configure(task, params) | ||
|