-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Computation of windowSize based on detrendCutoff in localDetrend #33
Comments
A few comments (corrected): Detrending of linear type is done with the chronux_2 See @vasileermicioi for correct answer. |
@VisLab |
@vasileermicioi: Thank you for pointing that out! :-(( I looked at the defaults as set in The rules for case 'detrend'
defaults = struct( ...
'detrendCutoff', ...
getRules(1, {'numeric'}, ...
{'positive', 'scalar', '<', signal.srate/2}, ...
'Frequency cutoff for detrending or high pass filtering.'), ...
); The key observation is that you should set your I think we probably should have called this parameter |
@VisLab Would you agree with redefining I.e., instead of:
windowSize = 1.0/detrendOut.detrendCutoff; We were wondering if we should make this change in our implementation and were interested in your input on whether that would be correct. |
The Since the default for What I was trying to convey is that the name |
@VisLab Thank you for your response. To confirm I understood:
|
That is correct. Remember these are different methods and they do different things to the signal and cutoff frequencies are not direct equivalents. Most of our testing was done with the high pass method. However, based on my experience, I don't believe that the detection of bad channels and robust reference is very sensitive to this choice or to the exact choice of frequency as long as it is in the ballpark. Prep makes a big effort to produce a final signal that is not filtered or otherwise detrended so that users are free to select their filtering/trending based on application after referencing. |
Hello! Using a version of the
removeTrend
function ported to Python, I noticed that frequencies below thedetrendCutoff
inremoveTrend
are not completely attenuated when using the local method: sappelhoff/pyprep#125I was wondering if this is the desired output, since it isn't clear to me why the window size is computed by dividing 1.5 by the cutoff frequency:
EEG-Clean-Tools/PrepPipeline/utilities/removeTrend.m
Line 79 in 9ac9ea0
Also, I tried to test the original MATLAB code, but I wasn't able to debug it myself. Any tips there would be appreciated.
Script:
Error:
The text was updated successfully, but these errors were encountered: