Comments (7)
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.
from eeg-clean-tools.
A few comments (corrected):
Detrending of linear type is done with the chronux_2 runline
command. The change_row_to_column
is part of chronux, which should be downloaded as part of the plugin so I don't know why there was a problem unless you didn't add it to your path. In PREP it is treated as local so just installing as an EEGLAB plugin (or not installing as an EEGLAB plugin) might not add it to your path correctly.
See @vasileermicioi for correct answer.
from eeg-clean-tools.
@VisLab
1.5/detrendFreq
formula is reducing the frequency by 33%, which means using this formula with a detrendFreq=1Hz will have the same effect as using 1/detrendFreq
with a detrendFreq=0.67Hz
from eeg-clean-tools.
@vasileermicioi: Thank you for pointing that out!
:-(( I looked at the defaults as set in getPrepDefaults.m
to see what we were setting them to. I misread the default as signal.rate/2
, but the default is 1
, the first parameter in the specification structure.
The rules for detrendCutoff
are: it must be positive, numeric, scalar, and have a value less than the Nyquist frequency.
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 detrendCutoff
based on the frequency of the physical phenomenon you are detrending and 0.67 Hz is a reasonable detrending interval for EEG.
I think we probably should have called this parameter detrendCutoffHz
to be clearer.
from eeg-clean-tools.
@VisLab
Thank you for your help, it was an issue with the path & the example code runs now.
Would you agree with redefining windowSize
based on 1.0/detrendFreq
as suggested by @vasileermicioi ?
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.
from eeg-clean-tools.
The removeTrend
uses the
linear detrending when the else
clause is taken. The windowSize
is set to 1.5/detrendOut.detrendCutoff
.
Since the default for detrendCutoff
is 1, the default is 1.5 seconds. or 0.6667 Hz. I think this is a good default setting for EEG.
What I was trying to convey is that the name detrendCutoff
is probably not the best name for this parameter, but the calculation is just fine. If we were going to change the windowSize
to 1/detrendOut.detrendCutoff
we would probably want to change the default detrendCutoff
to 0.6667 instead of 1. Remember if you have a strong feeling that the detrending should be done using a different default cutoff, Prep will still work with a modified setting.
from eeg-clean-tools.
@VisLab Thank you for your response. To confirm I understood:
- when
detrendType = 'linear'
,detrendCutoff = 1
will filter with a cutoff frequency of 0.6667 Hz? - when
detrendType = 'high pass'
,detrendCutoff = 1
will filter with a cutoff frequency of 1 Hz?
from eeg-clean-tools.
Related Issues (20)
- adding back online reference
- restoreEEGOptions not quite working correctly HOT 1
- struct2str getNumerical HOT 2
- Change to EEGLAB options HOT 1
- Change name of findpeaks
- Print out errors on command line when verbose option is set HOT 1
- Should I do the channel location first? HOT 7
- should I do a low pass filter and another rereference after PREP, before ICA?
- Add reference information in EEG struct after PREP
- Crash on movefile in publishPrepReport HOT 4
- Interpolation prior to ICA HOT 2
- Minimum of three iterations in robust re-reference? HOT 2
- Error using cleanLineNoise (line 57) HOT 3
- Bad-by-dropout channels ignored during re-referencing? HOT 5
- Why is EEGlab PREP not flagging up EEG files as "problematic" if the number of interpolated channels is > 25%? HOT 1
- Out of memory error HOT 3
- Channel locations missing after the pipeline
- PyPrep Noisy Channel Parameters
- Keep receiving errors when running the PREPpipeline
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eeg-clean-tools.