Skip to content

[essreduce] Ignore out-of-sync choppers when guessing the pulse stride - #782

Merged
SimonHeybrock merged 1 commit into
mainfrom
781-stride-guess-synced-choppers
Oct 6, 2026
Merged

SimonHeybrock merged 1 commit into
mainfrom
781-stride-guess-synced-choppers

Conversation

@SimonHeybrock

Copy link
Copy Markdown
Member

Fixes #781.

guess_pulse_stride_from_choppers now only uses choppers whose rotation period is a whole number of pulse periods. A chopper at any other frequency is closed by close_non_synced_disk_choppers anyway, but it still set the stride, so the inflated stride could close healthy choppers too. With DREAM's setpoints from scipp/esslivedata#1309 (7 / 7 / 14 / 5 Hz) the guess was 3, which closed the two 7 Hz pulse-shaping choppers along with the 5 Hz overlap chopper. The guess is now 2 and only the overlap chopper is closed.

Choppers faster than the source already contributed nothing (round(14 / 28) = 0), so the change only affects slow choppers whose frequency does not divide the source frequency. BEER's mode choppers (all multiples of 7 Hz; 63 Hz never contributed) give the same stride as before.

Test plan

  • New test: a 7 Hz and a 5 Hz chopper give stride 2, and only the 5 Hz chopper is closed. Fails without the fix.
  • pytest packages/essreduce/tests/unwrap: 395 passed
  • scipp/esslivedata LUT end-to-end tests against this branch: a lone 5 Hz chopper on DREAM no longer raises the stride to 3, so the wavelength monitor job keeps publishing instead of failing on essreduce: event monitors cannot be converted to wavelength when pulse skipping #750

🤖 Generated with Claude Code

A chopper whose rotation period is not a whole number of pulse periods
is closed by close_non_synced_disk_choppers. Letting it set the stride
made healthy choppers incompatible with the frame period, so they were
closed as well: with choppers at 7 and 5 Hz the guess was 3 and both
were closed, instead of a stride of 2 with only the 5 Hz chopper closed.

Closes #781

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the essreduce Issues for essreduce. label Oct 6, 2026
@SimonHeybrock
SimonHeybrock requested a review from nvaytet October 6, 2026 09:50
@SimonHeybrock
SimonHeybrock added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit f4b24f5 Oct 6, 2026
26 checks passed
@SimonHeybrock
SimonHeybrock deleted the 781-stride-guess-synced-choppers branch October 6, 2026 10:45
SimonHeybrock added a commit to scipp/esslivedata that referenced this pull request Oct 6, 2026
essreduce closes a chopper that is not in sync with the frame and drops
a stopped one (scipp/ess#751, scipp/ess#782). A chopper out of sync
transmits a different band on every pulse, and scippneutron used to
refuse such a cascade, so the lookup-table job raised on every batch and
consumers kept converting with the table from before the choppers moved.
With the chopper closed, the job publishes a table that lets nothing
through past it, and consumers publish empty results instead.

The table alone looks like a quiet beam, so the workflow wraps
close_non_synced_disk_choppers and logs which choppers were closed
(choppers_out_of_phase_with_source) or found stopped (choppers_stopped).
The choppers are found by comparing essreduce's inputs and outputs, so
its conditions are not repeated here.

End-to-end tests cover a lone 5 Hz overlap chopper on DREAM and DREAM's
setpoints observed in production on 2026-09-10 (#1309).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
SimonHeybrock added a commit to scipp/esslivedata that referenced this pull request Oct 8, 2026
essreduce 26.10.0 replaces a chopper that is out of sync with the source
by one with no slits instead of letting scippneutron raise, and guesses
the pulse stride only from choppers that are in sync (scipp/ess#751,
scipp/ess#782). The blocking lookup table and its logging depend on this.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

essreduce Issues for essreduce.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[essreduce] Pulse-stride guess counts choppers that are out of sync with the source

2 participants