diff --git a/pipeline/stage03_trigger_detection/scripts/hilbert_phase.py b/pipeline/stage03_trigger_detection/scripts/hilbert_phase.py index a1a31a135..06e170da3 100644 --- a/pipeline/stage03_trigger_detection/scripts/hilbert_phase.py +++ b/pipeline/stage03_trigger_detection/scripts/hilbert_phase.py @@ -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]]} diff --git a/pipeline/stage04_wave_detection/scripts/trigger_clustering.py b/pipeline/stage04_wave_detection/scripts/trigger_clustering.py index 3243258b5..4db9b0264 100644 --- a/pipeline/stage04_wave_detection/scripts/trigger_clustering.py +++ b/pipeline/stage04_wave_detection/scripts/trigger_clustering.py @@ -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],