Skip to content

Commit

Permalink
Fix TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
toni-neurosc committed Jan 27, 2024
1 parent 63f5bb9 commit a62eae5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py_neuromodulation/nm_sharpwaves.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ def analyze_waveform(self) -> None:

troughs = troughs[first_valid:last_valid + 1] # Remove non valid troughs

peak_idx_left = np.array(peak_idx_left, dtype=np.integer)
peak_idx_right = np.array(peak_idx_right, dtype=np.integer)

peak_left = self.data_process_sw[peak_idx_left]
peak_right = self.data_process_sw[peak_idx_right]
trough_values = self.data_process_sw[troughs]
Expand All @@ -290,7 +293,7 @@ def analyze_waveform(self) -> None:
# self.troughs_idx.append(trough_idx)

""" Calculate features (vectorized) """

if self.sw_settings["sharpwave_features"]["interval"]:
self.interval = np.concatenate(([0], np.diff(troughs))) * (1000 / self.sfreq)

Expand Down

0 comments on commit a62eae5

Please sign in to comment.