Skip to content

Phase calculator using Hilbert transformer filters

Compare
Choose a tag to compare
@ethanbb ethanbb released this 24 Jan 16:32
· 2 commits to hilbert-transformer since this release

DOI

This is the first official "release" of the hilbert-transformer version of the Phase Calculator. It uses one of several pre-designed FIR Hilbert transformer filters (chosen based on the frequency range of interest), instead of doing an FFT and Hilbert transform to get the phase as in version 1. Downsampling to 500 Hz after the bandpass filter is required to use transformers with acceptable magnitude responses. We then compensate for the transformer's group delay by predicting a number of samples equal to the delay using an autoregressive model, as in version 1. Overall, this version tends to be more efficient, both because the FFT step is avoided and because much fewer samples need to be predicted using the AR model.

  • Note: all channels are disabled by default - you must enable the ones you want to process by selecting them in the "param" section of the channel drawer.

Features:

  • If doing closed-loop stimulation, inputting a TTL event at stimulation times lets you monitor the precise phases of stimulation with a ~1s delay (open the visualizer in a tab or separate window to get started). (This feature still uses a long FFT/Hilbert transform, to maximize the accuracy.)
  • Can output the estimated magnitude or quadrature of the signal within the specified frequency range.