Skip to content

Commit

Permalink
Do not convert from float32 to float64
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Dec 19, 2024
1 parent 1f7fd4c commit 326d5b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion strax/processing/peak_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def compute_widths(peaks):
# We lose the 50% fraction with this operation, let's add it back
desired_fr = strax.stable_sort(np.unique(np.append(desired_fr, [0.5])))

fr_times = index_of_fraction(peaks, desired_fr) * peaks["dt"].reshape(-1, 1)
fr_times = index_of_fraction(peaks, desired_fr)
fr_times *= peaks["dt"].reshape(-1, 1)

i = len(desired_fr) // 2
median_time = fr_times[:, i]
Expand Down

0 comments on commit 326d5b4

Please sign in to comment.