[Mne_analysis] baseline correction for power

Alexandre Gramfort alexandre.gramfort at inria.fr
Sat Jan 20 08:09:43 EST 2018
Search archives:

hi,

have a look here:

https://github.com/mne-tools/mne-python/blob/master/mne/baseline.py#L114

percent does

(activity-mean(baseline)) / mean(baseline)

so the same as you want but without the 100

you can then modify the data attribute of power with something like:

power.data *= 100

HTH
Alex


On Fri, Jan 19, 2018 at 8:10 PM, Servant Mathieu
<servant.mathieu at gmail.com> wrote:
> Hi,
>
> I am a little confused about baseline correction options in mne.
> I've just computed tfr_morlet to extract power averaged across epochs using:
>
> power = tfr_morlet(epochs_condition1_corr, freqs=freqs,
> n_cycles=n_cycles,return_itc = False, average = True)
> where epochs_condition1 is a EpochsArray object.
>
> I'd like to perform two different types of baseline correction recommended
> in the litterature:
>
> 1) percent change: 100*(activity-baseline)/baseline. I thought
> power.apply_baseline(baseline_length, model = 'percent') would do the job,
> but according to the help, 'percent is the same as applying ratio then
> mean'. So 'percent' seems to compute  activity/baseline - baseline, which is
> not the same.
> 2) db: 10* log10 (activity/baseline). Is there an automatic way to do this?
>
> Best,
> Mat
>
> _______________________________________________
> 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