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
51a502f9
Commit
51a502f9
authored
7 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
6D-reconstruction: small fixes
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
52d09aba
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
zUtil_Deformation/Gt6DBlobReconstructor.m
+13
-6
13 additions, 6 deletions
zUtil_Deformation/Gt6DBlobReconstructor.m
zUtil_Geo/gtGeoProjForReconstruction.m
+0
-1
0 additions, 1 deletion
zUtil_Geo/gtGeoProjForReconstruction.m
with
13 additions
and
7 deletions
zUtil_Deformation/Gt6DBlobReconstructor.m
+
13
−
6
View file @
51a502f9
...
...
@@ -567,6 +567,7 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
proj_bls
=
cell
(
num_det
,
1
);
renorm_factors
=
self
.
detector_ss
.^
2
;
do_renorm
=
abs
(
renorm_factors
-
1
)
>
eps
(
'single'
);
for
ii_d
=
1
:
num_det
c
=
tic
();
...
...
@@ -587,7 +588,7 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
timing_sb
=
timing_sb
+
sb_time
;
end
if
(
renorm
_factors
(
ii_d
)
~=
1
)
if
(
do_
renorm
(
ii_d
))
c
=
tic
();
for
ii_b
=
1
:
numel
(
proj_bls
{
ii_d
})
proj_bls
{
ii_d
}{
ii_b
}
=
proj_bls
{
ii_d
}{
ii_b
}
*
renorm_factors
(
ii_d
);
...
...
@@ -600,7 +601,9 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
self
.
statistics
.
add_timestamp
(
timing_fp
,
'cp_dual_update_detector'
,
'cp_dual_detector_FP'
);
self
.
statistics
.
add_timestamp
(
timing_sb
,
'cp_dual_update_detector'
,
'cp_dual_detector_SB'
);
self
.
statistics
.
add_timestamp
(
timing_in
,
'cp_dual_update_detector'
,
'cp_dual_detector_IN'
);
self
.
statistics
.
add_timestamp
(
timing_rs
,
'cp_dual_update_detector'
,
'cp_dual_detector_RS'
);
if
(
any
(
do_renorm
))
self
.
statistics
.
add_timestamp
(
timing_rs
,
'cp_dual_update_detector'
,
'cp_dual_detector_RS'
);
end
end
end
...
...
@@ -615,6 +618,7 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
num_geoms
=
self
.
get_number_geometries
();
renorm_factors
=
1
.
/
(
self
.
detector_ss
.^
2
);
do_renorm
=
abs
(
renorm_factors
-
1
)
>
eps
(
'single'
);
num_det
=
self
.
get_number_detectors
();
for
n
=
1
:
chunk_size
:
num_geoms
...
...
@@ -627,7 +631,7 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
timing_bp
=
timing_bp
+
bp_time
;
timing_bs
=
timing_bs
+
bs_time
;
if
(
renorm
_factors
(
ii_d
)
~=
1
)
if
(
do_
renorm
(
ii_d
))
c
=
tic
();
v
(:,
ii_d
)
=
gtCxxMathsCellTimes
(
v
(:,
ii_d
),
renorm_factors
(
ii_d
),
'threads'
,
self
.
num_threads
,
'copy'
,
false
);
timing_rs
=
timing_rs
+
toc
(
c
);
...
...
@@ -654,7 +658,9 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
self
.
statistics
.
add_timestamp
(
timing_bs
,
'cp_primal_update'
,
'cp_primal_BS'
)
self
.
statistics
.
add_timestamp
(
timing_corr
,
'cp_primal_update'
,
'cp_primal_CORR'
)
self
.
statistics
.
add_timestamp
(
timing_app
,
'cp_primal_update'
,
'cp_primal_APP'
)
self
.
statistics
.
add_timestamp
(
timing_rs
,
'cp_primal_update'
,
'cp_primal_RS'
)
if
(
any
(
do_renorm
))
self
.
statistics
.
add_timestamp
(
timing_rs
,
'cp_primal_update'
,
'cp_primal_RS'
)
end
end
end
...
...
@@ -668,7 +674,6 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
vols_ones
=
cell
(
size
(
self
.
currentSolution
));
vols_ones
(:)
=
{
ones
(
self
.
volume_geometry
,
self
.
data_type
)};
self
.
fwd_weights
=
self
.
compute_fwd_projection
(
vols_ones
,
false
);
% self.fwd_weights = self.getRowsSum();
self
.
fwd_weights
=
self
.
apply_psf
(
self
.
fwd_weights
,
true
);
for
ii_d
=
1
:
num_det
for
ii_b
=
1
:
numel
(
self
.
fwd_weights
)
...
...
@@ -699,7 +704,9 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
for
ii_d
=
1
:
num_det
sigma1
{
ii_d
}
=
cell
(
size
(
self
.
fwd_weights
{
ii_d
}));
for
n
=
1
:
numel
(
sigma1
{
ii_d
})
sigma1
{
ii_d
}{
n
}
=
1
.
/
(
self
.
fwd_weights
{
ii_d
}{
n
}
+
(
self
.
fwd_weights
{
ii_d
}{
n
}
==
0
));
% Necessary in case of use of OTF
tol
=
eps
(
'single'
)
*
max
(
self
.
fwd_weights
{
ii_d
}{
n
}(:));
sigma1
{
ii_d
}{
n
}
=
1
.
/
(
self
.
fwd_weights
{
ii_d
}{
n
}
+
(
self
.
fwd_weights
{
ii_d
}{
n
}
<
tol
));
end
sigma1_1
{
ii_d
}
=
sigma1
{
ii_d
};
...
...
This diff is collapsed.
Click to expand it.
zUtil_Geo/gtGeoProjForReconstruction.m
+
0
−
1
View file @
51a502f9
...
...
@@ -55,7 +55,6 @@ function proj_geom = gtGeoProjForReconstruction(projvec_sam, omega, vol_center,.
detgeo
=
gtGeoConvertLegacyLabgeo2Detgeo
(
labgeo
);
end
% Bounding box center U,V coordinates
bbcent_det
=
[
...
bbpos
(:,
1
)
+
(
bbpos
(:,
3
)
-
1
)
/
2
+
bboff
(:,
1
)
,
...
...
...
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