[Mne_analysis] Differences between command line and python?
Cushing, Cody
CCUSHING1 at mgh.harvard.edu
Thu Apr 7 10:32:09 EDT 2016
Hi all,
I've been noticing some pretty serious differences in dSPM values as I transfer my dataset from the batch stream to the python stream. I believe these differences are related to the computation of the noise covariance matrix. Can anyone tell me the difference between implementing either of these on the same raw file with the same bad channels marked and the same events file:
mne_process_raw --raw $rawfile1 --digtrig STI101 --projon --cov $covfile --ave $avefile --events $eventfile --allevents --filteroff --saveavetag "_cmdtest-ave" --savecovtag "_cmdtest-cov"
with rejection parameters identical to below. In the .ave & .cov files: tmin, tmax = -0.03, 1.0 bmin, bmax = -.03, .06
versus implementing this in python:
picks = mne.pick_types(raw.info, meg='grad', eeg=False, stim=False, eog=True,
include=include, exclude='bads')
epochs = mne.Epochs(raw, events, event_id, tmin, tmax, picks=picks,
baseline=(-0.03, 0.06), reject=dict(grad=2000e-13, eog=800e-6),
preload=False, proj=True)
epochs.drop_bad_epochs()
cov=mne.compute_covariance(epochs, tmin=-0.03, tmax=0.06);
mne.write_cov(cov2save,cov);
evoked = [epochs['1'].average(),epochs['2'].average(),epochs['3'].average(),epochs['4'].average(),epochs['5'].average(),epochs['6'].average(),epochs['7'].average(),epochs['8'].average(),epochs['9'].average (),epochs['10'].average(),epochs['11'].average(),epochs['12'].average()]
mne.write_evokeds(fname2save, evoked) # save evoked data to disk
Because as far as I can tell they seem to be doing the same thing? But there's some pretty stark differences in the SNR estimate and dSPM values after putting both -ave.fif & -cov.fif files through the same fwd/inverse solution commands based on the same source space for things as simple as the initial response in the visual cortex (that I'd be happy to share with whoever, I just wanted to make sure some silly option wasn't off that was throwing everything off).
Thanks for any help.
Cheers,
Cody
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160407/229949e4/attachment-0001.html
More information about the Mne_analysis
mailing list