Issue with tilt correction when dataset has no dark or flat frames and flat field not requested
In the case of a dataset without dark or flat frame if we ask for the tilt correction like here: entry0000_stitched_HA1000_1.892um_2335008007_entry0000slice_003382_plane_XY.cfg (no flat correction requested) we end up with the following error:
/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/cupyx/jit/_interface.py:173: FutureWarning: cupyx.jit.rawkernel is experimental. The interface can change in the future.
cupy._util.experimental('cupyx.jit.rawkernel')
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/app/reconstruct.py", line 120, in <module>
main()
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/app/reconstruct.py", line 111, in main
R = get_reconstructor(args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/app/reconstruct.py", line 86, in get_reconstructor
proc = ProcessConfig(conf_dict=conf_dict, create_logger=logfile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/pipeline/processconfig.py", line 64, in __init__
self._dataset_estimations()
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/pipeline/processconfig.py", line 163, in _dataset_estimations
self._get_tilt()
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/pipeline/processconfig.py", line 183, in _get_tilt
self.tilt_estimator = DetectorTiltEstimator(
^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/pipeline/estimators.py", line 929, in __init__
self._init_flatfield()
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/pipeline/estimators.py", line 941, in _init_flatfield
self.flatfield = FlatFieldDataUrls(
^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/preproc/flatfield.py", line 436, in __init__
flats_arrays_dict = load_images_from_dataurl_dict(flats, **chunk_reader_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/io/reader.py", line 552, in load_images_from_dataurl_dict
chunk_reader = ChunkReader(data_url_dict, **chunk_reader_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/io/reader.py", line 301, in __init__
self._get_reader_class(files)
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/io/reader.py", line 350, in _get_reader_class
ext = self._infer_file_type(files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_07_02/lib/python3.11/site-packages/nabu/io/reader.py", line 343, in _infer_file_type
fname = files[sorted(files.keys())[0]].file_path()
~~~~~~~~~~~~~~~~~~~~^^^