Commit 9be1c2f9 authored by Pierre Paleo's avatar 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
__version__ = "2021.2.1-rc1"
__version__ = "2021.2.1-rc3"
__nabu_modules__ = [
"app",
"cuda",
......
......@@ -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)
......
......@@ -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)
......
......@@ -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]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment