From e5a5d438d65499f789aa0b8141f3ee746afcc07f Mon Sep 17 00:00:00 2001 From: Helge <47348963+HJZollner@users.noreply.github.com> Date: Sun, 19 May 2024 09:45:17 +0200 Subject: [PATCH] [BUG] - Load/Process crash for phantom data - osp_combineCoils/osp_PhantomReferencing - added correct ref flags during coil combination - fixed function call for referencing of phantom data --- process/osp_PhantomReferencing.m | 2 +- process/osp_combineCoils.m | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/process/osp_PhantomReferencing.m b/process/osp_PhantomReferencing.m index f0f20952..4ac0a160 100644 --- a/process/osp_PhantomReferencing.m +++ b/process/osp_PhantomReferencing.m @@ -74,7 +74,7 @@ [refShift, refFWHM] = osp_XReferencing(dataToFit,[3.03 3.22],[1 1],[1.85 4.2]); if abs(refShift) > 10 % This a huge shift. Most likley wrong and we will try it again with tNAA only refSinglets=[2.01]; - [refShift, refFWHM] = osp_XReferencing(raw,2.01,1,[1.85 4.2]);% determine frequency shift + [refShift, refFWHM] = osp_XReferencing(dataToFit,2.01,1,[1.85 4.2]);% determine frequency shift end elseif (best_ix==1 && best_shift<0.08) || (nearest(1)<0.03) % found a close match for a 0ppm reference, use it diff --git a/process/osp_combineCoils.m b/process/osp_combineCoils.m index e9fb6a9a..d964104b 100644 --- a/process/osp_combineCoils.m +++ b/process/osp_combineCoils.m @@ -225,6 +225,7 @@ cweights.ref = 'raw'; raw_comb = op_addrcvrs(MRSCont.raw_uncomb{metab_ll,kk},1,'h',cweights); cweights = op_getcoilcombos(MRSCont.raw_ref_uncomb{ref_ll,kk},1,'h'); + cweights.ref = 'raw_ref'; raw_ref_comb = op_addrcvrs(MRSCont.raw_ref_uncomb{ref_ll,kk},1,'h',cweights); if MRSCont.flags.isUnEdited raw_comb.flags.isUnEdited = 1;