|
10 | 10 |
|
11 | 11 | class FeaturesLoader: |
12 | 12 | """ |
13 | | - Feature can be computed in memory or in a folder contaning npy files. |
| 13 | + Feature can be computed in memory or in a folder containing npy files. |
14 | 14 |
|
15 | 15 | This class read the folder and behave like a dict of array lazily. |
16 | 16 |
|
@@ -52,7 +52,7 @@ def aggregate_sparse_features(peaks, peak_indices, sparse_feature, sparse_mask, |
52 | 52 | """ |
53 | 53 | Aggregate sparse features that have unaligned channels and realigned then on target_channels. |
54 | 54 |
|
55 | | - This is usefull to aligned back peaks waveform or pca or tsvd when detected a differents channels. |
| 55 | + This is useful to aligned back peaks waveform or pca or tsvd when detected a differents channels. |
56 | 56 |
|
57 | 57 |
|
58 | 58 | Parameters |
@@ -87,7 +87,7 @@ def aggregate_sparse_features(peaks, peak_indices, sparse_feature, sparse_mask, |
87 | 87 | peak_inds = np.flatnonzero(local_peaks["channel_index"] == chan) |
88 | 88 | if np.all(np.isin(target_channels, sparse_chans)): |
89 | 89 | # peaks feature channel have all target_channels |
90 | | - source_chans = np.flatnonzero(np.in1d(sparse_chans, target_channels)) |
| 90 | + source_chans = np.flatnonzero(np.isin(sparse_chans, target_channels)) |
91 | 91 | aligned_features[peak_inds, :, :] = sparse_feature[peak_indices[peak_inds], :, :][:, :, source_chans] |
92 | 92 | else: |
93 | 93 | # some channel are missing, peak are not removde |
@@ -149,7 +149,7 @@ def apply_waveforms_shift(waveforms, peak_shifts, inplace=False): |
149 | 149 | """ |
150 | 150 | Apply a shift a spike level to realign waveforms buffers. |
151 | 151 |
|
152 | | - This is usefull to compute template after merge when to cluster are shifted. |
| 152 | + This is useful to compute template after merge when to cluster are shifted. |
153 | 153 |
|
154 | 154 | A negative shift need the waveforms to be moved toward the right because the trough was too early. |
155 | 155 | A positive shift need the waveforms to be moved toward the left because the trough was too late. |
|
0 commit comments