Skip to content

Commit

Permalink
fix bug due to G-Node/nix#832
Browse files Browse the repository at this point in the history
  • Loading branch information
rgutzen committed Mar 9, 2021
1 parent f4c2628 commit 2c98950
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions pipeline/stage03_trigger_detection/scripts/hilbert_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ def _detect_phase_crossings(phase):
sort_idx = np.argsort(up_transitions)

evt = neo.Event(times=up_transitions[sort_idx]*asig.times.units,
labels=['UP'] * len(up_transitions),
name='Transitions',
array_annotations={'channels':channels[sort_idx]},
hilbert_transition_phase=transition_phase,
description='Transitions from down to up states. '\
+'annotated with the channel id ("channels").')
labels=['UP'] * len(up_transitions),
name='Transitions',
array_annotations={'channels':channels[sort_idx]},
hilbert_transition_phase=transition_phase,
description='Transitions from down to up states. '\
+'annotated with the channel id ("channels").')

for key in asig.array_annotations.keys():
evt_ann = {key : asig.array_annotations[key][channels[sort_idx]]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def cluster_triggers(event, metric, neighbour_distance, min_samples,
wave_idx = up_idx[cluster_idx]

evt = neo.Event(times=event.times[wave_idx],
labels=clustering.labels_[cluster_idx],
labels=clustering.labels_[cluster_idx].astype(str),
name='Wavefronts',
array_annotations={'channels':event.array_annotations['channels'][wave_idx],
'x_coords':triggers[:,0][cluster_idx],
Expand Down

0 comments on commit 2c98950

Please sign in to comment.