Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/components/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ easier.
- [XrayPulses][extra.components.XrayPulses]
- [OpticalLaserPulses][extra.components.OpticalLaserPulses]
- [DldPulses][extra.components.DldPulses]
- [Pulse Picker Unit][extra.components.PPU]
- [Pulse Picker Unit](pulse-picker-unit.md)
- [Scans](scans.md)
- [Scantool][extra.components.Scantool]
- [Scan][extra.components.Scan]
1 change: 1 addition & 0 deletions docs/components/pulse-picker-unit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: extra.components.PPU
2 changes: 0 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ nav:
- detector-geometry.md
- Components:
- components/index.md
- components/scans.md
- components/pulse-patterns.md
Comment on lines -25 to -26

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if all pages were listed in the index. In general I dislike having disembodied pages because otherwise navigating to them requires that someone knows the right link to click on the right page (e.g. I always get confused when trying to find the xwiz docs).

- karabo-bridge.md
- utilities.md
- changelog.md
Expand Down
16 changes: 12 additions & 4 deletions src/extra/components/ppu.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,17 @@ def _find_ppu(run: DataCollection, device: str = None):


class PPU:
"""Interface to a PPU (Pulse Picker Unit).
"""Interface to a Pulse Picker Unit (PPU).

Despite its name, the PPU picks trains, not pulses.
Despite its name, the PPU selects a bunch train from within the 10Hz
structure and block the remainder of the beam.

Technical description:
A motor-driven absorber rotor is rotated into the beam axis in order to
block the XFEL beam when triggered. The rotor is contained within a UHV
chamber. In terms of temporal structure, the beam pipe is blocked by an
absorbing rotor for up to 9/10ths of a second or vice versa,
synchronized to the facility clock/trigger.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very useful information for the docs, I only wonder (naive question) how the 9/10 blocking scheme, i.e. one train per second picked, fits to an overall run where 1 / 309 trains are selected - like run 3379, 50 for instance, shouln't it then be 30 trains with non-consecutive IDs?

"""

_DEVICE_CLASSES = ["PulsePickerTrainTrigger", "PulsePickerTrainTriggerCopy"]
Expand All @@ -78,8 +86,8 @@ def __init__(
contains more than one PPU. This can be any of:
- The device name of the source.
- A `SourceData` or [KeyData][extra_data.KeyData] of the
control source (e.g. `HED_XTD6_PPU/MDL/PPU_TRIGGER`) of an
XGM.
control source (e.g. `HED_XTD6_PPU/MDL/PPU_TRIGGER`) of a
PPU.
- The alias name of either a `SourceData` or
[KeyData][extra_data.KeyData] belonging to a PPU.
- A unique (case-insensitive) substring of a PPU source name.
Expand Down
2 changes: 0 additions & 2 deletions tests/test_components_ppu.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,10 @@ def test_trains(ppu_run):
ppu = PPU(ppu_run, 'ppu-dipole')
reduced_run = ppu.trains()
assert isinstance(reduced_run, DataCollection)
assert len(reduced_run.train_ids) == 3
assert reduced_run.train_ids == [10015, 10045, 10075]

# split per sequence
reduced_run = ppu.trains(split_sequence=True)
assert isinstance(reduced_run, list)
assert len(reduced_run) == 3
assert len(reduced_run[0].train_ids) == 1
assert reduced_run[0].train_ids == [10015]