Skip to content

Overview

The PickyBoi is a device used to forward only a subset of trains from any given source. That is, it receives input (on the input input channel) and sends it along (on the output output channel), but only for certain trains. In particular, it is developed to enable previewing trains picked by a pulse picker unit in a Karabo channel kind of way. For more information about this use case, see example setup

To facilitate other use cases, the functionality of the PickyBoi is split into three components: one deciding which trains to pick, one to follow a pulse picker trigger device, and one to write the picked train(s) to some HDF5 file (relevant only for near-online optimization procedures, not suitable for regular data collection). These are described in more detail under components.

Example setup

Typical fast detector previews (such as those provided by DetectorAssemblers in calng deployments) update at the same rate as the pipeline they belong to - up to 10 Hz (which the Karabo GUI will typically throttle down to 2 Hz actually displayed). As they are intended to be always on and updating to allow monitoring the detector (and given the throttling by the GUI server), it is hard to get a good look at any specific interesting train - for instance, a single train for which a pulse picker unit let light through.

In this case, connecting a PickyBoi to a preview source is a way to enable exactly this. The following configuration steps would then apply:

  • The input of the PickyBoi should connect to the preview output
  • In the case of a preview from a DetectorAssembler, this would be :preview.output
  • The ppu.device property on the PickyBoi should be the name of a PulsePickerTrigger device
  • When monitoring, the PPU component of the PickyBoi will look at the trainTrigger (or fall back to rotor) node of the PulsePickerTrigger to figure out which trains to pick

When the PickyBoi receives input, it automatically updates its output schema to match what it has received (this can be reset with the resetCapturedSchema slot in case whatever it saw was not representative). Forwarding a preview output, this allows you to drag the preview from output.schema.[preview path] directly onto a scene - or simply load the automatically generated scene from the PickyBoi device and copy it from there!

There are some things to keep in mind regarding how different places in the pipeline affect data flow (here assuming something like a multi-module fast detector setup like AGIPD):

  • The correction pipeline only receives certain trains determined by the DAQ train stride; if the train you want to see is not a multiple of the active train stride on the DAQ, you are out of luck
  • The train stride is typically configured via the calibration manager even though the DAQ is upstream of the correction pipeline
  • Preview outputs from correction pipelines consist of a single image, typically sliced out of or computed with a reduction function over multiple frames; this is configured in the correction pipeline (via the manager there)
  • If you want to see the maximum (computed per pixel across the frame axis) values, for instance, the index to preview should be set to -1
  • See the calng docs for more details
  • Similarly, the geometry used for preview assembly is configured next to the correction pipeline (keep in mind, the PickyBoi just forwards, so whatever it gets, it gets)

Components

This section details how the individual parts of the PickyBoi operate. The state of a PickyBoi device is essentially just the state of all of its components (for the Karabo experts: it just applies a StateSignifier to set its state based on the components' states). Each component is supposed to have very simple FSM-like state behavior, using states like:

  • DISABLED: based on current configuration, this component is not used at all
  • PASSIVE: may become active depending on trains received / slots getting called / new configuration coming in
  • MONITORING: is doing something or is ready to start doing something based on new trains coming in
  • ACQUIRING: well, acquiring (or forwarding)
  • ERROR: something went wrong

Picking

PPU

Writing