What is the right time to apply cHPI filter (if at all)?

Dear Forum,

I wanted to apply SSS using maxwell_filter() and noticed that the high-frequency cHPI signal was still present after SSS. However, if I filter cHPI signal before the maxfilter, I don’t know if there is still enough head position information for maxfilter to work. Could someone share some advice? Currently my pipeline after loading the raw signal is:

  1. Compute cHPI amplitude, then cHPI location, then head position (perhaps this is enough for the maxfilter?).
  2. Filter out cHPI and line.
  3. Identify bad channels using the cHPI filtered signal.
  4. Remove the bad projector (specific to our site).
  5. Apply SSS using the head position computed from step 1 and the average device-head transformation as the destination.
  6. Inspect the signal and manually remove segments contaminated with movement.

Does this look right?


1 Like

@larsoner @richard Could one of you check this question?

My first instinct would have been that maxwell_filter calls find_bads_channels_maxwell and filter_chpi internally to return a ‘clean’ raw, but the more I think about it, the less likely it’s the case.

@yaqing yes that looks correct to me! Indeed the chpi filtering and fitting steps etc. are separate from the maxwell_filter call to allow more fine-grained control of parameters and inspection of outputs etc.

1 Like

Thanks for your clarification!

1 Like