Skip to content
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

Should I do the channel location first? #20

Closed
guishuyunye-lyw opened this issue Aug 20, 2020 · 7 comments
Closed

Should I do the channel location first? #20

guishuyunye-lyw opened this issue Aug 20, 2020 · 7 comments

Comments

@guishuyunye-lyw
Copy link

guishuyunye-lyw commented Aug 20, 2020

Dear PREP pipeline group
I have scaned your paper and read the introduction to prep, I appreciate what you have done, but I still felt confuse when I use this plugin on EEGlab. I check all the parameter setting choice, and find none directing to montage.

All in all, I want to want should I do with my data, before I use the tool. should I complete channel location first? should I discard the Veog channel. I cannot find any glue about that on your website.

image

After the process, I cannot see any change through this EEGlab interface. no channel location, no reference.

@VisLab
Copy link
Owner

VisLab commented Aug 20, 2020

This is the EEGLAB menu, not the PREP pipeline menu. It looks like you have already loaded a dataset. Go to the Tools menu and select the menu item for the PREP pipeline. There will be a menu with buttons for each stage. You will need to set channel numbers in each stage. If you don't PREP uses them all. For line noise removal, you want to include EOG channels. For detrend channels, you probably want to include EOG. For doing the reference, there are actually three sets of channel numbers you need to set.

  1. evaluation channels --- used to evaluate which channels are noisy (use just EEG channels)
  2. reference channels --- used to evaluate the robust average reference (use just EEG channels)
  3. rereference channels --- these channels have the robust average reference subtracted from them (often both EEG and EOG channels are referenced, but not always --- depends on your application).

@guishuyunye-lyw
Copy link
Author

Thank you so much for your reply! I process my data with PREP again following your advices, step by step.
Veog channel's number is the 20. I still not clear with should I do the channel location firstly.
image
After the channel location process through eeglab edit. I ran Prep.
image
image
image
In China, the line frequency is 50hz
image
Excluded 20th channel under reference channnels and evaluation channels condition.
image
After the whole process, I went back to eeglab interface, which shows the data is still unrereference.
image

According to the introduction of PREP, I thought this process have completed the procedures for me:
1 high pass
2 line noise
3 rereference
So I just need to do a low pass process before ICA, without another rereference and other preprocesses?

I am still a amateur in processing EEG data, thx for your patience!

@VisLab
Copy link
Owner

VisLab commented Aug 21, 2020

If you use the default settings for PREP is to high-pass filter at 1 Hz for calculating the robust reference only, but the postprocess keepFiltered parameter is false by default. You are not getting the filtered signal. If you want it to be high-pass filtered, you need to set keepFiltered to true.

Beyond that, it would be good to go through the tutorials for EEGLAB. They have a recommended processing pipeline. You should read through their recommendations. before proceeding. You should also join the EEGLAB mailing list. They really focus on these types of user issues and are quick to respond with useful information.

@guishuyunye-lyw
Copy link
Author

If you use the default settings for PREP is to high-pass filter at 1 Hz for calculating the robust reference only, but the postprocess keepFiltered parameter is false by default. You are not getting the filtered signal. If you want it to be high-pass filtered, you need to set keepFiltered to true.

Beyond that, it would be good to go through the tutorials for EEGLAB. They have a recommended processing pipeline. You should read through their recommendations. before proceeding. You should also join the EEGLAB mailing list. They really focus on these types of user issues and are quick to respond with useful information.

Thank you so much for your reply!
I have processed my data of last experiment through the pipeline recommended by EEGlab, and want to refine this process this time. I just cannot tell the bound between PREP and regular process. Where should I put the PREP? As I mention before, PREP's setting sometimes could mislead me to think the high-pass was completed. I just cannot figure out which part has been done after PREP?How could I find out which part is completed easily? NOW, I am even not sure about if I should remove line noise and reset reference again?
image

@VisLab
Copy link
Owner

VisLab commented Aug 22, 2020

HERE are two alternative strategies for preprocessing.

  1. EEGLAB has recently gone to:
    clean_rawdata (which is line noise-> detrend -> ASR) I think ASR removes bad channels by default but you have to check.

  2. Alternatively you can use PREP which does
    line noise --> identifying bad channels and robust referencing --> postprocess(interpolate the bad channels if you want to and high-pass filter if you want to).

These are mutually exclusive. PREP is a lighter touch strategy in that it tries to do as little as possible to the signal. ASR depends on the std parameter.

After you do one (and only one of these) you should consider doing ICA and ICALabel to get rid of bad ICs.

It is important that you read the documentation. I think the easiest for someone new to the field is to use clean_rawdata. You might want to take a look at our paper describing differences in results: https://pubmed.ncbi.nlm.nih.gov/32217478/.

Again, you should join the EEGLAB mailing list and you can get some opinions on the list about the best way to proceed for your application.

@guishuyunye-lyw
Copy link
Author

Thx for your patience again!
I have went through the discussion about prep on eeglab maillist yesterday, also sent my questions to the agent through email, which is still in holding state.

Sorry for more question below:

1 If I want to keep the interpolation completed by PREP process, should I set params.removeInterpolatedChannels from true to false?
image

2 I check the report.pdf file generated with PREP process, and found that the line noise is not omit completely at 50hz.
image

BTW, I saw someone has asked questions on eeglab maillist like: if I do a 45 low-pass filter, is it necessary to do this line noise filter? I am also feel confused with it.

3 Again, because I do not find any parameter about the setting of channel location, so I want to know if I should do it firstly? Because in my opinion, the location information is necessary for interpolation procedure.

4 lastly, after the process of PREP, should I make reference again, for the eeglab interface is still showing that reference is unknown.
image
image

Thanks a lot for your patience! I get a hard time to figure this process out, your reply is an encouragement for me!

@VisLab
Copy link
Owner

VisLab commented Aug 23, 2020

  1. I would do the line noise first anyway. There are high-frequency versus low frequency tests for bad channels and if you have too much line noise left in the signal you might throw away channels that you don't need to. The clean-line used in Prep by default doesn't get all of the line noise if it is non-stationary, but it usually gets enough for the bad channel tests. There are other things you can do if you are analyzing in the gamma range, like notch filters to get it all.

  2. I would advise you to save your EEG after PREP so that you don't have to redo it if you change downstream processing as PREP is slow, especially if you don't have enough cores.

  3. you want params.removeInterpolatedChannels = false

  4. Prep isn't currently setting the ref field in EEG and the reference field in the chanlocs. Maybe it will on the next release. You should ignore. You don't need to reference.

  5. If you use PREP do not rereference. It won't hurt if you have left all of the interpolated channels in and pick the same reference channels. What PREP mainly does is compensate in average referencing for really bad channels. Bottom line: if you average reference when you have even one bad channel, you end up with all bad channels.

@VisLab VisLab closed this as completed Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants