malcolm.modules.ADPandABlocks.parts
- class malcolm.modules.ADPandABlocks.parts.KinematicsSavuPart(name: Anno(name='APartName', typ=<class 'str'>, description='The name of the Part within the Controller'), mri: Anno(name='AMri', typ=<class 'str'>, description='Malcolm resource id of child object'), cs_port: Optional[Anno(name='ACsPort', typ=<class 'str'>, description='name of CS port')] = None, cs_mri_suffix: Anno(name='ACsMriSuffix', typ=<class 'str'>, description='mri suffix of malcolm CS block [$(pmac_mri):$(suffix)]') = ':CS', status_mri_suffix: Anno(name='AStatusMriSuffix', typ=<class 'str'>, description='mri suffix of malcolm Status block [$(pmac_mri):$(suffix)]') = ':STATUS')[source]
Part for writing out files to send to Savu for post processing of forward kinematics. Creates the following files:
- <ID>-savu.nxs - Input data file for Savu. Links to Panda data, and
datasets which contain the kinematics code and variables.
<ID>-savu_pl.nxs - Savu process list, copied from /kinematics directory
<ID>-vds.nxs - VDS file linking to Savu processed data (when processed)
- Parameters
- on_configure(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), fileDir: Anno(name='AFileDir', typ=<class 'str'>, description='Directory to write data to'), generator: Anno(name='AGenerator', typ=<class 'scanpointgenerator.core.compoundgenerator.CompoundGenerator'>, description='Generator instance providing specification for scan'), axesToMove: Anno(name='AAxesToMove', typ=<class 'str'>, description='List of axes in inner dimension of generator that should be moved'), part_info: Anno(name='APartInfo', typ=(<class 'str'>, annotypes._array.Array[malcolm.core.info.Info]), description='The Infos returned from other Parts'), fileTemplate: Anno(name='AFileTemplate', typ=<class 'str'>, description='Printf style template to generate filename relative to fileDir.\nArguments are:\n 1) %s: the value of formatName') = '%s.nxs') Optional[Union[Anno(name='AInfos', typ=<class 'malcolm.core.info.Info'>, description='Infos about current Part status to be passed to other parts'), Sequence[malcolm.core.info.Info], malcolm.core.info.Info]] [source]
- Parameters
context (Context) – Context that should be used to perform operations on child blocks
fileDir (str) – Directory to write data to
generator (CompoundGenerator) – Generator instance providing specification for scan
axesToMove (str) – List of axes in inner dimension of generator that should be moved
part_info – The Infos returned from other Parts
fileTemplate (str) – Printf style template to generate filename relative to fileDir. Arguments are: 1) %s: the value of formatName
- Returns
Infos about current Part status to be passed to other parts
- Return type
- on_post_configure(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), part_info: Anno(name='APartInfo', typ=(<class 'str'>, annotypes._array.Array[malcolm.core.info.Info]), description='The Infos returned from other Parts')) None [source]
- Parameters
context (Context) – Context that should be used to perform operations on child blocks
part_info – The Infos returned from other Parts
- create_files()[source]
Create the files that will be used by Savu
- <ID>-savu.nxs - Input data file for Savu. Links to Panda data, and
datasets which contain the kinematics code and variables, and whether to use min, mean and max datasets, or just the mean.
<ID>-savu_pl.nxs - Savu process list
<ID>-kinematics-vds.nxs - VDS file linking to Savu processed data
- class malcolm.modules.ADPandABlocks.parts.PandAPulseTriggerPart(name: Anno(name='APartName', typ=<class 'str'>, description='The name of the Part within the Controller'), mri: Anno(name='AMri', typ=<class 'str'>, description='Malcolm resource id of child object'), initial_visibility: Anno(name='AInitialVisibility', typ=<class 'bool'>, description='Whether the part is initially visible with no config loaded, None means only if child Source/Sink Ports connect to another Block') = True, zero_delay: Anno(name='AZeroDelay', typ=<class 'bool'>, description='Whether to zero the delay or centre the pulse to the frame') = False)[source]
Part for operating a single PULSE block in a PandA to stretch a trigger pulse into a gate centred on the middle of the exposure. For the PandA it needs the following exports:
$(name)Width: width Attribute of the PULSE block with units set to “s”
$(name)Delay: delay Attribute of the PULSE block with units set to “s”
$(name)Step: step Attribute of the PULSE block with units set to “s”
$(name)Pulses: pulses Attribute of the PULSE block
The Detector is required to have:
exposure: an Attribute that reports after configure() the exposure that is expected by the detector
- Parameters
name (str) – The name of the Part within the Controller
mri (str) – Malcolm resource id of child object
initial_visibility (bool) – Whether the part is initially visible with no config loaded, None means only if child Source/Sink Ports connect to another Block
zero_delay (bool) – Whether to zero the delay or centre the pulse to the frame
- on_validate(generator: Anno(name='AGenerator', typ=<class 'scanpointgenerator.core.compoundgenerator.CompoundGenerator'>, description='Generator instance providing specification for scan')) Optional[Union[Anno(name='AParameterTweakInfos', typ=<class 'malcolm.modules.scanning.infos.ParameterTweakInfo'>, description='Parameters that need to be changed to make them compatible'), Sequence[malcolm.modules.scanning.infos.ParameterTweakInfo], malcolm.modules.scanning.infos.ParameterTweakInfo]] [source]
- Parameters
generator (CompoundGenerator) – Generator instance providing specification for scan
- Returns
Parameters that need to be changed to make them compatible
- Return type
- on_report_status(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) Optional[Union[Anno(name='AInfos', typ=<class 'malcolm.core.info.Info'>, description='Infos about current Part status to be passed to other parts'), Sequence[malcolm.core.info.Info], malcolm.core.info.Info]] [source]
- on_configure(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), generator: Anno(name='AGenerator', typ=<class 'scanpointgenerator.core.compoundgenerator.CompoundGenerator'>, description='Generator instance providing specification for scan'), detectors: Optional[Anno(name='ADetectorTable', typ=<class 'malcolm.modules.scanning.util.DetectorTable'>, description='The detectors that should be active and their exposures')] = None) None [source]
- Parameters
context (Context) – Context that should be used to perform operations on child blocks
generator (CompoundGenerator) – Generator instance providing specification for scan
detectors (DetectorTable) – The detectors that should be active and their exposures
- class malcolm.modules.ADPandABlocks.parts.PandASeqTriggerPart(name: Anno(name='APartName', typ=<class 'str'>, description='The name of the Part within the Controller'), mri: Anno(name='AMri', typ=<class 'str'>, description='Malcolm resource id of child object'), initial_visibility: Anno(name='AInitialVisibility', typ=<class 'bool'>, description='Whether the part is initially visible with no config loaded, None means only if child Source/Sink Ports connect to another Block') = True)[source]
Part for operating a pair of Sequencer (SEQ) blocks in a PandA to do position compare at the start of each row, and time based pulses within the row.
Needs the following exports:
seqTableA: table Attribute of the first SEQ block
seqTableB: table Attribute of the second SEQ block
seqSetEnable: forceSet Method of an SRGATE that is used to gate both SEQs
seqReset: forceRst Method of an SRGATE that is used to gate both SEQs
- Parameters
- on_report_status(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) Optional[Union[Anno(name='AInfos', typ=<class 'malcolm.core.info.Info'>, description='Infos about current Part status to be passed to other parts'), Sequence[malcolm.core.info.Info], malcolm.core.info.Info]] [source]
- setup_pcomp_dicts(seqa: malcolm.core.views.Block, seqb: malcolm.core.views.Block, axis_mapping: Dict[str, malcolm.modules.pmac.infos.MotorInfo]) None [source]
Setup the axis mapping and trigger enum attributes for position compare.
- reset_seq(context)[source]
Reset the PandA sequencer using the given context.
We need to use the correct context when calling this function, as it will otherwise get blocked.
- on_configure(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), completed_steps: Anno(name='ACompletedSteps', typ=<class 'int'>, description='Number of steps already completed'), steps_to_do: Anno(name='AStepsToDo', typ=<class 'int'>, description='Number of steps we should configure for'), part_info: Anno(name='APartInfo', typ=(<class 'str'>, annotypes._array.Array[malcolm.core.info.Info]), description='The Infos returned from other Parts'), generator: Anno(name='AGenerator', typ=<class 'scanpointgenerator.core.compoundgenerator.CompoundGenerator'>, description='Generator instance providing specification for scan'), axesToMove: Anno(name='AAxesToMove', typ=<class 'str'>, description='List of axes in inner dimension of generator that should be moved')) None [source]
- Parameters
context (Context) – Context that should be used to perform operations on child blocks
completed_steps (int) – Number of steps already completed
steps_to_do (int) – Number of steps we should configure for
part_info – The Infos returned from other Parts
generator (CompoundGenerator) – Generator instance providing specification for scan
axesToMove (str) – List of axes in inner dimension of generator that should be moved
- on_pre_run(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) None [source]
- Parameters
context (Context) – Context that should be used to perform operations on child blocks
- on_run(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) None [source]
- Parameters
context (Context) – Context that should be used to perform operations on child blocks
- on_reset(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) None [source]
- Parameters
context (Context) – Context that should be used to perform operations on child blocks
- on_abort(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) None [source]
- Parameters
context (Context) – Context that should be used to perform operations on child blocks
- post_inner_scan(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), completed_steps: Anno(name='ACompletedSteps', typ=<class 'int'>, description='Number of steps already completed'), steps_to_do: Anno(name='AStepsToDo', typ=<class 'int'>, description='Number of steps we should configure for'), part_info: Anno(name='APartInfo', typ=(<class 'str'>, annotypes._array.Array[malcolm.core.info.Info]), description='The Infos returned from other Parts'), generator: Anno(name='AGenerator', typ=<class 'scanpointgenerator.core.compoundgenerator.CompoundGenerator'>, description='Generator instance providing specification for scan'), axesToMove: Anno(name='AAxesToMove', typ=<class 'str'>, description='List of axes in inner dimension of generator that should be moved')) None [source]
- Parameters
context (Context) – Context that should be used to perform operations on child blocks
completed_steps (int) – Number of steps already completed
steps_to_do (int) – Number of steps we should configure for
part_info – The Infos returned from other Parts
generator (CompoundGenerator) – Generator instance providing specification for scan
axesToMove (str) – List of axes in inner dimension of generator that should be moved