Skip to content

Commit

Permalink
Merge pull request #84 from XENONnT/GiovanniVolta-patch-1
Browse files Browse the repository at this point in the history
Change np.abs() whit -1*
  • Loading branch information
JelleAalbers authored Apr 7, 2020
2 parents d4a2c81 + e5e5966 commit 945a950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion straxen/plugins/led_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def get_amplitude(raw_records, led_window, noise_window, baseline_window):
on = np.zeros((len(raw_records)), dtype=_on_off_dtype)
off = np.zeros((len(raw_records)), dtype=_on_off_dtype)
for i, r in enumerate(raw_records):
r['data'][:] = np.abs(r['data'] - np.sum(r['data'][left_bsl:right_bsl])/bsl_diff)
r['data'][:] = -1.*(r['data'] - np.sum(r['data'][left_bsl:right_bsl])/bsl_diff)
on[i]['amplitude'] = safe_max(r['data'][led_window[0]:led_window[1]])
on[i]['channel'] = r['channel']
off[i]['amplitude'] = safe_max(r['data'][noise_window[0]:noise_window[1]])
Expand Down

0 comments on commit 945a950

Please sign in to comment.