tierneytim / OPM

Tools for OPM processing using SPM
GNU General Public License v2.0
17 stars 7 forks source link

Mark bad channals when channel names overlapped #18

Closed ZQInQAAS closed 1 year ago

ZQInQAAS commented 1 year ago

Hi, I got a problem when I try to mark bad channals of my own data during use spm_opm_hfc.m,Because my channal names have some overlap,such as 'CH1' and 'CH12',so I try to use codes [indsRem, ~] = match_str(s.label, badLabels);
to replace indsRem = []; for i =1:length(badLabels) indsRem=[indsRem strmatch(badLabels{i},s.label)]; end in spm_opm_hfc.m to solve this problem. where the function match_str() is from \toolbox\spm12\external\fieldtrip\utilities\match_str.m .

By the way, when I applied HFC on my own opm data, I found the results are exactly the same when I change the order (S.L). I wonder if it is because my data only have one axis?
And I set S.balance=0 since I don't have an MRI data, I don't know how much does that affect the outcome.

tierneytim commented 1 year ago

Hi, I'll have a look at the naming issue. Sounds like a bug. Can you post the code you used to check for numerical equivalence when changing S.L? These results can be very similar for a number of reasons but are unlikely to be identical unless there is a bug or your array can't distinguish between fields and gradients.

ZQInQAAS commented 1 year ago

Oh, sorry, I fixed some error in my codes. Afterthat I got the results here: 1681453518699 It seems unexpected, have you ever met this kind of problem?

tierneytim commented 1 year ago

These results are to be expected. There are two problems here. The first is statistical and the second is physical.

The statistical problem is that the first four orders of harmonics require 3,8,15 and 24 regressors respectively. As you have a small number of channels you will explain a lot of variability by chance with low channel systems.

The second problem is that even for large channel systems single axis systems are not good at distinguishing between brain signal and interference which is also why the amplitude is decreasing.

Ultimately,one should only use higher order harmonics with large channel number, multiaxis systems

ZQInQAAS commented 1 year ago

Now I know it. Thank you so much~