Skip to content

Commit

Permalink
add 30 Hz dead time (#33)
Browse files Browse the repository at this point in the history
* add 30 Hz dead time

* add 30 Hz dead time
  • Loading branch information
mdoucet authored May 10, 2024
1 parent 788720f commit b62c0ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions reduction/lr_reduction/DeadTimeCorrection.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ def PyExec(self):
t_series = np.asarray(_ws_sc.getRun()['proton_charge'].value)
non_zero = t_series > 0
n_pulses = np.count_nonzero(non_zero)

# If we skip pulses, we need to account for them when computing the
# instantaneous rate
chopper_speed = _ws_sc.getRun()['SpeedRequest1'].value[0]
n_pulses = n_pulses * chopper_speed / 60.0
rate = counts_ws.readY(0) / n_pulses

# Compute the dead time correction for each TOF bin
Expand Down
2 changes: 1 addition & 1 deletion reduction/lr_reduction/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.26'
__version__ = '2.0.27'

0 comments on commit b62c0ad

Please sign in to comment.