Detrend and baseline correction when accessing epoched data

Dear MNE community,

I do not have any code to show but I have doubts about the get_data() method. It is clear to me what it does when applied to either Epochs or Raw objects. However, I recently noticed this in the documentation:

Notes
When accessing data, Epochs are detrended, baseline-corrected, and decimated, then projectors are (optionally) applied.

Does get_data() called on Epochs objects automatically detrend the data and apply baseline correction? Or does this refer to the two arguments used when constructing the Epochs objects (detrend = None, baseline=None)?

Does this mean both detrending and baseline correction are applied to the raw data when accessing it only if the above arguments in the epochs object are set to True? And if not, is there a way to circumvent this behavior and access raw data directly?

Thank you very much for your help in advance and I hope my description is clear.

Giuseppe

if you pass detrend = None, baseline=None then no detrend or baseline correction will
be applied with the get_data() method.

HTH
Alex

Hi Alex,

thank you very much for your help. I am sorry if it seemed a very basic question but I was confused by the description.

Thank you again!

Giuseppe

I can see how this can be unclear. Maybe there should be a note in the docstring explaining that these arguments must have been passed in the Epochs initializer. @Giuseppe-1993 if you have time please feel free to open a PR with these changes.

1 Like