Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
9be1c2f9
Commit
9be1c2f9
authored
Jan 24, 2022
by
Pierre Paleo
Browse files
Merge branch 'master' of gitlab.esrf.fr:tomotools/nabu
parents
a513e2d6
f1b603bc
Pipeline
#65158
passed with stages
in 6 minutes and 5 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nabu/__init__.py
View file @
9be1c2f9
__version__
=
"2021.2.1-rc
1
"
__version__
=
"2021.2.1-rc
3
"
__nabu_modules__
=
[
"app"
,
"cuda"
,
...
...
nabu/estimation/cor.py
View file @
9be1c2f9
...
...
@@ -273,8 +273,8 @@ class CenterOfRotationSlidingWindow(CenterOfRotation):
# number of pixels where the window will "slide".
n
=
img_shape
[
-
1
]
-
window_width
diffs_mean
=
np
.
empty
((
n
,),
dtype
=
img_1
.
dtype
)
diffs_std
=
np
.
empty
((
n
,),
dtype
=
img_1
.
dtype
)
diffs_mean
=
np
.
zeros
((
n
,),
dtype
=
img_1
.
dtype
)
diffs_std
=
np
.
zeros
((
n
,),
dtype
=
img_1
.
dtype
)
for
ii
in
progress_bar
(
range
(
n
),
verbose
=
self
.
verbose
):
win_1_start
,
win_1_end
=
ii
,
ii
+
window_width
...
...
@@ -484,8 +484,8 @@ class CenterOfRotationGrowingWindow(CenterOfRotation):
+
"Found the following configuration instead => Side: %s, #1: %d, #2: %d"
%
(
side
,
n1
,
n2
)
)
diffs_mean
=
np
.
empty
((
n1
,),
dtype
=
img_1
.
dtype
)
diffs_std
=
np
.
empty
((
n1
,),
dtype
=
img_1
.
dtype
)
diffs_mean
=
np
.
zeros
((
n1
,),
dtype
=
img_1
.
dtype
)
diffs_std
=
np
.
zeros
((
n1
,),
dtype
=
img_1
.
dtype
)
for
ii
in
progress_bar
(
range
(
n1
),
verbose
=
self
.
verbose
):
win_1
=
window_bounds
(
win_1_mid_start
+
ii
)
...
...
nabu/estimation/translation.py
View file @
9be1c2f9
...
...
@@ -154,7 +154,7 @@ class DetectorTranslationAlongBeam(AlignmentBase):
cc_vs
=
np
.
fft
.
fftfreq
(
img_shape
[
-
2
],
1
/
img_shape
[
-
2
])
cc_hs
=
np
.
fft
.
fftfreq
(
img_shape
[
-
1
],
1
/
img_shape
[
-
1
])
shifts_vh
=
np
.
empty
((
num_imgs
,
2
))
shifts_vh
=
np
.
zeros
((
num_imgs
,
2
))
for
ii
,
cc
in
enumerate
(
ccs
):
(
f_vals
,
fv
,
fh
)
=
self
.
extract_peak_region_2d
(
cc
,
peak_radius
=
peak_fit_radius
,
cc_vs
=
cc_vs
,
cc_hs
=
cc_hs
)
shifts_vh
[
ii
+
1
,
:]
=
self
.
refine_max_position_2d
(
f_vals
,
fv
,
fh
)
...
...
nabu/io/utils.py
View file @
9be1c2f9
...
...
@@ -46,6 +46,9 @@ def get_compacted_dataslices(urls, subsampling=None):
def
merge_slices
(
slice1
,
slice2
):
return
slice
(
slice1
.
start
,
slice2
.
stop
)
if
len
(
urls
)
==
0
:
return
urls
sorted_files_indices
=
sorted
(
urls
.
keys
())
idx0
=
sorted_files_indices
[
0
]
first_url
=
urls
[
idx0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment