Skip to content
Snippets Groups Projects

Improve documentation & fall-back options

Merged Maria Engel requested to merge master into main
1 file
+ 25
4
Compare changes
  • Side-by-side
  • Inline
@@ -12,11 +12,13 @@ function [packingDensity, L_optimum, isDegenerate, L_CAIPI_A, packingDensityCAIP
@@ -12,11 +12,13 @@ function [packingDensity, L_optimum, isDegenerate, L_CAIPI_A, packingDensityCAIP
% [same unit as sliceSpacing, sliceThickness & sliceGap]
% [same unit as sliceSpacing, sliceThickness & sliceGap]
%
%
% sliceSpacing distance between simultaneously excited slices
% sliceSpacing distance between simultaneously excited slices
% (only used if all input arguments available)
% (only used if either of the other input arguments
 
% {nSlicesSimultaneously, nSlicesTotal, sliceThickness, sliceGap}
 
% unavailable)
% [same unit as FOV_inplane, sliceThickness & sliceGap]
% [same unit as FOV_inplane, sliceThickness & sliceGap]
%
%
% nSlicesSimultaneously number of simultaneously excited slices
% nSlicesSimultaneously number of simultaneously excited slices
% (only needed if sliceSpacing empty)
% (only needed if sliceSpacing empty or blipped-CAIPIRINHA options are required)
%
%
% nSlicesTotal total number of slices
% nSlicesTotal total number of slices
% (only needed if sliceSpacing empty)
% (only needed if sliceSpacing empty)
@@ -67,8 +69,15 @@ function [packingDensity, L_optimum, isDegenerate, L_CAIPI_A, packingDensityCAIP
@@ -67,8 +69,15 @@ function [packingDensity, L_optimum, isDegenerate, L_CAIPI_A, packingDensityCAIP
% Author: Maria Engel
% Author: Maria Engel
% (c) Cardiff University Brain Research Imaging Centre (CUBRIC), Cardiff University, United Kingdom
% (c) Cardiff University Brain Research Imaging Centre (CUBRIC), Cardiff University, United Kingdom
if nargin == 7
if nargin > 6
sliceSpacing = nSlicesTotal*(sliceThickness+sliceGap)/nSlicesSimultaneously;
if ~isempty(nSlicesTotal+sliceThickness+sliceGap+nSlicesSimultaneously)
 
sliceSpacing = nSlicesTotal*(sliceThickness+sliceGap)/nSlicesSimultaneously;
 
end
 
end
 
 
if nargin < 3 || isempty(sliceSpacing)
 
error(['Please provide either sliceSpacing or nSlicesSimultaneously, nSlicesTotal, ' ...
 
'sliceThickness and sliceGap as input arguments.']);
end
end
if nargin < 8 || isempty(doPlot)
if nargin < 8 || isempty(doPlot)
@@ -83,10 +92,22 @@ if nargin < 10
@@ -83,10 +92,22 @@ if nargin < 10
gifName = [];
gifName = [];
end
end
 
if nargout>7
 
doPlot = true;
 
end
 
% in-plane spacing of lines in k-space
% in-plane spacing of lines in k-space
deltak_inplane = 2*pi*R_inplane/FOV_inplane;
deltak_inplane = 2*pi*R_inplane/FOV_inplane;
kzSlabThickness = 2*pi/sliceSpacing;
kzSlabThickness = 2*pi/sliceSpacing;
 
if nargin < 4
 
nSlicesSimultaneously = ceil(kzSlabThickness*R_inplane/deltak_inplane);
 
if nargout > 3
 
warning(['Please provide nSlicesSimultaneously to retrieve correct blipped-CAIPIRINHA '...
 
'options, assuming %i simultaneously excited slices.'],nSlicesSimultaneously);
 
end
 
end
 
% As soon as L is so large that the distance to the chronologically next point is smaller than to
% As soon as L is so large that the distance to the chronologically next point is smaller than to
% the next point after a down-blip, the grids are going to get only worse = less homogeneous, i.e.
% the next point after a down-blip, the grids are going to get only worse = less homogeneous, i.e.
% no point in checking their packing density
% no point in checking their packing density
Loading