[Mne_analysis] mne.save_stc_as_volume('lcmv_inverse.nii.gz', stc,fwd['src'],mri_resolution=False)

parham hashemzadeh ph442 at cam.ac.uk
Wed Apr 13 15:48:09 EDT 2016
Search archives:

Dear all

I got an error when running a beamforming tutorial script. I modified 
the beamformer such that only the EEG leadfield is used and I just 
wanted to do EEG analysis.
So I made the following changes:
(a) meg=False in fwd
(b) in epochs reject=dict(eog=150e-6)
When it gets to the function lcm_inverse, it throws an error:

""Only volume source estimates can be saved as volumes"" can be saved

  I was wondering, if you would be able to point me in the right 
Many thanks
best regards parham hashemzadeh

fwd = mne.make_forward_solution(raw_fname, trans, src, bem,
                                 fname=None, meg=False, eeg=True, 
                                 n_jobs=2, overwrite=True)
epochs = mne.Epochs(raw, events, event_id, tmin, tmax, proj=True,
                     picks=picks, baseline=(None, 0), preload=True,

evoked = epochs.average()
leadfield = fwd['sol']['data']
## Read regularized noise covariance and compute regularized data 
noise_cov = mne.read_cov(fname_cov)
data_cov = mne.compute_covariance(epochs, tmin=0.04, 
## Run free orientation (vector) beamformer. Source orientation can be
## restricted by setting pick_ori to 'max-power' (or 'normal' but only 
## using a surface-based source space)
stc = lcmv(evoked, fwd, noise_cov, data_cov, reg=0.01, pick_ori=None)
## Save result in stc files
stc.crop(0.0, 0.2)
## Save result in a 4D nifti file
img = mne.save_stc_as_volume('lcmv_inverse.nii.gz', 

More information about the Mne_analysis mailing list