SSP and source reconstruction

Hello,

Projectors are applied to the data when we epoch data from a continuous file (import data to database).

Why do we need to apply the projector too on the head model (brainstorm3/toolbox/process/functions/process_inverse.m at master · brainstorm-tools/brainstorm3 · GitHub) and noise covariance ?

Actually, how does brainstorm knows which projector to apply once the data are imported in the database (since its loading them from the channel matrix)

    % Rebuild projector in the expanded form (I-UUt)
    Proj = process_ssp2('BuildProjector', ChannelMat.Projector, [1 2]);
    % Apply projectors
    if ~isempty(Proj)
        % Get all sensors for which the gain matrix was successfully computed
        iGainSensors = find(sum(isnan(HeadModel.Gain), 2) == 0);
        % Apply projectors to gain matrix
        HeadModel.Gain(iGainSensors,:) = Proj(iGainSensors,iGainSensors) * HeadModel.Gain(iGainSensors,:);
        % Apply SSPs on both sides of the noise covariance matrix
        NoiseCovMat.NoiseCov = Proj * NoiseCovMat.NoiseCov * Proj';
    end
end

We can imagine a case where I have a continuous file A. I import the file into the database (no projector selected), then apply the projector to A, and reimport the data; they will be in the same folder as the previous one. And there is no way to know which file needs the projector applied when doing the inverse problem.

Case 1:

Then the channel file is:

But then if i import event again withoiut applying SSP:

They end up in with the same channel file and source analysis will think SSP got applied to both files:

Regards

Edouard

Check this other thread:

TL:DR To avoid this situation (with one raw file), at importing Event1 and Event2, if they have different active Projectors, the option Create a separate folder for each event type should be selected.

1 Like