nabu 2024.2.1__py3-none-any.whl → 2024.2.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
nabu/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "2024.2.1"
1
+ __version__ = "2024.2.3"
2
2
  __nabu_modules__ = [
3
3
  "app",
4
4
  "cuda",
@@ -89,13 +89,14 @@ def estimate_cor(method, dataset_info, do_flatfield=True, cor_options=None, logg
89
89
  estimated_cor = cor_finder.find_cor()
90
90
  else:
91
91
  composite_options = update_func_kwargs(CompositeCORFinder, cor_options)
92
- for what in ["cor_options", "logger"]:
92
+ for what in ["cor_options", "logger", "do_flatfield"]:
93
93
  composite_options.pop(what, None)
94
94
  cor_finder = CompositeCORFinder(
95
95
  dataset_info,
96
96
  cor_options=cor_options,
97
+ do_flatfield=do_flatfield,
97
98
  logger=logger,
98
- **composite_options,
99
+ **composite_options, # contains take_log
99
100
  )
100
101
  estimated_cor = cor_finder.find_cor()
101
102
  return estimated_cor
@@ -451,6 +452,7 @@ class CompositeCORFinder(CORFinderBase):
451
452
  oversampling=4,
452
453
  theta_interval=5,
453
454
  n_subsampling_y=40,
455
+ do_flatfield=True,
454
456
  take_log=True,
455
457
  cor_options=None,
456
458
  spike_threshold=0.04,
@@ -458,7 +460,7 @@ class CompositeCORFinder(CORFinderBase):
458
460
  norm_order=1,
459
461
  ):
460
462
  super().__init__(
461
- "composite-coarse-to-fine", dataset_info, do_flatfield=True, cor_options=cor_options, logger=logger
463
+ "composite-coarse-to-fine", dataset_info, do_flatfield=False, cor_options=cor_options, logger=logger
462
464
  )
463
465
  if norm_order not in [1, 2]:
464
466
  raise ValueError(
@@ -535,7 +537,10 @@ class CompositeCORFinder(CORFinderBase):
535
537
 
536
538
  self.absolute_indices = sorted(self.dataset_info.projections.keys())
537
539
 
538
- my_flats = self.dataset_info.flats
540
+ if do_flatfield:
541
+ my_flats = self.dataset_info.flats
542
+ else:
543
+ my_flats = None
539
544
 
540
545
  if my_flats is not None and len(list(my_flats.keys())):
541
546
  self.use_flat = True
nabu/stitching/config.py CHANGED
@@ -1038,8 +1038,9 @@ class PreProcessedSingleAxisStitchingConfiguration(SingleAxisStitchingConfigurat
1038
1038
  config[STITCHING_SECTION].get(ALIGNMENT_AXIS_2_FIELD, AlignmentAxis2.CENTER)
1039
1039
  ),
1040
1040
  pad_mode=config[STITCHING_SECTION].get(PAD_MODE_FIELD, "constant"),
1041
- duplicate_data=not config[STITCHING_SECTION].get(AVOID_DATA_DUPLICATION_FIELD, False),
1042
- normalization_by_sample=NormalizationBySample.from_dict(config.get(NORMALIZATION_BY_SAMPLE_SECTION, {})),
1041
+ duplicate_data=not _scalar_or_tuple_to_bool_or_tuple_of_bool(
1042
+ config[STITCHING_SECTION].get(AVOID_DATA_DUPLICATION_FIELD, False)
1043
+ ),
1043
1044
  )
1044
1045
 
1045
1046
 
@@ -1196,7 +1197,9 @@ class PostProcessedSingleAxisStitchingConfiguration(SingleAxisStitchingConfigura
1196
1197
  config[STITCHING_SECTION].get(ALIGNMENT_AXIS_2_FIELD, AlignmentAxis2.CENTER)
1197
1198
  ),
1198
1199
  pad_mode=config[STITCHING_SECTION].get(PAD_MODE_FIELD, "constant"),
1199
- duplicate_data=not config[STITCHING_SECTION].get(AVOID_DATA_DUPLICATION_FIELD, False),
1200
+ duplicate_data=not _scalar_or_tuple_to_bool_or_tuple_of_bool(
1201
+ config[STITCHING_SECTION].get(AVOID_DATA_DUPLICATION_FIELD, False)
1202
+ ),
1200
1203
  normalization_by_sample=NormalizationBySample.from_dict(config.get(NORMALIZATION_BY_SAMPLE_SECTION, {})),
1201
1204
  )
1202
1205
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nabu
3
- Version: 2024.2.1
3
+ Version: 2024.2.3
4
4
  Summary: Nabu - Tomography software
5
5
  Author-email: Pierre Paleo <pierre.paleo@esrf.fr>, Henri Payno <henri.payno@esrf.fr>, Alessandro Mirone <mirone@esrf.fr>, Jérôme Lesaint <jerome.lesaint@esrf.fr>
6
6
  Maintainer-email: Pierre Paleo <pierre.paleo@esrf.fr>
@@ -1,7 +1,7 @@
1
1
  doc/conf.py,sha256=3xtCarCHrXPr50GbeRDuH-o3Jzojw7mpr7vpGfZPLAE,3787
2
2
  doc/create_conf_doc.py,sha256=IVOdP70KvbW9WS_UQu3Iyd0YfS60E2fJ5IDtQ_s4cDw,1143
3
3
  doc/get_mathjax.py,sha256=VIvKRCdDuF2VoY8JD3mSey9XX13AZMmwTJBHdt1tUs4,1012
4
- nabu/__init__.py,sha256=_crjpH1e06xe5ACe0WGTWJwi-ZGm59UWsB_3tUnYxlA,270
4
+ nabu/__init__.py,sha256=VkyuOACmICPwB6LCfFlIOXKT0WC3Oj9EZDGt9WgJBVQ,270
5
5
  nabu/tests.py,sha256=cew9OY2uTyncHI_HM32W8CP6B1GTGKaOW65XtMEqs7o,1417
6
6
  nabu/testutils.py,sha256=VkSL9tbY0XEH49Z5OjDFFhzkSxrCv4UIuvSVFgegSUY,7632
7
7
  nabu/utils.py,sha256=V1B_sD54XGNKn5pORa2yNCATyswOzybey3sv8BuIYWY,26355
@@ -31,7 +31,6 @@ nabu/app/shrink_dataset.py,sha256=P9dorO0Q-gPAWgSHyZi3XQp4jkMTJacDYzNvJY4oh98,35
31
31
  nabu/app/stitching.py,sha256=T5nQVp7D6jNg86vMi8BCQANJJsKstvwItJWZDs05t64,4194
32
32
  nabu/app/utils.py,sha256=XUBRWDmth4i3BZHd27rfarFAUP7OEcsMeVmDJ6T4EXA,1178
33
33
  nabu/app/validator.py,sha256=IR-DcUV5h1Fc5CChBfBIaglrGpfKNICX7tGirAroMiw,3368
34
- nabu/app/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
34
  nabu/app/tests/test_reduce_dark_flat.py,sha256=qD52JL6fgJh7UEeGLssmsmGkqPTL8YTu29Hj1Nk9Bjg,2725
36
35
  nabu/cuda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
36
  nabu/cuda/convolution.py,sha256=n8KsJ7IZdPOs_K5QZC6qblnOvIKYwxtdt03oNa0GiMU,241
@@ -131,7 +130,7 @@ nabu/pipeline/config_validators.py,sha256=ocAKB26iRjm5qs1Ay4B_rgGcg8aZjAP34XpEZR
131
130
  nabu/pipeline/datadump.py,sha256=lK36YlsVSeE4fdkD7cgVCl4RKn-Wa9KYgOw4DNtH8Ow,6982
132
131
  nabu/pipeline/dataset_validator.py,sha256=etQw9NC_YGsdWCgjsn8aJ3WfvcRuJlLVZlWoqhvvo-8,9263
133
132
  nabu/pipeline/detector_distortion_provider.py,sha256=ru1AxbcuO-FA8FYooPBWgp1lzdSDUtzFUC1A_sS8jME,920
134
- nabu/pipeline/estimators.py,sha256=AZXDmz7hngbVEfytpcu3E2QkOG4IqtXjQN8uUMBJTa0,40298
133
+ nabu/pipeline/estimators.py,sha256=QfjExqNPKON3dsHmkEboXBA18ierlHhx-VIBe2m7Otk,40473
135
134
  nabu/pipeline/params.py,sha256=EoovjCUTUXmj5HQ3qE0RhP7XD3cndaiT21TdvjTIhE8,3746
136
135
  nabu/pipeline/processconfig.py,sha256=3xx2Lc8uEzPAqSMwUncr4RCiCtKn2c7wnXXbPSn8GNo,7719
137
136
  nabu/pipeline/reader.py,sha256=wkxPHYOi_C8dHNc7kddB8AMtFuW7GjsP_tm6SJeHlEY,4792
@@ -263,12 +262,11 @@ nabu/resources/templates/id16_holo.conf,sha256=sDd_rEJGZjOGVAsGub5sT2arfXDnc_sxy
263
262
  nabu/resources/templates/id16a_fluo.conf,sha256=Nz1etzO2fSwksi7CThWJ5T1kZEdyBe8rMO7puNJ93Hc,542
264
263
  nabu/resources/templates/id19_pag.conf,sha256=u4fFPEBprzOW9_5_ChkIgowQcYpLhjmA8Gwm5XgC4Jc,384
265
264
  nabu/resources/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
266
- nabu/resources/tests/test_extract.py,sha256=pDFvgwPNH4n-UjhJibRH2vTkjDWYF2wSImUtfNq1ITo,220
267
265
  nabu/resources/tests/test_nxflatfield.py,sha256=XRGbYwqJv0NYAVQnAB224TwTZP_W2Bs3-yu0zQnDzEM,4179
268
266
  nabu/resources/tests/test_units.py,sha256=F2jFTck-1UwYET1MwTtX6ntzYUosfwOJkugSencGgz8,2155
269
267
  nabu/stitching/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
270
268
  nabu/stitching/alignment.py,sha256=2ehpuWDz38AFAoJk3yA0DXf-18Kb329YaCCBBpa7Txc,9078
271
- nabu/stitching/config.py,sha256=wxidcHaCfp0LxqKKMFqshS_oECslcgBozIenQOQMJPU,52755
269
+ nabu/stitching/config.py,sha256=CP5g3f4sXpUBLAlG7LRg-90Ebon-janurbuORgYGi1c,52783
272
270
  nabu/stitching/definitions.py,sha256=JbmYwXKxOTYCr2LDXbHO-uNE2OLOBm4ir9AQ7e-Q3lY,158
273
271
  nabu/stitching/frame_composition.py,sha256=7HebOFzSBirJT-MG10T7dzR8Gu0YVwfJb27LDk8lln4,6687
274
272
  nabu/stitching/overlap.py,sha256=JkLM8gNyacEY7BE9vyF8M28Rer97-ExK8ZEvOKeFbPw,17200
@@ -311,9 +309,9 @@ nabu/thirdparty/pore3d_deringer_munch.py,sha256=o4bisnFc-wMjuohWBT8wgWmfNehPQGtC
311
309
  nabu/thirdparty/tomocupy_remove_stripe.py,sha256=Khe4zFf0kRzu65Yxnvq58gt1ljOztqJGdMDhVAiM7lM,24363
312
310
  nabu/thirdparty/tomopy_phase.py,sha256=hK4oPpkogLOhv23XzzEXQY2u3r8fJvASY_bINVs6ERE,8634
313
311
  nabu/thirdparty/tomwer_load_flats_darks.py,sha256=ZNoVAinUb_wGYbfvs_4BVnWsjsQmNxSvCh1bWhR2WWg,5611
314
- nabu-2024.2.1.dist-info/LICENSE,sha256=1eAIPSnEsnSFNUODnLtNtQTs76exG3ZxJ1DJR6zoUBA,1066
315
- nabu-2024.2.1.dist-info/METADATA,sha256=XlEefB-apFg-XrbRJ-uOM18VdoqY-MXyiqO77-l3_m4,5538
316
- nabu-2024.2.1.dist-info/WHEEL,sha256=5sUXSg9e4bi7lTLOHcm6QEYwO5TIF1TNbTSVFVjcJcc,92
317
- nabu-2024.2.1.dist-info/entry_points.txt,sha256=cJKGkBeykVL7uK3E4R0RLRqMXifTL2qdO573syPAvJc,1288
318
- nabu-2024.2.1.dist-info/top_level.txt,sha256=fsm_N3eXLRZk2QXF9OSKPNDPFXOz8FAQjHh5avT3dok,9
319
- nabu-2024.2.1.dist-info/RECORD,,
312
+ nabu-2024.2.3.dist-info/LICENSE,sha256=1eAIPSnEsnSFNUODnLtNtQTs76exG3ZxJ1DJR6zoUBA,1066
313
+ nabu-2024.2.3.dist-info/METADATA,sha256=xKB92PKUw3o_VoacgV2SVAc0gBW0TuToAfnm-QXtmHU,5538
314
+ nabu-2024.2.3.dist-info/WHEEL,sha256=5sUXSg9e4bi7lTLOHcm6QEYwO5TIF1TNbTSVFVjcJcc,92
315
+ nabu-2024.2.3.dist-info/entry_points.txt,sha256=cJKGkBeykVL7uK3E4R0RLRqMXifTL2qdO573syPAvJc,1288
316
+ nabu-2024.2.3.dist-info/top_level.txt,sha256=fsm_N3eXLRZk2QXF9OSKPNDPFXOz8FAQjHh5avT3dok,9
317
+ nabu-2024.2.3.dist-info/RECORD,,
File without changes
@@ -1,10 +0,0 @@
1
- import pytest
2
- from nabu.utils import list_match_queries
3
-
4
-
5
- def test_list_match_queries():
6
-
7
- # entry0000 .... entry0099
8
- avail = ["entry%04d" % i for i in range(100)]
9
- query = "entry0000"
10
- list_match_queries()