Hi Paul,
In the script you need to change the HeadModel that will be used to compute the sources. See this script:
SubjectName = 'Subject02';
Condition = 'SubjectCMC';
% === CHANGE THE DEFAULT HEAD MODEL ===
% Select the recordings within the Subject and the Study
sFilesRec = bst_process('CallProcess', 'process_select_files_data', [], [], ...
'subjectname', SubjectName, ...
'condition', Condition, ...
'includebad', 0);
% Index of the study
iStudy = sFilesRec(1).iStudy;
% Get Study structure
sStudy = bst_get('Study', iStudy);
% List of the headmodels for this Study
HeadModels = sStudy.HeadModel;
% Change the Default head model
iHeadModel = 2;
% Save in database the sStudy with the selected iHeadModel
sStudy.iHeadModel = iHeadModel;
bst_set('Study', iStudy, sStudy);
% Repaint tree
panel_protocols('RepaintTree');
% === COMPUTE SOURCES ===
% Minimum norm options
InverseOptions = struct(...
'Comment', 'MN: MEG', ...
'InverseMethod', 'minnorm', ...
'InverseMeasure', 'amplitude', ...
'SourceOrient', {{'free'}}, ... % 'fixed', 'loose', 'free'
'Loose', 0.2, ...
'UseDepth', 1, ...
'WeightExp', 0.5, ...
'WeightLimit', 10, ...
'NoiseMethod', 'reg', ...
'NoiseReg', 0.1, ...
'SnrMethod', 'fixed', ...
'SnrRms', 0.001, ...
'SnrFixed', 3, ...
'ComputeKernel', 1, ...
'DataTypes', {{'MEG'}});
% Process: Compute sources [2018]
sFilesSources = bst_process('CallProcess', 'process_inverse_2018', sFilesRec, [], ...
'output', 1, ... % 1 Kernel only shared; 2 Kernel only: one per file; 3 Full results
'inverse', InverseOptions);```