Skip to content

Commit

Permalink
Handle nComponent in process_inverse (#743)
Browse files Browse the repository at this point in the history
Handle reduced size files computed with wavelet-MEM.
This was implemented on `process_inverse_2028` in #733
  • Loading branch information
Edouard2laire authored Oct 8, 2024
1 parent 0087424 commit 5c2c93b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion toolbox/process/functions/process_inverse.m
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,10 @@
OPTIONS.NoiseCovRaw = NoiseCov;
% Call the mem solver
[Results, OPTIONS] = be_main(HeadModel, OPTIONS);
Results.nComponents = round(max(size(Results.ImageGridAmp,1),size(Results.ImagingKernel,1)) / nSources);
if ~isfield(Results, 'nComponents') || isempty(Results.nComponents)
Results.nComponents = round(max(size(Results.ImageGridAmp,1),size(Results.ImagingKernel,1)) / nSources);
end

% Get outputs
DataFile = OPTIONS.DataFile;
Time = OPTIONS.DataTime;
Expand Down

0 comments on commit 5c2c93b

Please sign in to comment.