[Mne_analysis] EEG Data Conversion

Isaiah C. Smith Isaiah.C.Smith.17 at dartmouth.edu
Thu Aug 28 18:07:18 EDT 2014
Search archives:

Hello Denis,

I am trying to use the python that you posted to Github, and I have a few questions concerning the parameters. Am I correct in my assumptions below? And where do I place the file strings to be read?

sfreq = 1e3   % sampling rate

ch_types = ['misc'] * 248    % "248" to “64” channels and ‘misc’ to ‘eeg'



ch_names = ['MISC {:03d}'.format(i + 1) for i in range(len(ch_type))]   % This one I think you can directly copy



info = mne.create_info(ch_names=ch_names, sfreq=sfreq, ch_types=ch_types)   % Directly copy



raw = mne.io.RawArray(data, info)   % data is the a N*M matrix (N is the number of channel, M is the number of timepoints



raw.save('misc.fif')   % directly copy



<cfg.mat>
<data.mat>
<elec.mat>
https://drive.google.com/file/d/0B2VQnrnlkkKETl9jUDVtb3JyNlk/edit?usp=sharing
https://drive.google.com/file/d/0B2VQnrnlkkKEWEJGT1JpaHd3SW8/edit?usp=sharing
https://drive.google.com/file/d/0B2VQnrnlkkKEWms0S0ozdTgxLTg/edit?usp=sharing

These are the data set that I am working with. Do they correspond?

Sorry, I have been trying to do this for while. Once the data is changed, I can get the forward model and the gain matrix since I already have the bems?


Thanks,
Isaiah
On Aug 25, 2014, at 3:52 PM, Isaiah C. Smith <Isaiah.C.Smith.17 at dartmouth.edu<mailto:Isaiah.C.Smith.17 at dartmouth.edu>> wrote:

Thanks Denis,

I will tell you how it goes.

Isaiah
On Aug 25, 2014, at 3:47 PM, Denis-Alexander Engemann <denis.engemann at gmail.com<mailto:denis.engemann at gmail.com>> wrote:

Dear Isaiah,

Here's an example of how to do it:

https://gist.github.com/dengemann/e9b45f2ff3e3380907d3

I hope this helps.

-Denis

2014-08-26 0:10 GMT+02:00 Denis A. Engemann <denis.engemann at gmail.com<mailto:denis.engemann at gmail.com>>:
Hi Isaiah,

yes this is correct.
Take look at the documentation string to get an idea how to use it,
basically you pass the data matrix, the sampling rate, a list of channel types, like ['eeg'] * 128 for 128 EEG channels and that's it for constructing a Raw object whose .save method you can then use to create a fiff file.

Please let me know how it goes.

HTH,
Denis



> On 25 Aug 2014, at 23:53, "Isaiah C. Smith" <Isaiah.C.Smith.17 at dartmouth.edu<mailto:Isaiah.C.Smith.17 at dartmouth.edu>> wrote:
>
> Thanks Denis for the response,
>
> Do you mean that we can use Evoked Array to Convert the data into the .fiff? We are able to extract the EEG data & electrode location data information using matlab. Also, we know the sampling rate information. So can we use some tools (e.g. mne.io.RawArray, mne.EpochsArray and mne) to convert into fiff format?
>
> Isaiah
>
>> On Aug 25, 2014, at 12:19 PM, Denis A. Engemann <denis.engemann at gmail.com<mailto:denis.engemann at gmail.com>> wrote:
>>
>> We have mne.io.RawArray, mne.EpochsArray and mne. EvokedArray for such cases.
>> Once you can extract the data and some info on sampling rate it's trivial to construct fiff compatible data-structures..
>> Unfortunately we still don't have an example for that in MNE-Python ...
>>
>> --Denis
>>
>>> On 25 Aug 2014, at 20:25, dgwakeman at gmail.com<mailto:dgwakeman at gmail.com> wrote:
>>>
>>> Hi Isaiah,
>>>
>>> You provided the suffixes of the files not the name of the file types. The first thin I would try to do is look for a file converter or reader. If you cannot find a converter for whatever file types these are, but you are able to read the files with some toolbox: you could read in those data files and replace all of the fields in the raw sample data set with your data. This is something I only recommend for advanced users as there are a lot of details you need to keep track of.
>>>
>>> HTH
>>> D
>>>
>>> Sent from my phone
>>>
>>>> On Aug 25, 2014, at 14:23, "Isaiah C. Smith" <Isaiah.C.Smith.17 at dartmouth.edu<mailto:Isaiah.C.Smith.17 at dartmouth.edu>> wrote:
>>>>
>>>> Hello Experts,
>>>>
>>>> I need to get the gain matrix using MNE. I have made my bem models, but I need help with the EEG conversion data. Could someone help me through this process so that I can view the matrix?
>>>>
>>>> These are the formats of the electrode location files that I have.
>>>> <Screen Shot 2014-08-24 at 12.33.11 PM.png>
>>>>
>>>>
>>>> And these are the formats of the EEG data that I have.
>>>>
>>>> <Screen Shot 2014-08-24 at 12.33.27 PM.png>
>>>>
>>>>
>>>> Thank you,
>>>> Isaiah Smith
>>>> _______________________________________________
>>>> Mne_analysis mailing list
>>>> Mne_analysis at nmr.mgh.harvard.edu<mailto: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<mailto: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<mailto: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<mailto: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<mailto: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<mailto: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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140828/f9198c48/attachment.html 


More information about the Mne_analysis mailing list