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
2648a93b
Commit
2648a93b
authored
9 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
Fixed incoming beam intensity computation
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
5649f61e
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
4_grains/gtComputeIncomingBeamIntensity.m
+25
-12
25 additions, 12 deletions
4_grains/gtComputeIncomingBeamIntensity.m
with
25 additions
and
12 deletions
4_grains/gtComputeIncomingBeamIntensity.m
+
25
−
12
View file @
2648a93b
function
[
gr
,
refs
]
=
gtComputeIncomingBeamIntensity
(
gr
,
parameters
,
refs
)
function
[
gr
,
refs
]
=
gtComputeIncomingBeamIntensity
(
gr
,
parameters
,
refs
)
% FUNCTION [gr, refs] = gtComputeIncomingBeamIntensity(gr, parameters, refs)
% FUNCTION [gr, refs] = gtComputeIncomingBeamIntensity(gr, parameters, refs)
if
(
parameters
.
acq
.
interlaced_turns
>
0
)
error
(
'gtComputeIncomingBeamIntensity:wrong_conf'
,
...
'Interlaced turns not supported, yet!'
)
end
omega_step
=
180
/
parameters
.
acq
.
nproj
;
if
(
isfield
(
gr
.
proj
,
'ondet'
))
if
(
isfield
(
gr
.
proj
,
'ondet'
))
gr_included
=
gr
.
proj
.
ondet
(
gr
.
proj
.
included
);
gr_included
=
gr
.
proj
.
ondet
(
gr
.
proj
.
included
);
else
else
gr_included
=
gr
.
ondet
(
gr
.
included
);
gr_included
=
gr
.
ondet
(
gr
.
included
);
end
end
omega_step
=
gtGetOmegaStepDeg
(
parameters
);
omegas
=
gr
.
allblobs
.
omega
(
gr_included
);
omegas
=
gr
.
allblobs
.
omega
(
gr_included
);
gc_det_pos
=
gtGeoGrainCenterSam2Det
(
gr
.
center
,
omegas
,
parameters
);
gc_det_pos
=
gtGeoGrainCenterSam2Det
(
gr
.
center
,
omegas
,
parameters
);
rounded_gc_det
=
round
(
gc_det_pos
);
rounded_gc_det
=
round
(
gc_det_pos
);
img_nums
=
omegas
/
omega_step
;
img_nums
=
omegas
/
omega_step
;
min_ws
=
floor
(
img_nums
/
parameters
.
acq
.
refon
)
+
1
;
if
(
parameters
.
acq
.
interlaced_turns
>
0
)
max_ws
=
min_ws
+
1
;
error
(
'gtComputeIncomingBeamIntensity:wrong_conf'
,
...
'Interlaced turns not supported, yet!'
)
% TO BE FINISHED
min_ws
=
floor
(
img_nums
);
max_ws
=
min_ws
+
1
;
min_cs
=
max_ws
-
img_nums
;
max_cs
=
1
-
min_cs
;
min_cs
=
(
max_ws
-
(
img_nums
/
parameters
.
acq
.
refon
)
-
1
);
min_min_ref_ws
=
floor
(
min_ws
/
parameters
.
acq
.
refon
)
+
1
;
max_cs
=
1
-
min_cs
;
min_max_ref_ws
=
floor
(
max_ws
/
parameters
.
acq
.
refon
)
+
1
;
max_min_ref_ws
=
min_min_ref_ws
+
1
;
max_max_ref_ws
=
min_max_ref_ws
+
1
;
else
min_ref_ws
=
floor
(
img_nums
/
parameters
.
acq
.
refon
)
+
1
;
max_ref_ws
=
min_ref_ws
+
1
;
min_cs
=
(
max_ref_ws
-
(
img_nums
/
parameters
.
acq
.
refon
)
-
1
);
max_cs
=
1
-
min_cs
;
end
if
(
~
exist
(
'refs'
,
'var'
))
if
(
~
exist
(
'refs'
,
'var'
))
refs
=
load_reference_imgs
(
parameters
);
refs
=
load_reference_imgs
(
parameters
);
end
end
max_selection
=
max_cs
>
1e-4
;
max_selection
=
max_cs
>
1e-4
;
min_indx
=
sub2ind
(
size
(
refs
),
rounded_gc_det
(:,
2
),
rounded_gc_det
(:,
1
),
min_ws
);
min_indx
=
sub2ind
(
size
(
refs
),
rounded_gc_det
(:,
2
),
rounded_gc_det
(:,
1
),
min_
ref_
ws
);
max_indx
=
sub2ind
(
size
(
refs
),
rounded_gc_det
(
max_selection
,
2
),
rounded_gc_det
(
max_selection
,
1
),
max_ws
(
max_selection
));
max_indx
=
sub2ind
(
size
(
refs
),
rounded_gc_det
(
max_selection
,
2
),
rounded_gc_det
(
max_selection
,
1
),
max_
ref_
ws
(
max_selection
));
min_vals
=
refs
(
min_indx
)
.*
min_cs
;
min_vals
=
refs
(
min_indx
)
.*
min_cs
;
max_vals
=
refs
(
max_indx
)
.*
max_cs
(
max_selection
);
max_vals
=
refs
(
max_indx
)
.*
max_cs
(
max_selection
);
...
...
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