================================================ FAILURES ================================================
____________________________________ TestVoCOR.test_cor_360_halftomo _____________________________________
self = <nabu.estimation.tests.test_cor.TestVoCOR object at 0x7f0009a0c1f0>
def test_cor_360_halftomo(self):
> self._test_cor("bamboo_hercules", tolerance=0.1, halftomo=True)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/estimation/tests/test_cor.py:502:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nabu.estimation.tests.test_cor.TestVoCOR object at 0x7f0009a0c1f0>
dataset_name = 'bamboo_hercules', tolerance = 0.1, cor_options = {'halftomo': True}
cor_finder = <nabu.estimation.cor_sino.CenterOfRotationVo object at 0x7f004cc0ca00>
cor = 2058.8258666992188, cor_ref = array(778.8), @py_assert1 = <ufunc 'absolute'>
@py_assert5 = 1280.0258666992188, @py_assert6 = 1280.0258666992188, @py_assert8 = False
def _test_cor(self, dataset_name, tolerance=1e-2, **cor_options):
cor_finder = CenterOfRotationVo()
cor = cor_finder.find_shift(self.test_sinograms[dataset_name]["data"], **cor_options)
cor_ref = self.test_sinograms[dataset_name]["cor"]
> assert (
np.abs(cor - cor_ref) < tolerance
), "CoR estimation failed for %s: expected %.3f, got %.3f (tol = %.2e)" % (
dataset_name,
cor_ref,
cor,
tolerance,
)
E AssertionError: CoR estimation failed for bamboo_hercules: expected 778.800, got 2058.826 (tol = 1.00e-01)
E assert 1280.0258666992188 < 0.1
E + where 1280.0258666992188 = <ufunc 'absolute'>((2058.8258666992188 - array(778.8)))
E + where <ufunc 'absolute'> = np.abs
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/estimation/tests/test_cor.py:487: AssertionError
______________________________________ TestCompositeCorFinder.test _______________________________________
self = <test_estimators.TestCompositeCorFinder object at 0x7f0001a5e730>
def test(self):
> cor_finder = CompositeCOREstimator(
self.dataset_info, theta_interval=self.theta_interval, cor_options=self.cor_options
)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/tests/test_estimators.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:504: in __init__
self.flatfield = FlatField(
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:101: in __init__
self._set_flats_and_darks(flats, darks)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:134: in _set_flats_and_darks
self._check_frames(flats, "flats", 1, 9999)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:163: in _check_frames
self._check_frame_shape(frames, frames_type)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nabu.preproc.flatfield.FlatFieldArrays object at 0x7f00000c83a0>
frames = {1: DataUrl(valid=True, scheme='silx', file_path='/tmp/nabu_testdata_paleo/test_composite_cor_finder_data.h5', data_pa.../nabu_testdata_paleo/test_composite_cor_finder_data.h5', data_path='/entry/instrument/detector/data', data_slice=4002)}
frames_type = 'flats'
def _check_frame_shape(self, frames, frames_type):
for frame_idx, frame in frames.items():
> if frame.shape != self.shape:
E AttributeError: 'DataUrl' object has no attribute 'shape'
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:167: AttributeError
________________________________ TestCorNearPos.test_cor_sliding_standard ________________________________
self = <test_estimators.TestCorNearPos object at 0x7f0001a5eb50>
def test_cor_sliding_standard(self):
cor_options = extract_parameters(self.conf_std["reconstruction"].get("cor_options", None), sep=";")
> finder = CORFinder("sliding-window", self.ds_std, do_flatfield=True, cor_options=cor_options)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/tests/test_estimators.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:181: in __init__
self._apply_flatfield()
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:192: in _apply_flatfield
self.flatfield = FlatField(
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:101: in __init__
self._set_flats_and_darks(flats, darks)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:134: in _set_flats_and_darks
self._check_frames(flats, "flats", 1, 9999)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:163: in _check_frames
self._check_frame_shape(frames, frames_type)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nabu.preproc.flatfield.FlatFieldArrays object at 0x7effd09075b0>
frames = {1: DataUrl(valid=True, scheme='silx', file_path='/tmp/nabu_testdata_paleo/bamboo_reduced.nx', data_path='/entry0000/i...path='/tmp/nabu_testdata_paleo/bamboo_reduced.nx', data_path='/entry0000/instrument/detector/data', data_slice=4), ...}
frames_type = 'flats'
def _check_frame_shape(self, frames, frames_type):
for frame_idx, frame in frames.items():
> if frame.shape != self.shape:
E AttributeError: 'DataUrl' object has no attribute 'shape'
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:167: AttributeError
____________________________ TestCorNearPos.test_cor_fourier_angles_standard _____________________________
self = <test_estimators.TestCorNearPos object at 0x7f0001a5ed90>
def test_cor_fourier_angles_standard(self):
cor_options = extract_parameters(self.conf_std["reconstruction"].get("cor_options", None), sep=";")
> finder = SinoCORFinder("fourier-angles", self.ds_std, do_flatfield=True, cor_options=cor_options)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/tests/test_estimators.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:282: in __init__
super().__init__(method, dataset_info, do_flatfield=do_flatfield, cor_options=cor_options, logger=logger)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:112: in __init__
self._init_cor_finder()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nabu.pipeline.estimators.SinoCORFinder object at 0x7effd07295b0>
def _init_cor_finder(self):
cor_finder_cls = self.search_methods[self.method]["class"]
> self.cor_finder = cor_finder_cls(verbose=False, logger=self.logger, extra_options=None)
E TypeError: CenterOfRotationFourierAngles() takes no arguments
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:139: TypeError
_________________________________ TestCorNearPos.test_cor_sliding_bliss __________________________________
self = <test_estimators.TestCorNearPos object at 0x7f0001a5efa0>
def test_cor_sliding_bliss(self):
cor_options = extract_parameters(self.conf_bliss["reconstruction"].get("cor_options", None), sep=";")
> finder = CORFinder("sliding-window", self.ds_bliss, do_flatfield=True, cor_options=cor_options)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/tests/test_estimators.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:181: in __init__
self._apply_flatfield()
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:192: in _apply_flatfield
self.flatfield = FlatField(
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:101: in __init__
self._set_flats_and_darks(flats, darks)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:134: in _set_flats_and_darks
self._check_frames(flats, "flats", 1, 9999)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:163: in _check_frames
self._check_frame_shape(frames, frames_type)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nabu.preproc.flatfield.FlatFieldArrays object at 0x7effd07448b0>
frames = {1: DataUrl(valid=True, scheme='silx', file_path='/tmp/nabu_testdata_paleo/bamboo_reduced_bliss.nx', data_path='/entry.../tmp/nabu_testdata_paleo/bamboo_reduced_bliss.nx', data_path='/entry0000/instrument/detector/data', data_slice=4), ...}
frames_type = 'flats'
def _check_frame_shape(self, frames, frames_type):
for frame_idx, frame in frames.items():
> if frame.shape != self.shape:
E AttributeError: 'DataUrl' object has no attribute 'shape'
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/preproc/flatfield.py:167: AttributeError
______________________________ TestCorNearPos.test_cor_fourier_angles_bliss ______________________________
self = <test_estimators.TestCorNearPos object at 0x7f0001a5ecd0>
def test_cor_fourier_angles_bliss(self):
cor_options = extract_parameters(self.conf_bliss["reconstruction"].get("cor_options", None), sep=";")
> finder = SinoCORFinder("fourier-angles", self.ds_bliss, do_flatfield=True, cor_options=cor_options)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/tests/test_estimators.py:133:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:282: in __init__
super().__init__(method, dataset_info, do_flatfield=do_flatfield, cor_options=cor_options, logger=logger)
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:112: in __init__
self._init_cor_finder()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nabu.pipeline.estimators.SinoCORFinder object at 0x7f004cb6d070>
def _init_cor_finder(self):
cor_finder_cls = self.search_methods[self.method]["class"]
> self.cor_finder = cor_finder_cls(verbose=False, logger=self.logger, extra_options=None)
E TypeError: CenterOfRotationFourierAngles() takes no arguments
.venv/py38_ubuntu20_amd/lib/python3.8/site-packages/nabu/pipeline/estimators.py:139: TypeError
______________________________________ TestCtf.test_ctf_id16_class _______________________________________