Skip to content

Fix for Hilbert phase computation and visualization - #123

Open
cosimolupo wants to merge 1 commit into
NeuralEnsemble:masterfrom
APE-group:PR_to_NE/bugfix/hilbert_phase
Open

Fix for Hilbert phase computation and visualization#123
cosimolupo wants to merge 1 commit into
NeuralEnsemble:masterfrom
APE-group:PR_to_NE/bugfix/hilbert_phase

Conversation

@cosimolupo

@cosimolupo cosimolupo commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

The Hilbert transform is used for trigger detection, computed over the whole signal passed via the --data CLI argument. However, when moving to the visualization part, for the selected channel(s), Hilbert phase is recomputed again, over the (possibly restricted) interval [plot_tstart,plot_tstop], and eventually plotted. This implies visualizing a wrong Hilbert phase, different from the one actually computed at the beginning of the script and used for trigger detection.
This PR fixes such bug, plotting the same Hilbert-phase full signal used for trigger detection. In addition, it imporves the visualization itself, by removing a useless zscoring of the signal.

@cosimolupo cosimolupo added the bug label Jan 21, 2026
@cosimolupo cosimolupo self-assigned this Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant