

EEG = pop_readbdf('/data/projects/yute/SSVEP/subject4/sessionA_trial11.bdf', [1 60] ,272,[]);
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 256);
EEG = eeg_checkset( EEG );
EEG = pop_reref( EEG, 260);
EEG = eeg_checkset( EEG );
EEG = pop_rmbase( EEG, [0      59996.0938]);
EEG = eeg_checkset( EEG );
EEG = pop_select( EEG,'nochannel',{'H25' 'H26' 'H27' 'H28' 'H29' 'H30' 'H31' 'H32' 'EXG8' 'GSR1' 'GSR2' 'Erg1' 'Erg2' 'Resp' 'Plet' 'Temp'});
EEG = eeg_checkset( EEG );
EEG=pop_chanedit(EEG, 'lookup','/data/common/matlab/eeglab/plugins/dipfit2.2/standard_BESA/standard-10-5-cap385.elp','load',{'/data/projects/yute/SSVEP/subject4/Cheng_02032012_56_SSVEP_2.sfp' 'filetype' 'sfp'},'changefield',{259 'datachan' 0},'changefield',{255 'datachan' 0});
EEG = eeg_checkset( EEG );
EEG = pop_saveset( EEG, 'filename', 'sbj4_sessionA_trial11.set');

EEG = pop_readbdf('/data/projects/yute/SSVEP/subject4/sessionB_trial11.bdf', [1 60] ,272,[]);
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 256);
EEG = eeg_checkset( EEG );
EEG = pop_reref( EEG, 260);
EEG = eeg_checkset( EEG );
EEG = pop_rmbase( EEG, [0      59996.0938]);
EEG = eeg_checkset( EEG );
EEG = pop_select( EEG,'nochannel',{'H25' 'H26' 'H27' 'H28' 'H29' 'H30' 'H31' 'H32' 'EXG8' 'GSR1' 'GSR2' 'Erg1' 'Erg2' 'Resp' 'Plet' 'Temp'});
EEG = eeg_checkset( EEG );
EEG=pop_chanedit(EEG, 'lookup','/data/common/matlab/eeglab/plugins/dipfit2.2/standard_BESA/standard-10-5-cap385.elp','load',{'/data/projects/yute/SSVEP/subject4/Cheng_02032012_56_SSVEP_2.sfp' 'filetype' 'sfp'},'changefield',{259 'datachan' 0},'changefield',{255 'datachan' 0});
EEG = eeg_checkset( EEG );
EEG = pop_saveset( EEG, 'filename', 'sbj4_sessionB_trial11.set');

EEG = pop_readbdf('/data/projects/yute/SSVEP/subject4/sessionC_trial11.bdf', [1 60] ,272,[]);
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 256);
EEG = eeg_checkset( EEG );
EEG = pop_reref( EEG, 260);
EEG = eeg_checkset( EEG );
EEG = pop_rmbase( EEG, [0      59996.0938]);
EEG = eeg_checkset( EEG );
EEG = pop_select( EEG,'nochannel',{'H25' 'H26' 'H27' 'H28' 'H29' 'H30' 'H31' 'H32' 'EXG8' 'GSR1' 'GSR2' 'Erg1' 'Erg2' 'Resp' 'Plet' 'Temp'});
EEG = eeg_checkset( EEG );
EEG=pop_chanedit(EEG, 'lookup','/data/common/matlab/eeglab/plugins/dipfit2.2/standard_BESA/standard-10-5-cap385.elp','load',{'/data/projects/yute/SSVEP/subject4/Cheng_02032012_56_SSVEP_2.sfp' 'filetype' 'sfp'},'changefield',{259 'datachan' 0},'changefield',{255 'datachan' 0});
EEG = eeg_checkset( EEG );
EEG = pop_saveset( EEG, 'filename', 'sbj4_sessionC_trial11.set');

EEG = pop_readbdf('/data/projects/yute/SSVEP/subject4/sessionD_trial11.bdf', [1 60] ,272,[]);
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 256);
EEG = eeg_checkset( EEG );
EEG = pop_reref( EEG, 260);
EEG = eeg_checkset( EEG );
EEG = pop_rmbase( EEG, [0      59996.0938]);
EEG = eeg_checkset( EEG );
EEG = pop_select( EEG,'nochannel',{'H25' 'H26' 'H27' 'H28' 'H29' 'H30' 'H31' 'H32' 'EXG8' 'GSR1' 'GSR2' 'Erg1' 'Erg2' 'Resp' 'Plet' 'Temp'});
EEG = eeg_checkset( EEG );
EEG=pop_chanedit(EEG, 'lookup','/data/common/matlab/eeglab/plugins/dipfit2.2/standard_BESA/standard-10-5-cap385.elp','load',{'/data/projects/yute/SSVEP/subject4/Cheng_02032012_56_SSVEP_2.sfp' 'filetype' 'sfp'},'changefield',{259 'datachan' 0},'changefield',{255 'datachan' 0});
EEG = eeg_checkset( EEG );
EEG = pop_saveset( EEG, 'filename', 'sbj4_sessionD_trial11.set');

EEG = pop_readbdf('/data/projects/yute/SSVEP/subject4/sessionE_tab1.bdf', [1 60] ,272,[]);
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 256);
EEG = eeg_checkset( EEG );
EEG = pop_reref( EEG, 260);
EEG = eeg_checkset( EEG );
EEG = pop_rmbase( EEG, [0      59996.0938]);
EEG = eeg_checkset( EEG );
EEG = pop_select( EEG,'nochannel',{'H25' 'H26' 'H27' 'H28' 'H29' 'H30' 'H31' 'H32' 'EXG8' 'GSR1' 'GSR2' 'Erg1' 'Erg2' 'Resp' 'Plet' 'Temp'});
EEG = eeg_checkset( EEG );
EEG=pop_chanedit(EEG, 'lookup','/data/common/matlab/eeglab/plugins/dipfit2.2/standard_BESA/standard-10-5-cap385.elp','load',{'/data/projects/yute/SSVEP/subject4/Cheng_02032012_56_SSVEP_2.sfp' 'filetype' 'sfp'},'changefield',{259 'datachan' 0},'changefield',{255 'datachan' 0});
EEG = eeg_checkset( EEG );
EEG = pop_saveset( EEG, 'filename', 'sbj4_sessionE_tab1.set');

EEG = pop_readbdf('/data/projects/yute/SSVEP/subject4/sessionE_tab2.bdf', [1 60] ,272,[]);
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 256);
EEG = eeg_checkset( EEG );
EEG = pop_reref( EEG, 260);
EEG = eeg_checkset( EEG );
EEG = pop_rmbase( EEG, [0      59996.0938]);
EEG = eeg_checkset( EEG );
EEG = pop_select( EEG,'nochannel',{'H25' 'H26' 'H27' 'H28' 'H29' 'H30' 'H31' 'H32' 'EXG8' 'GSR1' 'GSR2' 'Erg1' 'Erg2' 'Resp' 'Plet' 'Temp'});
EEG = eeg_checkset( EEG );
EEG=pop_chanedit(EEG, 'lookup','/data/common/matlab/eeglab/plugins/dipfit2.2/standard_BESA/standard-10-5-cap385.elp','load',{'/data/projects/yute/SSVEP/subject4/Cheng_02032012_56_SSVEP_2.sfp' 'filetype' 'sfp'},'changefield',{259 'datachan' 0},'changefield',{255 'datachan' 0});
EEG = eeg_checkset( EEG );
EEG = pop_saveset( EEG, 'filename', 'sbj4_sessionE_tab2.set');