Skip to content

Commit

Permalink
Automatically recalculate basis spectra in fit_plotBasis
Browse files Browse the repository at this point in the history
- added automatic recalculation of the spectra if fit_plotBasis is called
- removed wrongly labeled fid field from Philips 30 ms unedited PRESS  basisset to avoid confusion.
  • Loading branch information
HJZollner committed Nov 27, 2023
1 parent ac3be94 commit 89c0d28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Binary file not shown.
7 changes: 6 additions & 1 deletion libraries/FID-A/fitTools/fit_plotBasis.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
end
end

% Recalcualte spectra if they are not yet included
if ~isfield(basisSet,'specs')
[basisSet]=osp_recalculate_basis_specs(basisSet)
end

% Generate a new figure and keep the handle memorized
out = figure;
% Prepare a couple of useful variables
Expand All @@ -64,7 +69,7 @@
if stagFlag
% Staggered plots will be in all black and separated by the mean of the
% maximum across all spectra
stag = mean(max(real(basisSet.specs(:,:,dim))));
stag = mean(max(real(basisSet.specs(basisSet.ppm > ppmmin & basisSet.ppm < ppmmax,:,dim))));

% Loop over all basis functions
hold on
Expand Down

0 comments on commit 89c0d28

Please sign in to comment.