Closed dongqunxi closed 10 years ago
@dongqunxi make sure the time parameters amoubt to the same window lenght for noise and data csd. Or specify n_fft to make sure the same number of tapers is used. Let me know if that helps.
data_csds = compute_epochs_csd(epochs, mode='multitaper', tmin=0.06, tmax=0.17,
n_fft=200, fmin=15, fmax=30, fsum=False)
noise_csds = compute_epochs_csd(epochs, mode='multitaper', tmin=-0.11, tmax=-0.00,
n_fft=200, fmin=15, fmax=30, fsum=False)
#Compute DICS spatial filter and estimate source power
stc = dics_source_power(epochs.info, fwd, noise_csds, data_csds)
@dengemann Yes, it did work. I have tried to use the same time window, it did not work. After I set the same 'n_fft', it worked. But I have another question: how large is appropriate for 'n_fft'?
I have tried to use the same time window, it did not work.
that sounds weird to me ... should not be
After I set the same 'n_fft', it worked. But I have another question: how large is appropriate for 'n_fft'?
if you have more samples you can set higher n_fft, the higher your n_fft the better your frequency resolution. you should play with it. Keep in mind to increase this value to the power of 2.
I have tried to use the same time window, it did not work.
the same time window length, I hope. The time window must not be the same but the number of samples should be identical. E.g. -1, 0.8 for noise and 0.8, 1.0 for data
@dengemann I have checked, when I set the same time window, I got
len(data_csds)=2
len(noise_csds)=2
data_csds[0].frequencies=18.16
noise_csds[0].frequencies=18.49
It is not identical. If I want to control the frequencies changing, how to?
Does this still result in an error?
@dengemann After I adjust the epochs parameters as following, there is no errors in computing stc.
epochs = mne.Epochs(raw, events, 1, tmin, tmax, proj=True,
picks=picks, baseline=(None, 0), preload=True,
reject=dict(mag=4e-12))
But I met errors at:
/home/imenb/MEG-MRI_Scipts/Forward and Inverse Problem/temp.py in <module>()
69 message = 'DICS source power at %0.1f Hz' %csd.frequencies[0]
70 brain =stc.plot(surface='inflated', hemi='both', subjects_dir=subjects_dir,
---> 71 time_label=message, figure=i)
/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_windows.pyc in __init__(self, *args, **kwargs)
495 long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> Frame
496 """
--> 497 _windows_.Frame_swiginit(self,_windows_.new_Frame(*args, **kwargs))
498 self._setOORInfo(self)
499
PyNoAppError: The wx.App object must be created first!
@dongqunxi that's another issue. You should not use the WX backend. Make sure to start ipython with the --qt flag. Can we close this?
Ok, thanks! I will close it.
ahhhsorry--- realized it was your repo :-)
Haha, until now, I still don't familiar with the github environment. Sorry about my irregularities.
Best wishes, Qunxi Dong
2014-02-12 12:04 GMT+01:00 Denis A. Engemann notifications@github.com:
ahhhsorry--- realized it was your repo :-)
Reply to this email directly or view it on GitHubhttps://github.com/dongqunxi/mne-python/issues/1#issuecomment-34858688 .
Dear All, @dengemann When I try to run the plot_dics_source_power.py
I met one issue as following:
ValueError: Data and noise CSDs should be calculated at identical frequencies