Skip to content

Commit

Permalink
Merge pull request #259 from European-XFEL/fix/adq-single-pulse-data
Browse files Browse the repository at this point in the history
Fix pulse slicing code to advance to next train on same pulse ID
  • Loading branch information
philsmt authored Nov 20, 2024
2 parents f7cceac + 7ad2850 commit e058209
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Fixed:
- [`Scan.plot_bin_by_steps()`][extra.components.Scan.plot_bin_by_steps] would
previously ignore the `title`/`xlabel`/`ylabel` arguments, now it actually
uses them (!237).
- [`AdqRawChannel.pulse_data()`][extra.components.AdqRawChannel.pulse_data] no longer erroneously reads in the same train data for every pulse if there is only a single pulse per train (!259).

Changed:
- [`gaussian()`][extra.utils.gaussian] has a new `norm` parameter to allow
Expand Down
4 changes: 2 additions & 2 deletions src/extra/components/_adq.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def _reshape_flat_pulses(
for i in range(pulse_ids.shape[0]):
cur_pid = pulse_ids[i]

if cur_pid < prev_pid:
# Pulse ID decreasing means a new train started.
if cur_pid <= prev_pid:
# Pulse ID not increasing means a new train started.
pid_offset = cur_pid
j += 1

Expand Down

0 comments on commit e058209

Please sign in to comment.