Skip to content

Commit

Permalink
Merge pull request #700 from HJZollner/develop
Browse files Browse the repository at this point in the history
Multiple external .BASIS files
  • Loading branch information
HJZollner authored Mar 11, 2024
2 parents c5542e1 + 90950e7 commit 98af64d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
15 changes: 12 additions & 3 deletions exampledata/sdat/MEGA/jobSDAT_MEGA_LCModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,18 @@

opts.fit.FWHMcoMM3 = 14;

% Optional: In case the automatic basisset picker is not working you can manually
% select the path to the basis set in the osprey/fit/basis, i.e.:
% opts.fit.basisSetFile = 'osprey/fit/basis/3T/philips/mega/press/gaba68/basis_philips_megapress_gaba68.mat';
%%% ----- LCMODEL FITTING OPTIONS -----
% Specify LCModel-format basis set (.BASIS)
% If no basis set file is provided Osprey will generate the .BASIS file
% from Osprey's database
% opts.fit.basisSetFile = {which('3T_megapress_Philips_68ms_noMM_A.BASIS'),
% which('3T_megapress_Philips_68ms_noMM_diff1.BASIS')};


% Specify LCModel-type control file (.CONTROL)
% This is optional: If you leave this field blank, Osprey will create a
% minimum control file for you.
% opts.fit.controlFile = '';

% Optional: Deface the strucutral images in the Coreg/Seg figures for HIPAA
% compliance
Expand Down
2 changes: 1 addition & 1 deletion exampledata/sdat/UnEdited/jobSDAT_LCModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
% Specify LCModel-format basis set (.BASIS)
% If no basis set file is provided Osprey will generate the .BASIS file
% from Osprey's database
opts.fit.basisSetFile = which('3T_PRESS_Philips_35ms_noMM.BASIS');
% opts.fit.basisSetFile = {which('3T_press_Philips_35ms_noMM.BASIS')};


% Specify LCModel-type control file (.CONTROL)
Expand Down
4 changes: 2 additions & 2 deletions fit/code/osp_fitInitialise.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

% Find the right basis set (provided as *.mat file in Osprey basis set
% format)
if ~(isfield(MRSCont.opts.fit,'basisSetFile') && ~isempty(MRSCont.opts.fit.basisSetFile) && ~isfolder(MRSCont.opts.fit.basisSetFile))
if ~(isfield(MRSCont.opts.fit,'basisSetFile') && ~isempty(MRSCont.opts.fit.basisSetFile) && ~isfolder(MRSCont.opts.fit.basisSetFile{1}))

% Intercept non-integer echo times and replace the decimal point with
% an underscore to avoid file extension problems
Expand Down Expand Up @@ -164,7 +164,7 @@
% Clear existing basis set
MRSCont.fit.basisSet = [];

if ~isfile(MRSCont.opts.fit.basisSetFile) && (ismcc || isdeployed)
if ~isfile(MRSCont.opts.fit.basisSetFile(1)) && (ismcc || isdeployed)
if ~strcmp(MRSCont.opts.fit.basisSetFile(1),filesep)
MRSCont.opts.fit.basisSetFile = [filesep MRSCont.opts.fit.basisSetFile];
end
Expand Down

0 comments on commit 98af64d

Please sign in to comment.