<div dir="ltr">I am trying to understand what happens when the "common baseline" option is selected for plotting and analyzing STUDY ERSPs-- specifically, how it interacts with any existing baseline corrections.<div><br></div><div>For instance, I have used the default baseline options when precomputing my ERSPs, which I understand to include a condition-specific baseline subtraction. Then when I plot the ERSPs through the GUI interface, I select the common baseline option for the ERSP parameters (equivalent to 'subbaseline' set to 'on').</div><div><div><br></div><div>My question is: for the common baseline option, is the mean baseline subtracted from the already baseline-corrected ERSPs? Or does the condition-specific baseline get added back in prior to subtracting the mean baseline?</div><div><br></div><div>I would have expected the latter. However, when I inspect the removeerspbaseline subfunction in std_readersp (EEGLAB version 14.1.1b), it appears to be doing the reverse: subtracting the original baseline and adding the mean baseline. See below (starting with line 539 in std_readersp):</div><div><br></div><div><div>if convert2log</div><div>       ersp{c,g} = ersp{c,g} - repmat(10*log10(erspbasetmp), [1 size(ersp{c,g},2) 1 1]) + 10*log10(tmpmeanpowbase);</div><div>else </div><div>       ersp{c,g} = ersp{c,g} - repmat(erspbasetmp, [1 size(ersp{c,g},2) 1 1]) + tmpmeanpowbase;</div><div>end;</div></div><div><br></div><div>I am not sure if this is a bug, or if I am missing some other key step in the script that would explain how this works out.</div><div><br></div><div>Thanks for any advice.</div><div><br></div><div>Best,</div><div>Maureen</div></div></div>