Skip to content

Commit b3a93cb

Browse files
committed
Made filter_capacitive_spikes accept 1-d arrays again.
1 parent c403a3a commit b3a93cb

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

pcpostprocess/hergQC.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,14 +513,13 @@ def filter_capacitive_spikes(self, current, times, voltage_step_times):
513513
"""
514514
Set values to 0 where they lie less than ``removal_time`` after a change in voltage.
515515
516-
@param current: The observed current
516+
@param current: The observed current, as a 1 or multi-dimensional array.
517+
If a multi-dimensional array is used, repeats must be
518+
on the first axis, and time series values on the 2nd.
517519
@param times: the times at which the current was observed
518520
@param voltage_step_times: the times at which there are discontinuities in Vcmd
519521
@returns the ``current`` with some samples set to 0
520522
"""
521-
if len(current.shape) != 2:
522-
raise ValueError('Current must have 2 dimensions (sweep, values)')
523-
524523
voltage_step_ends = np.append(voltage_step_times[1:], np.inf)
525524
for tstart, tend in zip(voltage_step_times, voltage_step_ends):
526525
win_end = tstart + self.removal_time

0 commit comments

Comments
 (0)