nabu 2024.2.0rc4__py3-none-any.whl → 2024.2.2__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 +1 -1
- nabu/app/cli_configs.py +1 -1
- nabu/pipeline/estimators.py +9 -3
- nabu/pipeline/fullfield/processconfig.py +2 -2
- nabu/pipeline/fullfield/reconstruction.py +1 -1
- nabu/resources/nxflatfield.py +6 -6
- nabu/stitching/config.py +6 -3
- {nabu-2024.2.0rc4.dist-info → nabu-2024.2.2.dist-info}/METADATA +1 -1
- {nabu-2024.2.0rc4.dist-info → nabu-2024.2.2.dist-info}/RECORD +13 -13
- {nabu-2024.2.0rc4.dist-info → nabu-2024.2.2.dist-info}/LICENSE +0 -0
- {nabu-2024.2.0rc4.dist-info → nabu-2024.2.2.dist-info}/WHEEL +0 -0
- {nabu-2024.2.0rc4.dist-info → nabu-2024.2.2.dist-info}/entry_points.txt +0 -0
- {nabu-2024.2.0rc4.dist-info → nabu-2024.2.2.dist-info}/top_level.txt +0 -0
nabu/__init__.py
CHANGED
nabu/app/cli_configs.py
CHANGED
@@ -37,7 +37,7 @@ BootstrapConfig = {
|
|
37
37
|
"default": "",
|
38
38
|
},
|
39
39
|
"template": {
|
40
|
-
"help": "Use a template configuration file. Available are: id19_pag, id16_holo, id16_ctf. You can also define your own templates via the NABU_TEMPLATES_PATH environment variable.",
|
40
|
+
"help": "Use a template configuration file. Available are: id19_pag, id16_holo, id16_ctf, id16a_fluo, bm05_pag. You can also define your own templates via the NABU_TEMPLATES_PATH environment variable.",
|
41
41
|
"default": "",
|
42
42
|
},
|
43
43
|
"helical": {"help": "Prepare configuration file for helical", "default": 0, "required": False, "type": int},
|
nabu/pipeline/estimators.py
CHANGED
@@ -89,11 +89,13 @@ 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,
|
98
|
+
take_log=cor_options.get("take_log", True),
|
97
99
|
logger=logger,
|
98
100
|
**composite_options,
|
99
101
|
)
|
@@ -451,6 +453,7 @@ class CompositeCORFinder(CORFinderBase):
|
|
451
453
|
oversampling=4,
|
452
454
|
theta_interval=5,
|
453
455
|
n_subsampling_y=40,
|
456
|
+
do_flatfield=True,
|
454
457
|
take_log=True,
|
455
458
|
cor_options=None,
|
456
459
|
spike_threshold=0.04,
|
@@ -458,7 +461,7 @@ class CompositeCORFinder(CORFinderBase):
|
|
458
461
|
norm_order=1,
|
459
462
|
):
|
460
463
|
super().__init__(
|
461
|
-
"composite-coarse-to-fine", dataset_info, do_flatfield=
|
464
|
+
"composite-coarse-to-fine", dataset_info, do_flatfield=False, cor_options=cor_options, logger=logger
|
462
465
|
)
|
463
466
|
if norm_order not in [1, 2]:
|
464
467
|
raise ValueError(
|
@@ -535,7 +538,10 @@ class CompositeCORFinder(CORFinderBase):
|
|
535
538
|
|
536
539
|
self.absolute_indices = sorted(self.dataset_info.projections.keys())
|
537
540
|
|
538
|
-
|
541
|
+
if do_flatfield:
|
542
|
+
my_flats = self.dataset_info.flats
|
543
|
+
else:
|
544
|
+
my_flats = None
|
539
545
|
|
540
546
|
if my_flats is not None and len(list(my_flats.keys())):
|
541
547
|
self.use_flat = True
|
@@ -465,7 +465,7 @@ class ProcessConfig(ProcessConfigBase):
|
|
465
465
|
if self.get_radios_rotation_mode() == "chunk":
|
466
466
|
tasks.append("tilt_correction")
|
467
467
|
options["tilt_correction"] = {
|
468
|
-
"angle":
|
468
|
+
"angle": dataset_info.detector_tilt,
|
469
469
|
"center": nabu_config["preproc"]["rotate_projections_center"],
|
470
470
|
"mode": "chunk",
|
471
471
|
}
|
@@ -513,7 +513,7 @@ class ProcessConfig(ProcessConfigBase):
|
|
513
513
|
if self.get_radios_rotation_mode() == "full":
|
514
514
|
tasks.append("tilt_correction")
|
515
515
|
options["tilt_correction"] = {
|
516
|
-
"angle":
|
516
|
+
"angle": dataset_info.detector_tilt,
|
517
517
|
"center": nabu_config["preproc"]["rotate_projections_center"],
|
518
518
|
"mode": "full",
|
519
519
|
}
|
@@ -253,7 +253,7 @@ class FullFieldReconstructor:
|
|
253
253
|
if self.process_config.processing_options.get("phase", {}).get("method", None) == "CTF":
|
254
254
|
force_grouped_mode = True
|
255
255
|
msg = "CTF phase retrieval needs to process full radios"
|
256
|
-
if self.process_config.
|
256
|
+
if (self.process_config.dataset_info.detector_tilt or 0) > 15:
|
257
257
|
force_grouped_mode = True
|
258
258
|
msg = "Radios rotation with a large angle needs to process full radios"
|
259
259
|
if self.process_config.resume_from_step == "sinogram" and force_grouped_mode:
|
nabu/resources/nxflatfield.py
CHANGED
@@ -35,12 +35,10 @@ def get_frame_possible_urls(dataset_info, user_dir, output_dir):
|
|
35
35
|
else:
|
36
36
|
dataurl_default_template = h5scan.REDUCED_DARKS_DATAURLS[0]
|
37
37
|
|
38
|
-
rel_file_path = dataurl_default_template.file_path().format(
|
39
|
-
scan_prefix=dataset_info.dataset_scanner.get_dataset_basename()
|
40
|
-
)
|
38
|
+
rel_file_path = dataurl_default_template.file_path().format(scan_prefix=h5scan.get_dataset_basename())
|
41
39
|
return DataUrl(
|
42
40
|
file_path=os.path.join(dirname, rel_file_path),
|
43
|
-
data_path=dataurl_default_template.data_path(),
|
41
|
+
data_path=dataurl_default_template.data_path().format(entry=h5scan.entry, index="{index}"),
|
44
42
|
data_slice=dataurl_default_template.data_slice(), # not sure if needed
|
45
43
|
scheme="silx",
|
46
44
|
)
|
@@ -144,9 +142,11 @@ def data_url_exists(data_url):
|
|
144
142
|
"""
|
145
143
|
if not (os.path.isfile(data_url.file_path())):
|
146
144
|
return False
|
145
|
+
group_exists = False
|
147
146
|
with HDF5File(data_url.file_path(), "r") as f:
|
148
|
-
|
149
|
-
|
147
|
+
data_path_without_index = data_url.data_path().split("{")[0]
|
148
|
+
group_exists = f.get(data_path_without_index, default=None) is not None
|
149
|
+
return group_exists
|
150
150
|
|
151
151
|
|
152
152
|
# pylint: disable=E1136
|
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
|
1042
|
-
|
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
|
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.
|
3
|
+
Version: 2024.2.2
|
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>
|
@@ -2,7 +2,7 @@ doc/conf.py,sha256=3xtCarCHrXPr50GbeRDuH-o3Jzojw7mpr7vpGfZPLAE,3787
|
|
2
2
|
doc/create_conf_doc.py,sha256=IVOdP70KvbW9WS_UQu3Iyd0YfS60E2fJ5IDtQ_s4cDw,1143
|
3
3
|
doc/doc_config.py,sha256=anqeOVjqE2e7eVzg7yuh9dvIneTkrA5doGl1cVBqT7Q,730
|
4
4
|
doc/get_mathjax.py,sha256=VIvKRCdDuF2VoY8JD3mSey9XX13AZMmwTJBHdt1tUs4,1012
|
5
|
-
nabu/__init__.py,sha256=
|
5
|
+
nabu/__init__.py,sha256=c4AaFlxaEks7K6XWAPy5va8o7QnA79fGW45T36l46to,270
|
6
6
|
nabu/tests.py,sha256=cew9OY2uTyncHI_HM32W8CP6B1GTGKaOW65XtMEqs7o,1417
|
7
7
|
nabu/testutils.py,sha256=VkSL9tbY0XEH49Z5OjDFFhzkSxrCv4UIuvSVFgegSUY,7632
|
8
8
|
nabu/utils.py,sha256=V1B_sD54XGNKn5pORa2yNCATyswOzybey3sv8BuIYWY,26355
|
@@ -10,7 +10,7 @@ nabu/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
nabu/app/bootstrap.py,sha256=3yLZJmrmQBmPJMBtE2ih2cspfqOy5T_UN2U8B3i_hkI,3266
|
11
11
|
nabu/app/bootstrap_stitching.py,sha256=Inr0_zRAtyeMTK1BKxGqoDf-Na0O33CICmQJYja06ug,2148
|
12
12
|
nabu/app/cast_volume.py,sha256=mjINEIFrh2BVC8mPFO0cnzlFUOS3x5aqjFPGKsb3H-c,11264
|
13
|
-
nabu/app/cli_configs.py,sha256=
|
13
|
+
nabu/app/cli_configs.py,sha256=EGKp7DrR48PAahZLJd09XAIAdm7Q5nOVSybztglhW_8,22276
|
14
14
|
nabu/app/compare_volumes.py,sha256=Mu5O4uP-ANo-el-fE5PLvEq42BTk5FkrscaFRyQZdis,3341
|
15
15
|
nabu/app/composite_cor.py,sha256=TjYiAtmY4o9lwNpkIEueTTNli72QN6jtR_zbtCeOJz4,5138
|
16
16
|
nabu/app/correct_rot.py,sha256=K0UQz4l5caFvsSr1-1y5hZvt6e45NAH3qYOhzHm2mGc,2130
|
@@ -131,7 +131,7 @@ nabu/pipeline/config_validators.py,sha256=ocAKB26iRjm5qs1Ay4B_rgGcg8aZjAP34XpEZR
|
|
131
131
|
nabu/pipeline/datadump.py,sha256=lK36YlsVSeE4fdkD7cgVCl4RKn-Wa9KYgOw4DNtH8Ow,6982
|
132
132
|
nabu/pipeline/dataset_validator.py,sha256=etQw9NC_YGsdWCgjsn8aJ3WfvcRuJlLVZlWoqhvvo-8,9263
|
133
133
|
nabu/pipeline/detector_distortion_provider.py,sha256=ru1AxbcuO-FA8FYooPBWgp1lzdSDUtzFUC1A_sS8jME,920
|
134
|
-
nabu/pipeline/estimators.py,sha256=
|
134
|
+
nabu/pipeline/estimators.py,sha256=AF7Nzbj9vPHfW5_ivo3_64D1Ct4RYqeOHx6tb1Phf30,40508
|
135
135
|
nabu/pipeline/params.py,sha256=EoovjCUTUXmj5HQ3qE0RhP7XD3cndaiT21TdvjTIhE8,3746
|
136
136
|
nabu/pipeline/processconfig.py,sha256=3xx2Lc8uEzPAqSMwUncr4RCiCtKn2c7wnXXbPSn8GNo,7719
|
137
137
|
nabu/pipeline/reader.py,sha256=wkxPHYOi_C8dHNc7kddB8AMtFuW7GjsP_tm6SJeHlEY,4792
|
@@ -143,8 +143,8 @@ nabu/pipeline/fullfield/chunked_cuda.py,sha256=Jdkk6ZIt3S6UZYbupHtSj2vrj3krWMcqR
|
|
143
143
|
nabu/pipeline/fullfield/computations.py,sha256=AEp3qvwyY-l8-GzjH1E6kmcmU6OgDp6sB-mltq0Jnxg,9970
|
144
144
|
nabu/pipeline/fullfield/dataset_validator.py,sha256=Iy6oOnXnBldDcg0ifm_zzrzMQ6YdkR_hkHFySZgxbno,2943
|
145
145
|
nabu/pipeline/fullfield/nabu_config.py,sha256=rvHmCNHx2y-GKBidRWCAjJd0IynvolPTTmBqNoOSvEA,31877
|
146
|
-
nabu/pipeline/fullfield/processconfig.py,sha256=
|
147
|
-
nabu/pipeline/fullfield/reconstruction.py,sha256=
|
146
|
+
nabu/pipeline/fullfield/processconfig.py,sha256=2eE9W0KjsHq8aSCXlczsISpWM9SMjWL03fN1RqZWyxg,36815
|
147
|
+
nabu/pipeline/fullfield/reconstruction.py,sha256=fMHKR8LnpQ2_asIO5bJB3pRixABrKLi53KzJuB83NZ4,37422
|
148
148
|
nabu/pipeline/helical/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
149
149
|
nabu/pipeline/helical/dataset_validator.py,sha256=0YQc0hdYdpaXznFaKmlj9SIu7mNs0xXMejcRkhOZHaI,640
|
150
150
|
nabu/pipeline/helical/fbp.py,sha256=0fAz-Fb0Rn_FzellvcS2cy-Wvm-5dxEf494YFt4pLws,5845
|
@@ -254,7 +254,7 @@ nabu/resources/cor.py,sha256=-mcrTbj3G7o4PP5E_gIRo2j6_-ADmMkkOc_0CyQv84c,170
|
|
254
254
|
nabu/resources/dataset_analyzer.py,sha256=e3AqYR9ORW9Q03mGYCiC66nXld-X0LPnx9E8X3zFIGU,18568
|
255
255
|
nabu/resources/gpu.py,sha256=GgpMb5umRQAUsEDEAefb4wSA5qm4JSMhkWmCEpW3X9g,5702
|
256
256
|
nabu/resources/logger.py,sha256=-lOzhN_sU4R3BIfC69aMj2O8S_ocsvXsmwkhWlcxVEc,3758
|
257
|
-
nabu/resources/nxflatfield.py,sha256=
|
257
|
+
nabu/resources/nxflatfield.py,sha256=FhPqiXe6ZKu5eGI6aVfyTgcHhZF9kQUNX0cOxDPD73k,9324
|
258
258
|
nabu/resources/utils.py,sha256=LtOWEYneEzz0mDIpUWM23v9ILJ8FM0YFaVG3fFVc7OU,5725
|
259
259
|
nabu/resources/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
260
260
|
nabu/resources/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -268,7 +268,7 @@ nabu/resources/tests/test_nxflatfield.py,sha256=XRGbYwqJv0NYAVQnAB224TwTZP_W2Bs3
|
|
268
268
|
nabu/resources/tests/test_units.py,sha256=F2jFTck-1UwYET1MwTtX6ntzYUosfwOJkugSencGgz8,2155
|
269
269
|
nabu/stitching/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
270
270
|
nabu/stitching/alignment.py,sha256=2ehpuWDz38AFAoJk3yA0DXf-18Kb329YaCCBBpa7Txc,9078
|
271
|
-
nabu/stitching/config.py,sha256=
|
271
|
+
nabu/stitching/config.py,sha256=CP5g3f4sXpUBLAlG7LRg-90Ebon-janurbuORgYGi1c,52783
|
272
272
|
nabu/stitching/definitions.py,sha256=JbmYwXKxOTYCr2LDXbHO-uNE2OLOBm4ir9AQ7e-Q3lY,158
|
273
273
|
nabu/stitching/frame_composition.py,sha256=7HebOFzSBirJT-MG10T7dzR8Gu0YVwfJb27LDk8lln4,6687
|
274
274
|
nabu/stitching/overlap.py,sha256=JkLM8gNyacEY7BE9vyF8M28Rer97-ExK8ZEvOKeFbPw,17200
|
@@ -311,9 +311,9 @@ nabu/thirdparty/pore3d_deringer_munch.py,sha256=o4bisnFc-wMjuohWBT8wgWmfNehPQGtC
|
|
311
311
|
nabu/thirdparty/tomocupy_remove_stripe.py,sha256=Khe4zFf0kRzu65Yxnvq58gt1ljOztqJGdMDhVAiM7lM,24363
|
312
312
|
nabu/thirdparty/tomopy_phase.py,sha256=hK4oPpkogLOhv23XzzEXQY2u3r8fJvASY_bINVs6ERE,8634
|
313
313
|
nabu/thirdparty/tomwer_load_flats_darks.py,sha256=ZNoVAinUb_wGYbfvs_4BVnWsjsQmNxSvCh1bWhR2WWg,5611
|
314
|
-
nabu-2024.2.
|
315
|
-
nabu-2024.2.
|
316
|
-
nabu-2024.2.
|
317
|
-
nabu-2024.2.
|
318
|
-
nabu-2024.2.
|
319
|
-
nabu-2024.2.
|
314
|
+
nabu-2024.2.2.dist-info/LICENSE,sha256=1eAIPSnEsnSFNUODnLtNtQTs76exG3ZxJ1DJR6zoUBA,1066
|
315
|
+
nabu-2024.2.2.dist-info/METADATA,sha256=D8BRBoDIZHm9VsFDcx6ADFq_mxv7n7BtdkbdpU3m2u0,5538
|
316
|
+
nabu-2024.2.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
317
|
+
nabu-2024.2.2.dist-info/entry_points.txt,sha256=cJKGkBeykVL7uK3E4R0RLRqMXifTL2qdO573syPAvJc,1288
|
318
|
+
nabu-2024.2.2.dist-info/top_level.txt,sha256=fsm_N3eXLRZk2QXF9OSKPNDPFXOz8FAQjHh5avT3dok,9
|
319
|
+
nabu-2024.2.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|