[Mne_analysis] Need Help to do Cross Spectral Density Analysis

Brunner, Clemens (clemens.brunner@uni-graz.at) clemens.brunner at uni-graz.at
Mon Jan 15 03:34:51 EST 2018
Search archives:

Hi!

Are you using the recommended Anaconda Python distribution? There might be something wrong with you Python setup. Did you follow the installation instructions summarized on https://martinos.org/mne/stable/install_mne_python.html?

Clemens


> On Jan 15, 2018, at 09:18, MD KHORSHED ALAM <khorshed.alam at live.iium.edu.my> wrote:
> 
> Hi,
> 
> Thank you and unfortunately, still getting the same errors after executing the recommended codes.
> 
> I am using WIN 64-bits, Python 2.7.14.
> 
> I have checked the following code: 
> import sys
> sys.maxint
> 
> Output:  2147483647 (32-bits integer value )
> 
> 
> I think, because of this may get the errors. Please anyone helps me to update my 'sys' to 64-bits integer value?
> 
> 
> Thanks With Warm Regards,
> MD. KHORSHED ALAM (Shishir)
> Graduate Research Assistant (GRA)
> Center of Intelligent Signal and Imaging Research (CISIR)
> Department of Electrical and Electronic Engineering
> Universiti Teknologi PETRONAS
> Bandar Seri Iskandar
> 32610 Tronoh
> Perak Darul Ridzuan
> Malaysia
> Mobile no: +60176459080
> Email ID: khorshed.alam at live.iium.edu.my
> Alternative :shishir_lmu at yahoo.com, alam.0213 at gmail.com
> 
> From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Brunner, Clemens (clemens.brunner at uni-graz.at) <clemens.brunner at uni-graz.at>
> Sent: Sunday, January 14, 2018 4:46:36 PM
> To: Discussion and support forum for the users of MNE Software
> Subject: Re: [Mne_analysis] Need Help to do Cross Spectral Density Analysis
>  
> Hi!
> 
> I don’t really understand why the array is of type int64 (and why that matters - are you on Python 2)?
> 
> Can you try if this minimal example works for you:
> 
> import mne
> import numpy as np
> 
> X = np.random.rand(320, 60, 421)
> csd = mne.time_frequency.csd_array(X, 128)
> 
> Clemens
> 
> 
> > On Jan 14, 2018, at 11:15, MD KHORSHED ALAM <khorshed.alam at live.iium.edu.my> wrote:
> > 
> > Hi,
> > Thank you for your suggestion. 
> > However, 
> > Code: epochs = mne.Epochs(eeg_channels, events=events, event_id=event_id, tmin=-0.2, tmax=0.5, proj=True, baseline=(None, 0), preload=True)
> > X=epochs['aud_l', 'aud_r', 'vis_l', 'vis_r', 'smiley', 'button'].get_data()
> > print(X.shape)
> > Output: 
> > 320 matching events found
> > 3 projection items activated
> > Loading data for 320 events and 421 original time points ...
> > 0 bad epochs dropped
> > (320L, 60L, 421L)
> > 
> > 
> > Then i have applied 3D array 'X' to:  mne.time_frequency.csd_array(X, sfreq, mode='multitaper', fmin=0, fmax=35.0, fsum=False, n_fft=None, mt_bandwidth=None, mt_adaptive=False, mt_low_bias=True, verbose=None)
> > 
> > But still getting the following errors: 
> > 
> > ValueError
> >                                 Traceback (most recent call last)
> > 
> > <ipython-input-177-d7b62b6f3fe7> in <module>()
> > ----> 1 mne.time_frequency.csd_array(X, sfreq, mode='multitaper', fmin=0, fmax=35.0, fsum=False, n_fft=None, mt_bandwidth=None, mt_adaptive=False, mt_low_bias=True, verbose=None)
> > 
> > ValueError: when using select="i", select_range must contain integers, got dtype int64
> > 
> > 
> > Thanks With Warm Regards,
> > MD. KHORSHED ALAM (Shishir)
> > Graduate Research Assistant (GRA)
> > Center of Intelligent Signal and Imaging Research (CISIR)
> > Department of Electrical and Electronic Engineering
> > Universiti Teknologi PETRONAS
> > Bandar Seri Iskandar
> > 32610 Tronoh
> > Perak Darul Ridzuan
> > Malaysia
> > Mobile no: +60176459080
> > Email ID: khorshed.alam at live.iium.edu.my
> > Alternative :shishir_lmu at yahoo.com, alam.0213 at gmail.com
> > 
> > From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Brunner, Clemens (clemens.brunner at uni-graz.at) <clemens.brunner at uni-graz.at>
> > Sent: Tuesday, January 9, 2018 8:40:03 AM
> > To: Discussion and support forum for the users of MNE Software
> > Subject: Re: [Mne_analysis] Need Help to do Cross Spectral Density Analysis
> >  
> > Hi!
> > 
> > You can use the get_data method on your Epochs object, e.g.
> > 
> > X = epochs.get_data()
> > 
> > will return a 3D array of the desired shape.
> > 
> > HTH
> > Clemens
> > 
> > 
> > > On Jan 9, 2018, at 07:25, MD KHORSHED ALAM <khorshed.alam at live.iium.edu.my> wrote:
> > > 
> > > Hi,
> > > 
> > > I want to do CSD analysis on EEG data but facing problem with the following function: 
> > > 
> > > csd_array(X, sfreq, mode='multitaper' fmin=0 fmax=np.inf, fsum=True, n_fft=None, mt_bandwidth=None, mt_adaptive=False, mt_low_bias=True, verbose=None):
> > > 
> > > I am unable to extract the "X" parameter values. Can you let me know the file where "X" (data matrix) structure is defined in order to have a better idea about "X" parameter.
> > > 
> > > Thank you.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Thanks With Warm Regards,
> > > MD. KHORSHED ALAM (Shishir)
> > > Graduate Research Assistant (GRA)
> > > Center of Intelligent Signal and Imaging Research (CISIR)
> > > Department of Electrical and Electronic Engineering
> > > Universiti Teknologi PETRONAS
> > > Bandar Seri Iskandar
> > > 32610 Tronoh
> > > Perak Darul Ridzuan
> > > Malaysia
> > > Mobile no: +60176459080
> > > Email ID: khorshed.alam at live.iium.edu.my
> > > Alternative :shishir_lmu at yahoo.com, alam.0213 at gmail.com
> > > 
> > > _______________________________________________
> > > Mne_analysis mailing list
> > > Mne_analysis at nmr.mgh.harvard.edu
> > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> > > 
> > > 
> > > The information in this e-mail is intended only for the person to whom it is
> > > addressed. If you believe this e-mail was sent to you in error and the e-mail
> > > contains patient information, please contact the Partners Compliance HelpLine at
> > > http://www.partners.org/complianceline . If the e-mail was sent to you in error
> > > but does not contain patient information, please contact the sender and properly
> > > dispose of the e-mail.
> > 
> > 
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> > 
> > 
> > The information in this e-mail is intended only for the person to whom it is
> > addressed. If you believe this e-mail was sent to you in error and the e-mail
> > contains patient information, please contact the Partners Compliance HelpLine at
> > http://www.partners.org/complianceline . If the e-mail was sent to you in error
> > but does not contain patient information, please contact the sender and properly
> > dispose of the e-mail.
> 
> 
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> 
> 
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.




More information about the Mne_analysis mailing list