Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
HoloceneSampling
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maria Engel
HoloceneSampling
Commits
b45bab24
Commit
b45bab24
authored
1 year ago
by
Maria Engel
Browse files
Options
Downloads
Patches
Plain Diff
Clean up; less penetrant purple
parent
bf5ca907
No related branches found
Branches containing commit
No related tags found
1 merge request
!6
Master
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ComputeMostHexagonalSampling.m
+5
-9
5 additions, 9 deletions
ComputeMostHexagonalSampling.m
GetSamplingPatternColour.m
+18
-0
18 additions, 0 deletions
GetSamplingPatternColour.m
MakeOptDvsRPlot.m
+9
-9
9 additions, 9 deletions
MakeOptDvsRPlot.m
README.md
+1
-1
1 addition, 1 deletion
README.md
with
33 additions
and
19 deletions
ComputeMostHexagonalSampling.m
+
5
−
9
View file @
b45bab24
...
...
@@ -117,10 +117,6 @@ LArray = unique(sort([LArray L_CAIPI_B]));
isBlippedCAIPI_A
=
((
ceil
(
LArray
)
==
LArray
)
+
(
LArray
<=
nSlicesSimultaneously
))
>
1
;
isBlippedCAIPI_B
=
ismember
(
LArray
,
L_CAIPI_B
);
colourCAIPI_A
=
[
217
,
83
,
25
]/
255
;
% red
colourCAIPI_B
=
[
148
,
0
,
211
]/
255
;
% purple
colourOptimum
=
[
34
,
139
,
34
]/
255
;
% green
howFar2Look
=
10
;
% TODO: Find out what to put here!
d_min
=
zeros
(
size
(
LArray
));
...
...
@@ -149,9 +145,9 @@ for iL = 1:numel(LArray)
plot
(
LArray
(
iL
),
packingDensityArray
(
iL
),
'.'
,
'Color'
,
'k'
);
if
isBlippedCAIPI_A
(
iL
)
plot
(
LArray
(
iL
),
packingDensityArray
(
iL
),
'x'
,
'Color'
,
colourCAIPI_A
,
'MarkerSize'
,
10
,
'LineWidth'
,
3
);
plot
(
LArray
(
iL
),
packingDensityArray
(
iL
),
'x'
,
'Color'
,
GetSamplingPatternColour
(
1
)
,
'MarkerSize'
,
10
,
'LineWidth'
,
3
);
elseif
isBlippedCAIPI_B
(
iL
)
plot
(
LArray
(
iL
),
packingDensityArray
(
iL
),
'x'
,
'Color'
,
colourCAIPI_B
,
'MarkerSize'
,
10
,
'LineWidth'
,
3
);
plot
(
LArray
(
iL
),
packingDensityArray
(
iL
),
'x'
,
'Color'
,
GetSamplingPatternColour
(
2
)
,
'MarkerSize'
,
10
,
'LineWidth'
,
3
);
end
xlabel
(
'L'
);
ylabel
(
'Packing density [%]'
);
...
...
@@ -213,11 +209,11 @@ if doPlot
plot
(
LArray
,
packingDensityArray
,
'LineWidth'
,
3
,
'Color'
,
'k'
,
...
'DisplayName'
,
'All feasible sampling patterns'
);
plot
(
L_CAIPI_A
,
packingDensityCAIPI_A
,
'x'
,
'MarkerSize'
,
10
,
'LineWidth'
,
3
,
...
'Color'
,
colourCAIPI_A
,
'DisplayName'
,
'Blipped-CAIPIRINHA - A'
);
'Color'
,
GetSamplingPatternColour
(
1
)
,
'DisplayName'
,
'Blipped-CAIPIRINHA - A'
);
plot
(
L_CAIPI_B
,
packingDensityCAIPI_B
,
'x'
,
'MarkerSize'
,
10
,
'LineWidth'
,
3
,
...
'Color'
,
colourCAIPI_B
,
'DisplayName'
,
'Blipped-CAIPIRINHA - B'
);
'Color'
,
GetSamplingPatternColour
(
2
)
,
'DisplayName'
,
'Blipped-CAIPIRINHA - B'
);
plot
(
L_optimum
,
packingDensity
,
'x'
,
'MarkerSize'
,
10
,
'LineWidth'
,
3
,
...
'Color'
,
colourOptimum
,
'DisplayName'
,
'Optimum sampling'
);
'Color'
,
GetSamplingPatternColour
(
0
)
,
'DisplayName'
,
'Optimum sampling'
);
legend
;
xlabel
(
'L'
);
ylabel
(
'Packing density [%]'
);
...
...
This diff is collapsed.
Click to expand it.
GetSamplingPatternColour.m
0 → 100644
+
18
−
0
View file @
b45bab24
function
colour
=
GetSamplingPatternColour
(
samplingPattern
)
% IN
% samplingPattern 0: optimum sampling (as hexagonal as possible)
% 1: blipped-CAIPIRINHA A (Setsompop et al. MRM 2012, Zahneisen et al. MRM 2014)
% 2: blipped-CAIPIRINHA B (Narsude et al. MRM 2016)
% OUT
% colour rgb triplet
%
% Author: Maria Engel
% (c) Cardiff University Brain Research Imaging Centre (CUBRIC), Cardiff University, United Kingdom
switch
samplingPattern
case
0
colour
=
[
34
,
139
,
34
]/
255
;
% green
case
1
colour
=
[
217
,
83
,
25
]/
255
;
% red
case
2
colour
=
[
153
,
50
,
204
]/
255
;
% purple
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
MakeOptDvsRPlot.m
+
9
−
9
View file @
b45bab24
...
...
@@ -51,17 +51,17 @@ for iNSim = 1:numel(NSimArray)
name
=
sprintf
(
', N_{sim} = %i'
,
Nsim
);
end
nexttile
;
hold
on
;
plot
(
RArray
(
1
:
numel
(
packingDensity
))
*
Nsim
,
packingDensity
,
...
'DisplayName'
,
[
'As hexagonal as possible'
name
],
'
LineWidth'
,
2
,
'Color'
,
[
34
,
139
,
34
]/
255
);
plot
(
RArray
(
1
:
numel
(
packingDensity
))
*
Nsim
,
packingDensityCAIPI_A
,
'
Color'
,
[
217
,
83
,
25
]/
255
,
...
'DisplayName'
,
[
'Blipped-CAIPIRINHA - A'
name
],
'
LineWidth'
,
2
);
plot
(
RArray
(
1
:
min
(
numel
(
packingDensity
),
numel
(
packingDensityCAIPI_B
)))
*
Nsim
,
packingDensityCAIPI_B
,
'
Color'
,
[
148
,
0
,
211
]/
255
,
...
'DisplayName'
,
[
'Blipped-CAIPIRINHA - B'
name
],
'
LineWidth'
,
2
);
plot
(
RArray
(
1
:
numel
(
packingDensity
))
*
Nsim
,
packingDensity
,
'LineWidth'
,
2
,
...
'DisplayName'
,
[
'As hexagonal as possible'
name
],
'
Color'
,
GetSamplingPatternColour
(
0
)
);
plot
(
RArray
(
1
:
numel
(
packingDensity
))
*
Nsim
,
packingDensityCAIPI_A
,
'
LineWidth'
,
2
,
...
'DisplayName'
,
[
'Blipped-CAIPIRINHA - A'
name
],
'
Color'
,
GetSamplingPatternColour
(
1
)
);
plot
(
RArray
(
1
:
min
(
numel
(
packingDensity
),
numel
(
packingDensityCAIPI_B
)))
*
Nsim
,
packingDensityCAIPI_B
,
'
LineWidth'
,
2
,
...
'DisplayName'
,
[
'Blipped-CAIPIRINHA - B'
name
],
'
Color'
,
GetSamplingPatternColour
(
2
)
);
yline
(
pi
/
2
/
sqrt
(
3
)
*
100
,
'Color'
,
[
0.5
0.5
0.5
],
'LineWidth'
,
2
,
'DisplayName'
,
...
'Maximum circle packing density, 90.7%'
);
yline
(
pi
/
2
/
sqrt
(
3
)
*
100
,
'Color'
,
[
0.5
0.5
0.5
],
'LineWidth'
,
2
,
...
'DisplayName'
,
'Maximum circle packing density, 90.7%'
);
xlim
([
Rtot_start
Rtot_end
]);
ylim
([
5
0
92
]);
ylim
([
5
7
92
]);
if
iNSim
==
numel
(
NSimArray
)
||
doSave
==
false
xlabel
(
'R_{total}'
);
legend
;
...
...
This diff is collapsed.
Click to expand it.
README.md
+
1
−
1
View file @
b45bab24
...
...
@@ -13,4 +13,4 @@ MakeOptDvsRPlot.m (for Figure 3, this requires https://se.mathworks.com/matlabce
and
MakeExampleGridsPlot (for Figure 4, this requires export_fig code)
\ No newline at end of file
MakeExampleGridsPlot.m (for Figure 4, this also requires export_fig code)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment