[Mne_analysis] Time-frequency PSD with CWT (morlet wavelet) in a single trial
Arnaud Ferre
arnaud.ferre.pro at gmail.com
Wed Apr 23 04:54:02 EDT 2014
Hi Denis,
Thanks for the fast reply.
Yes I can share my test. Here: https://gist.github.com/arnaudferre/11206945.
Ok, I will try to use single_trial_power() function now.
For the GUI, unfortunately, I must develop a ‘biologists-friendly’
software. In consequence (and with others constraints), I must develop on
Windows and the GUI doesn’t work on Windows if I have correctly understood.
For my file format, I have already develop my own functions to parse the
original data (my goal: adapt raw signal to can use just the useful data).
This format can be ‘CED Spike2 SMR files’ or an alternative in TXT from
Local Field Potential acquisition. So, I store the data of a single trial
in a dictionary, then in a pickle file (maybe not a good idea…). I do this
certainly with my personal way. For these reasons, I tried to adapt the
MNE-Python script to read my data. It seems not far yet! But I don’t know
if I can really add idea in your conversation due to these specific data.
Anyway, it seems that MNE contains all the tools what we need here. It’s
very encouraging yeah. But, I think we need time to know to use these tools.
Arnaud
2014-04-19 12:34 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:
> Hi Arno,
>
> let my reply inline,
>
> On Fri, Apr 18, 2014 at 6:55 PM, Arnaud Ferre <arnaud.ferre.pro at gmail.com>wrote:
>
>> Hi all,
>> I work on EEG data in behavioral field. I understand the basics of signal
>> processing and I’m not so bad in Python. But for a beginner like me,
>> MNE-Python is pretty huge. I was advised to use MNE knowing my constraints,
>> but I’m starting to think that it’s maybe too evolved for a non-expert
>> scientist in this field like me.
>>
> I’m just trying to draw a time-frequency PSD from a single trial with a
>> CWT (with morlet wavelets). I thought to have found what functions used,
>> but in testing my script, I don’t obtain correct result.
>>
>
>> In fact, I tested with a simple sinusoid function with a frequency of
>> 10Hz on 1sec (1000points). I expected to see a lot of "red blobs" aligned
>> on the 10Hz in y-axis but not. I have a continuous and very thin band
>> around 1.5 Hz and a residual band around the 90Hz. I looked the wavelets
>> and it seems fine. What is strange is that I see the correct number of
>> blob, so I think it’s not so far of correct result. In first, I thought of
>> a problem in adjusting my display, but it seems not.
>>
>
> Could you share an example script, e.g. using https://gist.github.com/
> That would be very helpful.
>
>
>>
>> I use mainly the function _time_frequency(data, Ws), one of the functions
>> in tfr.py in mne.time_frequency where data is a 2D-array containing only my
>> signal in data[0].
>>
>> I read this link:
>> http://martinos.org/mne/stable/auto_examples/stats/plot_cluster_1samp_test_time_frequency.html,
>> but as I don’t use data with the standard format, it seemed to me
>> complicated. Moreover, I think that _time_frequency(data, Ws) is just
>> needed to do what I want. And yet, maybe that the specificities of the
>> function single_trial_power in tfr.py is the solution…
>>
>>
>>
> In fact `single_trial_power` would be the way to go. (
> http://martinos.org/mne/dev/generated/mne.time_frequency.single_trial_power.html#mne.time_frequency.single_trial_power
> )
> In general it's not recommended not use functions starting with
> underscores unless you know exactly what you do. Things are much easier
> once you use the top-level API. Is your file format that prevents you from
> doing this? What kind of EEG data do you use? We're currently working on
> improving support for custom data:
>
> https://github.com/mne-tools/mne-python/issues/1229
>
> Please feel free to participate in the discussion on Github and tell us
> more about your use case.
>
>
>> Thanks in advance
>> Arnaud
>>
>>
> I hope we can encourage you to keep exploring the new terrain ;-)
>
> Denis
>
> _______________________________________________
>> 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
>
>
> 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/20140423/98aa93da/attachment.html
More information about the Mne_analysis
mailing list