Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
graintracking
DCT
Commits
3398d248
Commit
3398d248
authored
10 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
gtFedTestLoadData: added the possibility to specify the blobs to project
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
8719046f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
7_fed2/gtFedTestLoadData_v2.m
+19
-22
19 additions, 22 deletions
7_fed2/gtFedTestLoadData_v2.m
with
19 additions
and
22 deletions
7_fed2/gtFedTestLoadData_v2.m
+
19
−
22
View file @
3398d248
...
@@ -223,10 +223,21 @@ grain.proj(1:num_dets) = struct( ...
...
@@ -223,10 +223,21 @@ grain.proj(1:num_dets) = struct( ...
'gvb'
,
[]);
'gvb'
,
[]);
for
n
=
1
:
num_dets
for
n
=
1
:
num_dets
ondet
=
find
(
grain
.
allblobs
.
detector
(
n
)
.
ondet
);
% Checking if we should just project all of them, or wether the user
nbl
=
numel
(
ondet
);
% has something to say abou it.
if
(
isfield
(
fedpars
,
'detector'
))
ondet
=
fedpars
.
detector
(
n
)
.
ondet
;
included
=
fedpars
.
detector
(
n
)
.
included
;
selected
=
fedpars
.
detector
(
n
)
.
selected
;
else
ondet
=
find
(
grain
.
allblobs
.
detector
(
n
)
.
ondet
);
included
=
(
1
:
nbl
)
'
;
selected
=
true
(
size
(
included
));
end
nbl
=
numel
(
included
);
is_nearfield
=
norm
(
detgeo
(
n
)
.
detrefpos
)
<
3
0
;
is_nearfield
=
norm
(
detgeo
(
n
)
.
detrefpos
)
<
9
0
;
% If it is farfield, we should adjust the voxel size to be 1/4 of the
% If it is farfield, we should adjust the voxel size to be 1/4 of the
% pixel size
% pixel size
if
(
~
is_nearfield
)
if
(
~
is_nearfield
)
...
@@ -242,9 +253,6 @@ for n = 1:num_dets
...
@@ -242,9 +253,6 @@ for n = 1:num_dets
bl
=
repmat
(
gtFedBlobDefinition
(),
nbl
,
1
);
bl
=
repmat
(
gtFedBlobDefinition
(),
nbl
,
1
);
gvb
=
[];
gvb
=
[];
included
=
(
1
:
nbl
)
'
;
selected
=
true
(
size
(
included
));
for
ii
=
1
:
nbl
for
ii
=
1
:
nbl
% Load diffraction paramaters of blobs
% Load diffraction paramaters of blobs
ii_b
=
ondet
(
included
(
ii
));
ii_b
=
ondet
(
included
(
ii
));
...
@@ -282,7 +290,11 @@ for n = 1:num_dets
...
@@ -282,7 +290,11 @@ for n = 1:num_dets
bl
(
ii
)
.
u0im
=
grain
.
allblobs
.
detector
(
n
)
.
uvw
(
ii_b
,
:);
bl
(
ii
)
.
u0im
=
grain
.
allblobs
.
detector
(
n
)
.
uvw
(
ii_b
,
:);
% Padding around blob volume
% Padding around blob volume
bl
(
ii
)
.
addbl
=
fedpars
.
blobsizeadd
(
n
,
:);
if
(
isfield
(
fedpars
,
'detector'
))
bl
(
ii
)
.
addbl
=
fedpars
.
detector
(
n
)
.
blobsizeadd
;
else
bl
(
ii
)
.
addbl
=
fedpars
.
blobsizeadd
(
n
,
:);
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
@@ -331,7 +343,6 @@ for n = 1:num_dets
...
@@ -331,7 +343,6 @@ for n = 1:num_dets
gvcs
=
gv
.
cs
;
gvcs
=
gv
.
cs
;
for
ii
=
nbl
:
-
1
:
1
for
ii
=
nbl
:
-
1
:
1
% gvb(ii).uc0bl = zeros(size(gvcs), fedpars.gvtype);
gvb
(
ii
)
.
uc
=
zeros
(
size
(
gvcs
),
fedpars
.
gvtype
);
gvb
(
ii
)
.
uc
=
zeros
(
size
(
gvcs
),
fedpars
.
gvtype
);
gvb
(
ii
)
.
ucd
=
zeros
(
size
(
gvcs
),
fedpars
.
gvtype
);
gvb
(
ii
)
.
ucd
=
zeros
(
size
(
gvcs
),
fedpars
.
gvtype
);
gvb
(
ii
)
.
ucblmod
=
zeros
(
size
(
gvcs
),
fedpars
.
gvtype
);
gvb
(
ii
)
.
ucblmod
=
zeros
(
size
(
gvcs
),
fedpars
.
gvtype
);
...
@@ -394,20 +405,6 @@ for n = 1:num_dets
...
@@ -394,20 +405,6 @@ for n = 1:num_dets
bl
(
ii
)
.
mbbw
(
2
)
-
bl
(
ii
)
.
mbbw
(
1
)
+
1
];
bl
(
ii
)
.
mbbw
(
2
)
-
bl
(
ii
)
.
mbbw
(
1
)
+
1
];
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Angle between consecutive blobs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for
ii
=
1
:
nbl
nii
=
mod
(
ii
,
nbl
)
+
1
;
fedpars
.
blobnextang
(
ii
)
=
abs
(
bl
(
ii
)
.
plsam
*
bl
(
nii
)
.
plsam
'
);
fedpars
.
blobnextang
(
ii
)
=
min
(
fedpars
.
blobnextang
(
ii
),
1
);
fedpars
.
blobnextang
(
ii
)
=
acosd
(
fedpars
.
blobnextang
(
ii
));
fedpars
.
blobnextdet
(
ii
)
=
abs
(
det
(
bl
(
ii
)
.
U0
*
bl
(
nii
)
.
U0
'
));
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Transform into single
%%% Transform into single
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
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