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
4df1fc09
Commit
4df1fc09
authored
8 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
FwdSim-Twins: auto-selecting shared blobs, that were also selected by the parent
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
2c12a89f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zUtil_ForwardSim/gtForwardSimulate_v2.m
+18
-3
18 additions, 3 deletions
zUtil_ForwardSim/gtForwardSimulate_v2.m
with
18 additions
and
3 deletions
zUtil_ForwardSim/gtForwardSimulate_v2.m
+
18
−
3
View file @
4df1fc09
...
@@ -413,8 +413,9 @@ for n = first : last
...
@@ -413,8 +413,9 @@ for n = first : last
for
ii_d
=
1
:
num_dets
for
ii_d
=
1
:
num_dets
fprintf
(
' + Detector: %d\n'
,
conf
.
det_index
(
ii_d
))
fprintf
(
' + Detector: %d\n'
,
conf
.
det_index
(
ii_d
))
for
ii_t
=
1
:
numel
(
fp_twins
)
for
ii_t
=
1
:
numel
(
fp_twins
)
fprintf
(
' %d) %d\n'
,
ii_t
,
...
fprintf
(
' %d) included: %d, auto-selected: %d\n'
,
ii_t
,
...
numel
(
fp_twins
(
ii_t
)
.
proj
(
ii_d
)
.
included
));
numel
(
fp_twins
(
ii_t
)
.
proj
(
ii_d
)
.
included
),
...
numel
(
find
(
fp_twins
(
ii_t
)
.
proj
(
ii_d
)
.
selected
))
);
end
end
end
end
fprintf
(
' - Assembling final data-structure..'
)
fprintf
(
' - Assembling final data-structure..'
)
...
@@ -706,6 +707,10 @@ function twin_vars = forward_simulate_twin(gr, gr_fwd_sim, gr_proj, conf, spotsC
...
@@ -706,6 +707,10 @@ function twin_vars = forward_simulate_twin(gr, gr_fwd_sim, gr_proj, conf, spotsC
'R_vector'
,
twin_vars
(
ii_t
)
.
R_vector
,
'center'
,
gr
.
center
);
'R_vector'
,
twin_vars
(
ii_t
)
.
R_vector
,
'center'
,
gr
.
center
);
twin
=
gtCalculateGrain
(
twin
,
parameters
,
'ref_omind'
,
gr
.
allblobs
.
omind
);
twin
=
gtCalculateGrain
(
twin
,
parameters
,
'ref_omind'
,
gr
.
allblobs
.
omind
);
% Determining reflections that are shared with the twin and
% selected by the parent
refl_match
=
gt6DGetMatchingReflections
(
gr
,
twin
,
conf
.
twin_angular_toll_deg
*
2
);
twin
.
stat
=
gr
.
stat
;
twin
.
stat
=
gr
.
stat
;
twin
.
stat
.
bbxsstd
=
twin
.
stat
.
bbxsstd
*
0.1
;
twin
.
stat
.
bbxsstd
=
twin
.
stat
.
bbxsstd
*
0.1
;
twin
.
stat
.
bbysstd
=
twin
.
stat
.
bbysstd
*
0.1
;
twin
.
stat
.
bbysstd
=
twin
.
stat
.
bbysstd
*
0.1
;
...
@@ -737,9 +742,19 @@ function twin_vars = forward_simulate_twin(gr, gr_fwd_sim, gr_proj, conf, spotsC
...
@@ -737,9 +742,19 @@ function twin_vars = forward_simulate_twin(gr, gr_fwd_sim, gr_proj, conf, spotsC
twin_proj
(
ii_d
)
.
stack
=
permute
(
cat
(
3
,
spots
{:}),
[
1
3
2
]);
twin_proj
(
ii_d
)
.
stack
=
permute
(
cat
(
3
,
spots
{:}),
[
1
3
2
]);
end
end
% We will auto-select the shared reflections with the parent
% that got also selcted there (if the same blob was used!)
parent_sel
=
false
(
size
(
gr
.
allblobs
.
omega
));
parent_sel
(
gr_proj
.
ondet
(
gr_proj
.
included
(
gr_proj
.
selected
)))
=
true
;
parent_spots
=
zeros
(
size
(
gr
.
allblobs
.
omega
));
parent_spots
(
gr_proj
(
ii_d
)
.
ondet
(
gr_proj
(
ii_d
)
.
included
))
=
gr_fwd_sim
(
ii_d
)
.
difspotID
;
twin_proj
(
ii_d
)
.
ondet
=
twin_ondet
;
twin_proj
(
ii_d
)
.
ondet
=
twin_ondet
;
twin_proj
(
ii_d
)
.
included
=
twin_incl
;
twin_proj
(
ii_d
)
.
included
=
twin_incl
;
twin_proj
(
ii_d
)
.
selected
=
false
(
numel
(
twin_incl
),
1
);
twin_proj
(
ii_d
)
.
selected
=
refl_match
(
twin_ondet
(
twin_incl
))
...
&
parent_sel
(
twin_ondet
(
twin_incl
))
...
&
(
parent_spots
(
twin_ondet
(
twin_incl
))
==
twin_fwd_sim
(
ii_d
)
.
difspotID
);
end
end
twin_vars
(
ii_t
)
.
allblobs
=
twin
.
allblobs
;
twin_vars
(
ii_t
)
.
allblobs
=
twin
.
allblobs
;
...
...
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