[Mne_analysis] using SSP projections for eye blink correction and mne_process raw

David I Leitman leitman at mail.med.upenn.edu
Thu May 22 19:38:34 EDT 2014
Search archives:

Hi All, 

Below is a snippet of code that I use: for finding EOG and ECG event and correcting for them:


###################################################
    
     print 'Implementing ECG and EOG artifact rejection on data'

    ecg_events, _, _  = mne.preprocessing.find_ecg_events(raw_in)
    if not len(ecg_events) < 20:
    
		print ecg_event_fname
		print "Writing ECG events in %s" % ecg_event_fname
		mne.write_events(ecg_event_fname, ecg_events)

		# Making projector
		print 'Computing ECG projector'

		command = ('mne_process_raw --cd %s --raw %s --events %s --makeproj '
				   '--projtmin -0.08 --projtmax 0.08 --saveprojtag _ecg_proj '
				   '--projnmag 1 --projngrad 1 --projneeg 1 --projevent 999 --highpass 5 '
				   '--lowpass 35 --projmagrej 4000  --projgradrej 3000 --projeegrej 500'
				   % (in_path, in_fif_fname, ecg_event_fname))
		st = os.system(command)
		if st != 0:
			print "Error while running : %s" % command


	####################################################

    eog_events = mne.preprocessing.find_eog_events(raw_in)    
    if not len(eog_events) < 25:
    	
		print "Writing EOG events in %s" % eog_event_fname
		mne.write_events(eog_event_fname, eog_events)

		print 'Computing EOG projector'

		command = ('mne_process_raw --cd %s --raw %s --events %s --makeproj '
				   '--projtmin -0.15 --projtmax 0.15 --saveprojtag _eog_proj '
				   '--projnmag 1 --projngrad 1 --projneeg 1 --projevent 998 --lowpass 35 '
				   '--projmagrej 4000  --projgradrej 3000 --projeegrej 500' % (in_path,
				   in_fif_fname, eog_event_fname))	
		print 'Running : %s' % command	
		st = os.system(command)
		if st != 0:
			raise ValueError('Problem while running : %s' % command)
	####################################################

My question is regarding the  settings : " --projmagrej 4000  --projgradrej 3000 --projeegrej 500" what do these setting lmits mean:
 calling the help I get the following:

-projgradrej value/fT/cm rejection limit for planar gradiometers in projection calculation (default = 2000.0 fT/cm)
        --projmagrej value/fT     rejection limit magnetometers / axial gradiometers in projection calculation (default = 3000.0 fT)
        --projeegrej value/uV     rejection limit EEG in projection calculation (default = 50.0 uV)

does this mean rejecting an an eyeblink event above the listed value? If so they seem low. Given that these levels are subjecto the recording  environment/ noise, Are my limits (--projmagrej 4000  --projgradrej 3000 --projeegrej 500) good ?

For reference my rejection criteria when epoching and averaging my  data are the following :

grad= 9e-11, # T / m (gradiometers)
mag = 4.0e-12, # T (magnetometers)
eeg =150e-6, # (eeg channels)


Thanks !

Dave






David I. Leitman PhD

Research Assistant Professor
Department of Psychiatry-
Neuropsychiatry program
Perelman School of Medicine
University of Pennsylvania
Gates Pavilion 10th floor room 1042
3400 Spruce St
Philadelphia, PA 19104-4283
P: (215) 662-7389
F: (215) 662-7903
E: leitman at mail.med.upenn.edu
Faculty page:	http://www.med.upenn.edu/apps/faculty/index.php/g275/p8174343
Lab website:
 http://davidileitman.com

The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above.  If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited.  If you have received this communication in error, please notify the the Neuropsychiatry Section immediately by e-mail, and delete the original message.















-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140522/0b1067b8/attachment.html 


More information about the Mne_analysis mailing list