Skip to content

Commit

Permalink
Make variables names more robust (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx authored Oct 16, 2024
1 parent a59bd07 commit c509e69
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions strax/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ def peak_dtype(
n_channels=100,
n_sum_wv_samples=200,
n_widths=11,
store_data_top=True,
hits_timing=True,
save_waveform_start=True,
store_data_top=True,
store_data_start=True,
):
"""Data type for peaks - ranges across all channels in a detector
Remember to set channel to -1 (todo: make enum)
Expand Down Expand Up @@ -212,7 +212,7 @@ def peak_dtype(
)
dtype.insert(9, top_field)

if save_waveform_start:
if store_data_start:
start_field = (
(
"Waveform data in PE/sample (not PE/ns!), first 200 not downsampled samples",
Expand Down
4 changes: 2 additions & 2 deletions strax/processing/peak_splitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def __call__(
records,
rlinks,
to_pe,
n_top_channels,
store_data_start,
n_top_channels=n_top_channels,
store_data_start=store_data_start,
)
strax.compute_widths(new_peaks)
elif data_type == "hitlets":
Expand Down
4 changes: 2 additions & 2 deletions tests/test_peak_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_sum_waveform(records):
min_channels=1,
max_duration=10_000_000,
)
strax.sum_waveform(peaks, hits, records, rlinks, np.ones(n_ch), n_top_channels)
strax.sum_waveform(peaks, hits, records, rlinks, np.ones(n_ch), n_top_channels=n_top_channels)

for p in peaks:
# Area measures must be consistent
Expand Down Expand Up @@ -117,7 +117,7 @@ def test_sum_waveform(records):
records,
rlinks,
np.ones(n_ch),
n_top_channels,
n_top_channels=n_top_channels,
select_peaks_indices=np.array([0]),
)

Expand Down

0 comments on commit c509e69

Please sign in to comment.