Skip to content

Commit

Permalink
Remove a redundant function and fix some style
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Jan 24, 2024
1 parent 62ee281 commit 5ded14e
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion strax/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def copy_to_buffer(
source: np.ndarray, buffer: np.ndarray, func_name: str, field_names: Optional[Tuple[str]] = None
):
"""Copy the data from the source to the destination e.g. raw_records to records. To this end, we
dynamically create the njitted function with the name 'func_name' (should start with "_").
dynamically create the njitted function with the name 'func_name' (should start with "_").
:param source: array of input
:param buffer: array of buffer to fill with values from input
Expand Down
3 changes: 0 additions & 3 deletions strax/plugins/down_chunking_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ def __init__(self):
"a single data-type."
)

def iter(self, iters, executor=None):
return super().iter(iters, executor)

def _iter_compute(self, chunk_i, **inputs_merged):
return self.do_compute(chunk_i=chunk_i, **inputs_merged)

Expand Down
2 changes: 1 addition & 1 deletion strax/plugins/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class IterDone(Exception):
if time.time() > last_input_received + self.input_timeout:
raise InputTimeoutExceeded(
f"{self.__class__.__name__}:{id(self)} waited for "
f"more than {self.input_timeout} sec for arrival of "
f"more than {self.input_timeout} sec for arrival of "
f"input chunk {chunk_i}, and has given up."
)

Expand Down
2 changes: 1 addition & 1 deletion strax/processing/hitlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def create_hitlets_from_hits(
if chunk_end is None:
chunk_end = np.iinfo(np.int64).max

# Merge concatenate overlapping within a channel. This is important
# Merge concatenate overlapping within a channel. This is important
# in case hits were split by record boundaries. In case we
# accidentally concatenate two PMT signals we split them later again.
hits = strax.concat_overlapping_hits(
Expand Down
2 changes: 1 addition & 1 deletion strax/processing/peak_splitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def symmetric_moving_average(a, wing_width):
"""Return the moving average of a, over windows of length [2 * wing_width + 1] centered on each
sample.
(i.e. the window covers each sample itself, plus a 'wing' of width wing_width on either side)
(i.e. the window covers each sample itself, plus a 'wing' of width wing_width on either side)
"""
if wing_width == 0:
Expand Down
2 changes: 1 addition & 1 deletion strax/run_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def keys_for_runs(
return [self.key_for(r, target) for r in run_ids]
elif len(run_ids):
# Get the lineage once, for the context specifies that the
# defaults may not change!
# defaults may not change!
p = self._get_plugins((target,), run_ids[0])[target]
return [strax.DataKey(r, target, p.lineage) for r in run_ids]
else:
Expand Down
2 changes: 1 addition & 1 deletion strax/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def compute(self, chunk_i):


class DownSampleRecords(strax.DownChunkingPlugin):
"""PLugin to test the downsampling of Chunks during compute.
"""Plugin to test the downsampling of Chunks during compute.
Needed for simulations.
Expand Down

0 comments on commit 5ded14e

Please sign in to comment.