[Mne_analysis] Problem for creating a raw object

Mainak Jas mainakjas at gmail.com
Mon Jan 14 11:15:10 EST 2019
Search archives:

        External Email - Use Caution        

Hi,

Just make sure your variable "data" is 2D. You can use something like
data[None, :] if it's 1D.

Best,
Mainak

On Mon, Jan 14, 2019 at 10:00 AM VENKATA PHANIKRISHNA B <
b.phanikrishna at gmail.com> wrote:

>         External Email - Use Caution
>
> In MNE is to possible to create a raw object with one sensor data. Means I
> have 30sec epochs single channel EEG data in the .csv file. For further
> analysis on MNE, I try to convert that file to MNE understandable  formate
> with the help of following code
>
> # loading 30-sec epoch single channel EEG data
> mydataset=pd.read_csv("EEG_30sec.csv")
> [rc, cc]=mydataset.shape;    #output is 1, 3000
> data =mydataset.iloc[1,:].values   #converting in to NP array
>
> # Initialize an info structure
> info = mne.create_info(
>     ch_names=['EEG1'],
>     ch_types=['eeg'],
>     sfreq=100
> )
> custom_raw = mne.io.RawArray(data, info)
> print(custom_raw)
>
> I am getting the following error message.
>  raise ValueError('Data must be a 2D array of shape (n_channels, '
> ValueError: Data must be a 2D array of shape (n_channels, n_samples
>
> --
> ************************
> thanks
>
>
> *VENKATA PHANIKRISHNA B*
> 9908261261
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190114/cf58b2c3/attachment.html 


More information about the Mne_analysis mailing list