Skip to content
Snippets Groups Projects
Commit 09f98e80 authored by Maria Engel's avatar Maria Engel
Browse files

Improve documentation & fall-back options

parent 2bf4a890
No related branches found
No related tags found
1 merge request!8Improve documentation & fall-back options
......@@ -12,11 +12,13 @@ function [packingDensity, L_optimum, isDegenerate, L_CAIPI_A, packingDensityCAIP
% [same unit as sliceSpacing, sliceThickness & sliceGap]
%
% 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]
%
% 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
% (only needed if sliceSpacing empty)
......@@ -67,8 +69,15 @@ function [packingDensity, L_optimum, isDegenerate, L_CAIPI_A, packingDensityCAIP
% Author: Maria Engel
% (c) Cardiff University Brain Research Imaging Centre (CUBRIC), Cardiff University, United Kingdom
if nargin == 7
sliceSpacing = nSlicesTotal*(sliceThickness+sliceGap)/nSlicesSimultaneously;
if nargin > 6
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
if nargin < 8 || isempty(doPlot)
......@@ -83,10 +92,22 @@ if nargin < 10
gifName = [];
end
if nargout>7
doPlot = true;
end
% in-plane spacing of lines in k-space
deltak_inplane = 2*pi*R_inplane/FOV_inplane;
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
% 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment