mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

FR: Document units for TFR objects and adjust/track depending on baseline correction

Open sappelhoff opened this issue 5 years ago • 4 comments

Came up in this gitter thread.

Describe the problem

The units for common TFR objects like AverageTFR are unclear.

Describe your solution

The units should be tracked ... and adjusted when a baseline correction is performed

Additional context

Other MNE functions track the units as well, and the colorbars or ylabels in plots are labelled with the units ... this is not the case for TFR objects yet.

sappelhoff avatar Jul 17 '20 20:07 sappelhoff

you can get channel units from tfr.info['chs'] specifically the unit and unit_mul or each channel's dict.

So I think you just need to figure out how to keep tract of the modifications that baseline correction has performed. A positive side effect of that would be to not allow additional apply_baseline calls once a tfr has been baseline corrected.

bloyl avatar Jul 20 '20 21:07 bloyl

Also we probably need to check to make sure our units are correct in all our TFR/PSD functions. It's possible that some normalization factors could be wrong if we use plain fft and don't account for the normalization (not sure if we do or not)

larsoner avatar Aug 20 '20 14:08 larsoner

A positive side effect of that would be to not allow additional apply_baseline calls once a tfr has been baseline corrected.

Yes, that would be nice!

mmagnuski avatar Nov 11 '20 17:11 mmagnuski

I'm going to remove the milestone from this rather than bumping it for a 13th (!) time, but it would be great if someone could tackle this at some point!

larsoner avatar Jul 15 '24 19:07 larsoner