tomwer 1.2.0a2__py3-none-any.whl → 1.2.0a3__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.
- orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py +0 -6
- orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py +6 -2
- tomwer/app/canvas_launcher/mainwindow.py +0 -3
- tomwer/core/process/reconstruction/nabu/nabucommon.py +57 -12
- tomwer/core/process/reconstruction/nabu/nabuscores.py +3 -2
- tomwer/core/process/reconstruction/nabu/nabuslices.py +7 -9
- tomwer/core/process/reconstruction/nabu/nabuvolume.py +10 -9
- tomwer/core/process/reconstruction/nabu/utils.py +10 -36
- tomwer/core/process/test/test_nabu.py +5 -5
- tomwer/gui/visualization/reconstructionparameters.py +9 -1
- tomwer/gui/visualization/volumeviewer.py +2 -0
- tomwer/version.py +1 -1
- {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a3.dist-info}/METADATA +1 -1
- {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a3.dist-info}/RECORD +20 -20
- /tomwer-1.2.0a2-py3.11-nspkg.pth → /tomwer-1.2.0a3-py3.11-nspkg.pth +0 -0
- {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a3.dist-info}/LICENSE +0 -0
- {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a3.dist-info}/WHEEL +0 -0
- {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a3.dist-info}/entry_points.txt +0 -0
- {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a3.dist-info}/namespace_packages.txt +0 -0
- {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a3.dist-info}/top_level.txt +0 -0
@@ -139,9 +139,6 @@ class SingleTomoObjOW(OWBaseWidget, openclass=True):
|
|
139
139
|
if isinstance(data, TomwerScanBase):
|
140
140
|
if data.reduced_darks not in (None, {}):
|
141
141
|
reduced_darks = data.reduced_darks
|
142
|
-
reduced_darks[
|
143
|
-
"reduce_frames_name"
|
144
|
-
] = f"darks from {data.get_identifier().short_description()}"
|
145
142
|
self.Outputs.reduced_darks.send(reduced_darks)
|
146
143
|
|
147
144
|
# we want to send those in relative position to have something generic. This is a convention for now
|
@@ -157,9 +154,6 @@ class SingleTomoObjOW(OWBaseWidget, openclass=True):
|
|
157
154
|
|
158
155
|
if data.reduced_flats not in (None, {}):
|
159
156
|
reduced_flats = data.reduced_flats
|
160
|
-
reduced_flats[
|
161
|
-
"reduce_frames_name"
|
162
|
-
] = f"flats from {data.get_identifier().short_description()}"
|
163
157
|
self.Outputs.reduced_flats.send(reduced_flats)
|
164
158
|
|
165
159
|
# we want to send those in relative position to have something generic. This is a convention for now
|
@@ -246,16 +246,20 @@ class DarkRefAndCopyOW(SuperviseOW, WidgetLongProcessing):
|
|
246
246
|
self.sigScanReady.emit(scan)
|
247
247
|
if scan.reduced_darks not in (None, {}):
|
248
248
|
# we want to send those in relative position to have something generic. This is a convention for now
|
249
|
+
reduced_darks = scan.reduced_darks
|
250
|
+
reduced_darks.pop("reduce_frames_name", None)
|
249
251
|
self.Outputs.reduced_darks.send(
|
250
252
|
tomoscan.esrf.scan.utils.from_absolute_reduced_frames_to_relative(
|
251
|
-
reduced_frames=
|
253
|
+
reduced_frames=reduced_darks, scan=scan
|
252
254
|
)
|
253
255
|
)
|
254
256
|
if scan.reduced_flats not in (None, {}):
|
255
257
|
# we want to send those in relative position to have something generic. This is a convention for now
|
258
|
+
reduced_flats = scan.reduced_flats
|
259
|
+
reduced_flats.pop("reduce_frames_name", None)
|
256
260
|
self.Outputs.reduced_flats.send(
|
257
261
|
tomoscan.esrf.scan.utils.from_absolute_reduced_frames_to_relative(
|
258
|
-
reduced_frames=
|
262
|
+
reduced_frames=reduced_flats, scan=scan
|
259
263
|
)
|
260
264
|
)
|
261
265
|
_logger.info(f"{scan} ended")
|
@@ -61,9 +61,7 @@ class MainWindow(_MainWindow):
|
|
61
61
|
HELPDESK_URL = "https://requests.esrf.fr/plugins/servlet/desk/portal/41"
|
62
62
|
|
63
63
|
def __init__(self, *args, **kwargs):
|
64
|
-
print("create window")
|
65
64
|
super().__init__(*args, **kwargs)
|
66
|
-
print("end super")
|
67
65
|
self.process_supervisor_dock = DockWidget(
|
68
66
|
self.tr("object supervisor"),
|
69
67
|
self,
|
@@ -71,7 +69,6 @@ class MainWindow(_MainWindow):
|
|
71
69
|
allowedAreas=qt.Qt.BottomDockWidgetArea,
|
72
70
|
visible=self.show_processes_manager_action.isChecked(),
|
73
71
|
)
|
74
|
-
print("continue")
|
75
72
|
|
76
73
|
self.process_supervisor_dock.setWidget(ProcessManagerWindow(parent=None))
|
77
74
|
self.process_supervisor_dock.visibilityChanged[bool].connect(
|
@@ -327,6 +327,18 @@ class _NabuBaseReconstructor:
|
|
327
327
|
else:
|
328
328
|
raise ValueError(f"{self.target} is not recognized as a valid target")
|
329
329
|
|
330
|
+
@staticmethod
|
331
|
+
def _get_gpu_and_cpu_mem_fraction(config_to_dump: dict):
|
332
|
+
gpu_mem_fraction = config_to_dump.get("resources", {}).get(
|
333
|
+
"gpu_mem_fraction", config_to_dump.get("gpu_mem_fraction", 0.9)
|
334
|
+
)
|
335
|
+
assert gpu_mem_fraction <= 1
|
336
|
+
cpu_mem_fraction = config_to_dump.get("resources", {}).get(
|
337
|
+
"cpu_mem_fraction", config_to_dump.get("cpu_mem_fraction", 0.9)
|
338
|
+
)
|
339
|
+
assert cpu_mem_fraction <= 1
|
340
|
+
return gpu_mem_fraction, cpu_mem_fraction
|
341
|
+
|
330
342
|
def _run_nabu_locally(
|
331
343
|
self,
|
332
344
|
conf_file: str,
|
@@ -346,8 +358,22 @@ class _NabuBaseReconstructor:
|
|
346
358
|
"""
|
347
359
|
if not has_nabu:
|
348
360
|
raise ImportError("Fail to import nabu")
|
361
|
+
assert isinstance(config_to_dump, dict)
|
362
|
+
gpu_mem_fraction, cpu_mem_fraction = self._get_gpu_and_cpu_mem_fraction(
|
363
|
+
config_to_dump
|
364
|
+
)
|
365
|
+
|
349
366
|
command = " ".join(
|
350
|
-
(
|
367
|
+
(
|
368
|
+
"python3",
|
369
|
+
"-m",
|
370
|
+
settings.NABU_FULL_FIELD_APP_PATH,
|
371
|
+
conf_file,
|
372
|
+
"--gpu_mem_fraction",
|
373
|
+
str(gpu_mem_fraction),
|
374
|
+
"--cpu_mem_fraction",
|
375
|
+
str(cpu_mem_fraction),
|
376
|
+
)
|
351
377
|
)
|
352
378
|
_logger.info(f'call nabu from "{command}"')
|
353
379
|
|
@@ -422,13 +448,21 @@ class _NabuBaseReconstructor:
|
|
422
448
|
project_name = project_name.replace(" ", "_")
|
423
449
|
cluster_config["job_name"] = project_name
|
424
450
|
|
451
|
+
# extract gpu_mem_fraction and cpu_mem_fraction
|
452
|
+
assert isinstance(config_to_dump, dict)
|
453
|
+
gpu_mem_fraction, cpu_mem_fraction = self._get_gpu_and_cpu_mem_fraction(
|
454
|
+
config_to_dump
|
455
|
+
)
|
456
|
+
|
425
457
|
# submit job
|
426
458
|
script_name = get_slurm_script_name(prefix="nabu")
|
427
459
|
# for now force job name
|
428
460
|
cluster_config["job_name"] = f"tomwer-nabu {conf_file}"
|
429
461
|
job = SBatchScriptJob(
|
430
462
|
slurm_config=cluster_config,
|
431
|
-
script=(
|
463
|
+
script=(
|
464
|
+
f"python3 -m {settings.NABU_FULL_FIELD_APP_PATH} {conf_file} --gpu_mem_fraction {gpu_mem_fraction} --cpu_mem_fraction {cpu_mem_fraction}",
|
465
|
+
),
|
432
466
|
script_path=os.path.join(self.scan.path, "slurm_scripts", script_name),
|
433
467
|
clean_script=False,
|
434
468
|
working_directory=self.scan.working_directory,
|
@@ -455,10 +489,12 @@ class _NabuBaseReconstructor:
|
|
455
489
|
"""Return a tuple a potential callback to be launch once the future is done"""
|
456
490
|
return tuple()
|
457
491
|
|
458
|
-
def _treateOutputSliceConfig(self, config):
|
492
|
+
def _treateOutputSliceConfig(self, config) -> tuple:
|
459
493
|
"""
|
460
494
|
- add or overwrite some parameters of the dictionary
|
461
495
|
- create the output directory if does not exist
|
496
|
+
|
497
|
+
:return: (config: dict, nabu_cfg_folder: str)
|
462
498
|
"""
|
463
499
|
# handle phase
|
464
500
|
pag = False
|
@@ -492,16 +528,26 @@ class _NabuBaseReconstructor:
|
|
492
528
|
location = config["output"].get("location", None)
|
493
529
|
if location not in ("", None):
|
494
530
|
location = format_output_location(location, scan=self.scan)
|
495
|
-
|
496
|
-
if not os.path.isdir(config["output"]["location"]):
|
497
|
-
os.makedirs(location)
|
531
|
+
location_cfg_files = location
|
498
532
|
else:
|
499
533
|
# otherwise default location will be the data root level
|
500
534
|
location = self.scan.path
|
535
|
+
location_cfg_files = location
|
536
|
+
# TODO: if is a single file - append prefix
|
537
|
+
if config["output"].get("file_format") in (
|
538
|
+
NabuOutputFileFormat.EDF.value,
|
539
|
+
NabuOutputFileFormat.TIFF.value,
|
540
|
+
NabuOutputFileFormat.JP2K.value,
|
541
|
+
): # if user specify the location
|
542
|
+
location = "/".join([location, _file_name])
|
543
|
+
|
501
544
|
# add reconstruction path to the list. scan `reconstruction_paths` register all the existing path where
|
502
545
|
# reconstruction are saved in order to be able to browse them all
|
503
546
|
self.scan.add_reconstruction_path(location)
|
504
547
|
config["output"]["location"] = location
|
548
|
+
else:
|
549
|
+
# don't think this could ever happen
|
550
|
+
location_cfg_files = self.scan.path
|
505
551
|
# handle preproc
|
506
552
|
if "preproc" not in config:
|
507
553
|
config["preproc"] = {}
|
@@ -514,14 +560,14 @@ class _NabuBaseReconstructor:
|
|
514
560
|
|
515
561
|
extra_infos = self.scan.intensity_normalization.get_extra_infos()
|
516
562
|
|
517
|
-
|
518
|
-
|
563
|
+
nabu_cfg_folder = os.path.join(
|
564
|
+
location_cfg_files, settings.NABU_CFG_FILE_FOLDER
|
519
565
|
)
|
520
|
-
os.makedirs(
|
566
|
+
os.makedirs(nabu_cfg_folder, exist_ok=True)
|
521
567
|
|
522
568
|
# configuration file and nabu_tomwer_serving_hatch must be in the same folder
|
523
569
|
serving_hatch_file = os.path.join(
|
524
|
-
|
570
|
+
nabu_cfg_folder, settings.NABU_TOMWER_SERVING_HATCH
|
525
571
|
)
|
526
572
|
|
527
573
|
source = extra_infos.get("source", INormSource.NONE)
|
@@ -576,8 +622,7 @@ class _NabuBaseReconstructor:
|
|
576
622
|
)
|
577
623
|
else:
|
578
624
|
raise NotImplementedError(f"source type {source.value} is not handled")
|
579
|
-
|
580
|
-
return config
|
625
|
+
return config, nabu_cfg_folder
|
581
626
|
|
582
627
|
def _get_file_basename_reconstruction(self, pag, db, ctf):
|
583
628
|
"""return created file base name"""
|
@@ -223,6 +223,8 @@ class _Reconstructor(_NabuBaseReconstructor):
|
|
223
223
|
if self._cancelled:
|
224
224
|
break
|
225
225
|
config, conf_file = self.preprocess_config(deepcopy(config), var_value)
|
226
|
+
print("conf file is", conf_file)
|
227
|
+
print("confif output is", config.get("output"))
|
226
228
|
|
227
229
|
# add some tomwer metadata and save the configuration
|
228
230
|
# note: for now the section is ignored by nabu but shouldn't stay that way
|
@@ -336,8 +338,7 @@ class _Reconstructor(_NabuBaseReconstructor):
|
|
336
338
|
config["output"]["location"],
|
337
339
|
nabu_settings.NABU_CFG_FILE_FOLDER,
|
338
340
|
)
|
339
|
-
|
340
|
-
os.makedirs(cfg_folder)
|
341
|
+
os.makedirs(cfg_folder, exist_ok=True)
|
341
342
|
|
342
343
|
conf_file = os.path.join(
|
343
344
|
cfg_folder, file_prefix + nabu_settings.NABU_CONFIG_FILE_EXTENSION
|
@@ -716,17 +716,15 @@ class SingleSliceRunner(_NabuBaseReconstructor):
|
|
716
716
|
"steps_file": steps_file,
|
717
717
|
}
|
718
718
|
|
719
|
-
config = self._treateOutputSliceConfig(config)
|
719
|
+
config, cfg_folder = self._treateOutputSliceConfig(config)
|
720
720
|
# the policy is to save nabu .cfg file at the same location as the
|
721
721
|
# force overwrite results
|
722
722
|
if self.slice_index is not None:
|
723
723
|
config["reconstruction"]["start_z"] = self.slice_index
|
724
724
|
config["reconstruction"]["end_z"] = self.slice_index
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
if not os.path.exists(cfg_folder):
|
729
|
-
os.makedirs(cfg_folder)
|
725
|
+
|
726
|
+
if self.slice_index is not None:
|
727
|
+
os.makedirs(config["output"]["location"], exist_ok=True)
|
730
728
|
|
731
729
|
name = (
|
732
730
|
config["output"]["file_prefix"] + nabu_settings.NABU_CONFIG_FILE_EXTENSION
|
@@ -828,7 +826,7 @@ class SingleSliceRunner(_NabuBaseReconstructor):
|
|
828
826
|
return "_".join(
|
829
827
|
(
|
830
828
|
basename + "slice_pag",
|
831
|
-
str(slice_index).zfill(
|
829
|
+
str(slice_index).zfill(6),
|
832
830
|
"db" + str(db).zfill(4),
|
833
831
|
)
|
834
832
|
)
|
@@ -836,12 +834,12 @@ class SingleSliceRunner(_NabuBaseReconstructor):
|
|
836
834
|
return "_".join(
|
837
835
|
(
|
838
836
|
basename + "slice_ctf",
|
839
|
-
str(slice_index).zfill(
|
837
|
+
str(slice_index).zfill(6),
|
840
838
|
"db" + str(db).zfill(4),
|
841
839
|
)
|
842
840
|
)
|
843
841
|
else:
|
844
|
-
return "_".join((basename + "slice", str(slice_index).zfill(
|
842
|
+
return "_".join((basename + "slice", str(slice_index).zfill(6)))
|
845
843
|
|
846
844
|
@docstring(_NabuBaseReconstructor)
|
847
845
|
def _get_file_basename_reconstruction(self, pag, db, ctf):
|
@@ -224,7 +224,9 @@ class VolumeRunner(_NabuBaseReconstructor):
|
|
224
224
|
# force overwrite results
|
225
225
|
if "output" not in self.configuration:
|
226
226
|
self.configuration["output"] = {}
|
227
|
-
config_slices = self._treateOutputConfig(self.configuration)
|
227
|
+
config_slices, cfg_folder = self._treateOutputConfig(self.configuration)
|
228
|
+
|
229
|
+
# force overwriting results
|
228
230
|
config_slices["output"].update({"overwrite_results": 1})
|
229
231
|
|
230
232
|
# check and clamp `start_z` and `end_z`
|
@@ -242,12 +244,6 @@ class VolumeRunner(_NabuBaseReconstructor):
|
|
242
244
|
value = -1
|
243
245
|
config_slices["reconstruction"][key] = value
|
244
246
|
|
245
|
-
cfg_folder = os.path.join(
|
246
|
-
config_slices["output"]["location"], settings.NABU_CFG_FILE_FOLDER
|
247
|
-
)
|
248
|
-
if not os.path.exists(cfg_folder):
|
249
|
-
os.makedirs(cfg_folder)
|
250
|
-
|
251
247
|
name = (
|
252
248
|
config_slices["output"]["file_prefix"] + settings.NABU_CONFIG_FILE_EXTENSION
|
253
249
|
)
|
@@ -256,6 +252,9 @@ class VolumeRunner(_NabuBaseReconstructor):
|
|
256
252
|
conf_file = os.path.join(cfg_folder, name)
|
257
253
|
_logger.info(f"{self.scan}: create {conf_file}")
|
258
254
|
|
255
|
+
# make sure output location exists
|
256
|
+
os.makedirs(config_slices["output"]["location"], exist_ok=True)
|
257
|
+
|
259
258
|
# add some tomwer metadata and save the configuration
|
260
259
|
# note: for now the section is ignored by nabu but shouldn't stay that way
|
261
260
|
with utils.TomwerInfo(config_slices) as config_to_dump:
|
@@ -317,7 +316,9 @@ class VolumeRunner(_NabuBaseReconstructor):
|
|
317
316
|
:return: (nabu config dict, nabu extra options)
|
318
317
|
"""
|
319
318
|
config = copy.deepcopy(config)
|
320
|
-
config = super()._treateOutputSliceConfig(config)
|
319
|
+
config, nabu_cfg_folder = super()._treateOutputSliceConfig(config)
|
320
|
+
os.makedirs(config["output"]["location"], exist_ok=True)
|
321
|
+
|
321
322
|
# adapt config_s to specific volume treatment
|
322
323
|
if "postproc" in config:
|
323
324
|
config["postproc"] = config["postproc"]
|
@@ -329,7 +330,7 @@ class VolumeRunner(_NabuBaseReconstructor):
|
|
329
330
|
config["reconstruction"]["end_z"] = config["end_z"]
|
330
331
|
del config["end_z"]
|
331
332
|
|
332
|
-
return config
|
333
|
+
return config, nabu_cfg_folder
|
333
334
|
|
334
335
|
@docstring(_NabuBaseReconstructor)
|
335
336
|
def _get_file_basename_reconstruction(self, pag, db, ctf):
|
@@ -159,7 +159,7 @@ def get_recons_volume_identifier(
|
|
159
159
|
if file_format in ("hdf5", "h5", "hdf"):
|
160
160
|
if slice_index is not None:
|
161
161
|
# case of a single hdf5 file
|
162
|
-
file_name = "_".join((file_prefix, str(slice_index).zfill(
|
162
|
+
file_name = "_".join((file_prefix, str(slice_index).zfill(6)))
|
163
163
|
else:
|
164
164
|
file_name = file_prefix
|
165
165
|
file_name = ".".join((file_name, file_format))
|
@@ -179,23 +179,13 @@ def get_recons_volume_identifier(
|
|
179
179
|
elif file_format in ("vol", "raw"):
|
180
180
|
if slice_index is not None:
|
181
181
|
# case of a single hdf5 file
|
182
|
-
file_name = "_".join((file_prefix, str(slice_index).zfill(
|
182
|
+
file_name = "_".join((file_prefix, str(slice_index).zfill(6)))
|
183
183
|
else:
|
184
184
|
file_name = file_prefix
|
185
|
-
# on 2022.3.x the location seems invalid for nabu. Add this second location to
|
186
|
-
# handle most of the case.
|
187
|
-
fix_nabu = os.path.join(file_prefix, file_name)
|
188
|
-
|
189
185
|
file_name = ".".join((file_name, file_format))
|
190
186
|
file_path = os.path.join(location, file_name)
|
191
187
|
|
192
|
-
|
193
|
-
file_path_fix_nabu = os.path.join(location, file_name_fix_nabu)
|
194
|
-
|
195
|
-
volumes = (
|
196
|
-
RawVolume(file_path=file_path_fix_nabu),
|
197
|
-
RawVolume(file_path=file_path),
|
198
|
-
)
|
188
|
+
volumes = (RawVolume(file_path=file_path),)
|
199
189
|
elif file_format in ("jp2", "jp2k", "edf", "tiff"):
|
200
190
|
if file_format in ("jp2k", "jp2"):
|
201
191
|
constructor = JP2KVolume
|
@@ -205,31 +195,15 @@ def get_recons_volume_identifier(
|
|
205
195
|
constructor = TIFFVolume
|
206
196
|
else:
|
207
197
|
raise NotImplementedError
|
208
|
-
output_extension = file_format
|
209
198
|
basename = file_prefix
|
199
|
+
file_path = location
|
200
|
+
volumes = (
|
201
|
+
constructor(
|
202
|
+
folder=location,
|
203
|
+
volume_basename=basename,
|
204
|
+
),
|
205
|
+
)
|
210
206
|
|
211
|
-
if slice_index is None and start_z is None and end_z is None:
|
212
|
-
# if this is a single slice
|
213
|
-
file_path = ".".join(
|
214
|
-
(
|
215
|
-
os.path.join(location, file_prefix, file_prefix),
|
216
|
-
output_extension,
|
217
|
-
)
|
218
|
-
)
|
219
|
-
# TODO: in the future we might want to provide data_slice according to z values
|
220
|
-
volumes = (
|
221
|
-
constructor(
|
222
|
-
folder=os.path.join(location, file_prefix),
|
223
|
-
volume_basename=basename,
|
224
|
-
),
|
225
|
-
)
|
226
|
-
else:
|
227
|
-
volumes = (
|
228
|
-
constructor(
|
229
|
-
folder=os.path.join(location, file_prefix),
|
230
|
-
volume_basename=basename,
|
231
|
-
),
|
232
|
-
)
|
233
207
|
# case of the multitiff. Not handled by tomwer
|
234
208
|
# elif file_format == "tiff":
|
235
209
|
# # for single frame tiff nabu uses another convention by saving it 'directly'.
|
@@ -127,7 +127,7 @@ class TestNabuIni(unittest.TestCase):
|
|
127
127
|
# check volume and slice .cfg files for nabu reconstruction are here
|
128
128
|
for file_name in (
|
129
129
|
os.path.basename(self.scan.path) + ".cfg",
|
130
|
-
os.path.basename(self.scan.path) + "
|
130
|
+
os.path.basename(self.scan.path) + "slice_000001" + ".cfg",
|
131
131
|
):
|
132
132
|
with self.subTest(file_name=file_name):
|
133
133
|
self.assertTrue(
|
@@ -151,7 +151,7 @@ class TestNabuIni(unittest.TestCase):
|
|
151
151
|
# check volume and slice .cfg files for nabu reconstruction are here
|
152
152
|
for file_name in (
|
153
153
|
os.path.basename(self.scan.path) + "pag_db0100.cfg",
|
154
|
-
os.path.basename(self.scan.path) + "
|
154
|
+
os.path.basename(self.scan.path) + "slice_pag_000001_db0100" + ".cfg",
|
155
155
|
):
|
156
156
|
with self.subTest(file_name=file_name):
|
157
157
|
self.assertTrue(
|
@@ -178,7 +178,7 @@ class TestNabuIni(unittest.TestCase):
|
|
178
178
|
ini_files.append(
|
179
179
|
os.path.basename(self.scan.path)
|
180
180
|
+ "slice_"
|
181
|
-
+ str(slice_index).zfill(
|
181
|
+
+ str(slice_index).zfill(6)
|
182
182
|
+ ".cfg"
|
183
183
|
)
|
184
184
|
|
@@ -222,7 +222,7 @@ class TestNabuIni(unittest.TestCase):
|
|
222
222
|
# add slice ini file
|
223
223
|
ini_files.append(
|
224
224
|
os.path.basename(self.scan.path)
|
225
|
-
+ "
|
225
|
+
+ "slice_pag_000001_db"
|
226
226
|
+ str(int(pag_db)).zfill(4)
|
227
227
|
+ ".cfg"
|
228
228
|
)
|
@@ -265,7 +265,7 @@ class TestNabuIni(unittest.TestCase):
|
|
265
265
|
ini_files.append(
|
266
266
|
os.path.basename(self.scan.path)
|
267
267
|
+ "slice_pag_"
|
268
|
-
+ str(slice_index).zfill(
|
268
|
+
+ str(slice_index).zfill(6)
|
269
269
|
+ "_db"
|
270
270
|
+ str(pag_db).zfill(4)
|
271
271
|
+ ".cfg"
|
@@ -160,15 +160,23 @@ class ReconstructionParameters(qt.QWidget):
|
|
160
160
|
# voxel size can be stored as pixel size (old version) or voxel size (new version)
|
161
161
|
recons_params = metadata.get("processing_options", {}).get("reconstruction", {})
|
162
162
|
voxel_size_cm = recons_params.get("voxel_size_cm", None)
|
163
|
+
|
163
164
|
# now voxel size is expected to be a tuple of three elements
|
164
165
|
if voxel_size_cm is not None:
|
165
166
|
voxel_size_cm = voxel_size_cm[0]
|
167
|
+
# FIXME: load_ini seems to fail to remove some char like '(' or ')'... to be fixed or investigate
|
168
|
+
# simplest might be to filter those when dumping it to text file... ??? or to handle those at silx level
|
169
|
+
if isinstance(voxel_size_cm, str):
|
170
|
+
for char_to_ignore in (" ", "(", ")", "[", "]"):
|
171
|
+
voxel_size_cm = voxel_size_cm.replace(char_to_ignore, "")
|
166
172
|
else:
|
167
173
|
# backward compatibility with old volume
|
168
174
|
voxel_size_cm = recons_params.get("pixel_size_cm", None)
|
169
175
|
if voxel_size_cm is not None:
|
170
176
|
voxel_size_cm = f"{float(voxel_size_cm):.8}"
|
171
|
-
self._pixelSizeQLE.setText(
|
177
|
+
self._pixelSizeQLE.setText(
|
178
|
+
str(voxel_size_cm) if voxel_size_cm is not None else ""
|
179
|
+
)
|
172
180
|
|
173
181
|
def _setCor(self, metadata: dict):
|
174
182
|
cor = (
|
@@ -357,6 +357,8 @@ class VolumeViewer(qt.QMainWindow):
|
|
357
357
|
self._set_volume(data)
|
358
358
|
# set reconstruction parameters
|
359
359
|
try:
|
360
|
+
# warning: limitation expected for .vol as it gets two configuration file. The default one is vol.info and does not contains
|
361
|
+
# any of the metadata 'distance', 'pixel size'... but it is here for backward compatiblity
|
360
362
|
self._reconsWidget.setVolumeMetadata(
|
361
363
|
volume.metadata or volume.load_metadata()
|
362
364
|
)
|
tomwer/version.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
tomwer-1.2.
|
1
|
+
tomwer-1.2.0a3-py3.11-nspkg.pth,sha256=xeeGR3TjdoVxdFeF6T-zSwZWh6Et--EYuPWu67LxL_c,574
|
2
2
|
orangecontrib/tomwer/__init__.py,sha256=B4DXy1gY_wXmNYa2aOfapmJb2mEuCAjoaNEGnpBs70g,148
|
3
3
|
orangecontrib/tomwer/state_summary.py,sha256=5_dPzweL3r0ye4ZfJo6IV2ThJI8fQhWoO2ySdJJajj8,1711
|
4
4
|
orangecontrib/tomwer/orange/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -42,7 +42,7 @@ orangecontrib/tomwer/widgets/control/NXTomomillOW.py,sha256=M41e4w2dn4U4690EpsT5
|
|
42
42
|
orangecontrib/tomwer/widgets/control/NXtomoConcatenate.py,sha256=9jf0Qs8jb73hPeLukmulpGRLRRm3rcdHIeks82EwaKA,5998
|
43
43
|
orangecontrib/tomwer/widgets/control/NotifierOW.py,sha256=k_SOG-L7EVwKtAb22aSpkpcdeHFDLFRixEcapQh9NxE,4207
|
44
44
|
orangecontrib/tomwer/widgets/control/ReduceDarkFlatSelectorOW.py,sha256=llc0e2Y8nMtXDQ56WXZoIdvjRwqcwU64yPVRnuyIOxY,2836
|
45
|
-
orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py,sha256=
|
45
|
+
orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py,sha256=tQibP4N46T9OUNsm5BsTJQd3v3uZ6d0WMnDJFRHT8yA,6786
|
46
46
|
orangecontrib/tomwer/widgets/control/TimerOW.py,sha256=H-MWEgXXjmSa_9ExPEJr3OhRCHuT8rAAZcb0JWfoB-o,4395
|
47
47
|
orangecontrib/tomwer/widgets/control/TomoObjSerieOW.py,sha256=pVU6M8CUdmO6T8Ib3EnLi1RcsQeXivc_wBbMOP9M2tY,3203
|
48
48
|
orangecontrib/tomwer/widgets/control/VolumeSelector.py,sha256=nnqGw8oYaUnTglTrHoCorvqJ_sT_DmK2knazsEVY51k,5081
|
@@ -138,7 +138,7 @@ orangecontrib/tomwer/widgets/other/icons/hub.png,sha256=wnKSaxw2WnBkSQjI86aLZfdm
|
|
138
138
|
orangecontrib/tomwer/widgets/other/icons/hub.svg,sha256=9EYoBKY-P-cO17nM48OPA9VDZSCbyGtrMRc80BGHflk,3735
|
139
139
|
orangecontrib/tomwer/widgets/reconstruction/AxisOW.py,sha256=jZtGIbbbTIaAyLfJWijBrEQkBvo7whOXxWcBqtjxoVM,22218
|
140
140
|
orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py,sha256=bGKijEHkZu9x14nwjuMnUInVA0zzhVg-p6PltgTDf-w,9047
|
141
|
-
orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py,sha256=
|
141
|
+
orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py,sha256=DyjkZ3RDgUvEkK3yR8qCWQq9eaVus8I-64nvhrHN1ZQ,10988
|
142
142
|
orangecontrib/tomwer/widgets/reconstruction/NabuHelicalPrepareWeightsDoubleOW.py,sha256=6IARMuo_V4nHECu18955_aCFLfAMuku9a2OK_kuGD-k,5408
|
143
143
|
orangecontrib/tomwer/widgets/reconstruction/NabuOW.py,sha256=D_0DjYYLKi-Avry_PUM_0A7UayZSw0CKKhwFvKD76O8,11865
|
144
144
|
orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py,sha256=Updr8SolE-5_5MYtbNE7u3x_0XBm7pVFQSG0Iwyis_w,17925
|
@@ -211,7 +211,7 @@ orangecontrib/tomwer/widgets/visualization/icons/volumeviewer.svg,sha256=2uT9_px
|
|
211
211
|
tomwer/__init__.py,sha256=82Jp1abyG4UWdGuT4nNU7LxaUV6xxkOte5pIz3w69Do,1745
|
212
212
|
tomwer/__main__.py,sha256=jkdSlsmo3fEdkyV5yDRi1IyvQbyAWlXNm5B_G97Dr58,10290
|
213
213
|
tomwer/utils.py,sha256=EgVwJ5CQVjoBvcKNwyVoXv_P4ciI11oxb8fNyy82Lck,8465
|
214
|
-
tomwer/version.py,sha256=
|
214
|
+
tomwer/version.py,sha256=UneMlxRdRLcRuKEPaydJoBMLnGC86EGMy5mnfacaYUw,4386
|
215
215
|
tomwer/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
216
216
|
tomwer/app/axis.py,sha256=UQNxYpHzxnGdNpkV6sJoO_0tPGCxJkylghwbA7ENsM0,5948
|
217
217
|
tomwer/app/canvas.py,sha256=Px0oWLny53xe-2OXnepfRH5ZIcuO_e7wSYmE0femhjg,1379
|
@@ -239,7 +239,7 @@ tomwer/app/zstitching.py,sha256=8zJ0scR8bRgYquNODRU0AMQLEPVjhmikbAWmRthC188,9446
|
|
239
239
|
tomwer/app/canvas_launcher/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
240
240
|
tomwer/app/canvas_launcher/config.py,sha256=D4qyh_3ynl7o1P2f8mhAefhNnraaLpVi1v4vDYaA2Yo,7249
|
241
241
|
tomwer/app/canvas_launcher/environ.py,sha256=tHIlYXcFWinNLTV7dL2iBOWCp9oe9iouibU9NlzFbCk,2500
|
242
|
-
tomwer/app/canvas_launcher/mainwindow.py,sha256=
|
242
|
+
tomwer/app/canvas_launcher/mainwindow.py,sha256=r_zw7tZ1rMOZczBOTn7lgnyqPFqEUckdgePIqgCSm_c,18184
|
243
243
|
tomwer/app/canvas_launcher/splash.py,sha256=2z3q5QwoQ_ad-a2UI0R8hR3252MWG7DggXPOgDZfgBA,560
|
244
244
|
tomwer/app/canvas_launcher/widgetsscheme.py,sha256=S4x1LO798fOxL3-g2WDuAh0T2Y_Kbg79DbH3siwKPiM,2859
|
245
245
|
tomwer/core/__init__.py,sha256=lLfviCLw9VdT6SQ_9eYhqFe8QtUA-Dv-JDGpgxQ8Yzs,1373
|
@@ -310,13 +310,13 @@ tomwer/core/process/reconstruction/lamino/tofu.py,sha256=53_n2xcHiF3InqUf0ZnnyIn
|
|
310
310
|
tomwer/core/process/reconstruction/nabu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
311
311
|
tomwer/core/process/reconstruction/nabu/castvolume.py,sha256=g2NuI78KFIWy2iZmg4iJkUlqE2b2Ji4LPXKytcyGnXY,10246
|
312
312
|
tomwer/core/process/reconstruction/nabu/helical.py,sha256=rWp7DP-Uphrxhm4ztK1RwTNhnDFj0H3FTz37zuip7vU,1749
|
313
|
-
tomwer/core/process/reconstruction/nabu/nabucommon.py,sha256=
|
314
|
-
tomwer/core/process/reconstruction/nabu/nabuscores.py,sha256=
|
315
|
-
tomwer/core/process/reconstruction/nabu/nabuslices.py,sha256=
|
316
|
-
tomwer/core/process/reconstruction/nabu/nabuvolume.py,sha256=
|
313
|
+
tomwer/core/process/reconstruction/nabu/nabucommon.py,sha256=J9FaOe9tX_EL9oNid1BDt16YFiYUWc6ZD24SMg1LV7c,24543
|
314
|
+
tomwer/core/process/reconstruction/nabu/nabuscores.py,sha256=8ZGomiSz7yUncap9hXRhmwXG2-TBlnUf5Umav8CvdkQ,12825
|
315
|
+
tomwer/core/process/reconstruction/nabu/nabuslices.py,sha256=tKRkJRmazD8ogYw7_zKdfMmyU40DR6vBGbaozjiUiAA,36278
|
316
|
+
tomwer/core/process/reconstruction/nabu/nabuvolume.py,sha256=AKJEuuazHtsbCmOABoLkINd14arF8K5Z6zPB8OKT1l4,20688
|
317
317
|
tomwer/core/process/reconstruction/nabu/settings.py,sha256=bH5bW88tikwGQXIBNVznefXNldlClhKk-LhhU3qOcO0,2264
|
318
318
|
tomwer/core/process/reconstruction/nabu/target.py,sha256=_Z4gViprjR3Vm4KASqsASStLA9GM1wTyoi3Pg0PUSeg,1481
|
319
|
-
tomwer/core/process/reconstruction/nabu/utils.py,sha256=
|
319
|
+
tomwer/core/process/reconstruction/nabu/utils.py,sha256=G6wfaQn8_9h_AX9MUCnY-OTSLuA8L7bzymUyCO5_IlM,12956
|
320
320
|
tomwer/core/process/reconstruction/normalization/__init__.py,sha256=TDtATpMVFkEOT93wLXLpW0A_TOeiQDiM7AWAqX4FIB0,119
|
321
321
|
tomwer/core/process/reconstruction/normalization/normalization.py,sha256=G-eAZIct47RvzvHNMbKsG4Dt58vTSKhvH-NnIMzxzOs,13210
|
322
322
|
tomwer/core/process/reconstruction/normalization/params.py,sha256=porWC6G5lQWF-4JB03B56uGmuMxjx3u0ZMums-Bh2p8,4790
|
@@ -352,7 +352,7 @@ tomwer/core/process/test/test_data_listener.py,sha256=ab_FZM7f-lXzQ6eMY-4aCFyTUq
|
|
352
352
|
tomwer/core/process/test/test_data_transfer.py,sha256=q6NBX2keRfjwI1-8zth01zFZqNTECkNN8XzuEHNq94Y,15387
|
353
353
|
tomwer/core/process/test/test_data_watcher.py,sha256=y0FpUqxlpKZu7OhuwlxeLPX5ESPXj_2m2lKjEWrVCV4,3138
|
354
354
|
tomwer/core/process/test/test_lamino.py,sha256=MPMzmXbrqRX2hbt-RT3XM6qpCU7s4E0mAYK7GdroWfM,3009
|
355
|
-
tomwer/core/process/test/test_nabu.py,sha256=
|
355
|
+
tomwer/core/process/test/test_nabu.py,sha256=OrZcTPV8oOzb1x7845ha4JAHMNZzNqVVxi_GzZ4Cjds,19279
|
356
356
|
tomwer/core/process/test/test_normalization.py,sha256=WPdXga1OYq8WB7xWhYw0owSf0PT20eVcKOPLhfvv1wQ,4008
|
357
357
|
tomwer/core/process/test/test_timer.py,sha256=T25A7c81696c7D_sZiAy59b9RX-F6MdvUy-_st-qLVQ,3027
|
358
358
|
tomwer/core/process/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -573,12 +573,12 @@ tomwer/gui/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
573
573
|
tomwer/gui/visualization/dataviewer.py,sha256=trHX7R_eMOK9bkHHTMjIOAILMvzOX72IotAsrCyQoOA,26335
|
574
574
|
tomwer/gui/visualization/fullscreenplot.py,sha256=ptLrhF8DUsYNMj-KDioe9Y-KxnOzqepGlS8K2A2hjck,3639
|
575
575
|
tomwer/gui/visualization/nxtomometadata.py,sha256=uR2bHPnMp66mOJkE9WscTcQaiasr01pt3IbLUPP1F5M,683
|
576
|
-
tomwer/gui/visualization/reconstructionparameters.py,sha256=
|
576
|
+
tomwer/gui/visualization/reconstructionparameters.py,sha256=19W0uAdkda8kzp9rWj4gbMuG4t16kBc3j6RwM_1hogk,10230
|
577
577
|
tomwer/gui/visualization/scanoverview.py,sha256=zX1sKNKFb-HznOTOZqLr6HbmFjzdR35sBVmETBTcxNU,9215
|
578
578
|
tomwer/gui/visualization/sinogramviewer.py,sha256=JH_Ws2sJM9uls8rygXw2CMDvVwVG_1O-trtyI7OxAdE,10116
|
579
579
|
tomwer/gui/visualization/tomoobjoverview.py,sha256=YzocBQXhgnzI8IsJg5junE7218WcJdvSNH4r6DQgo74,1991
|
580
580
|
tomwer/gui/visualization/volumeoverview.py,sha256=6Hv1TtsDlaGQPCJKW-IkGy_r5Buue-O95tl1KkpMD-0,2491
|
581
|
-
tomwer/gui/visualization/volumeviewer.py,sha256=
|
581
|
+
tomwer/gui/visualization/volumeviewer.py,sha256=eOFIultoKryz2B3tslG3YFzo945n94zSviEz8vxaapk,16750
|
582
582
|
tomwer/gui/visualization/diffviewer/__init__.py,sha256=rZ7qOTfAChU3FouCdkZllXT9ZZqTdo1XhLZMfmOqUAE,39
|
583
583
|
tomwer/gui/visualization/diffviewer/diffviewer.py,sha256=XyEd8-wWt-8qf4H1RZPMwQbjpvB7EbOpu00nOL_psmc,22015
|
584
584
|
tomwer/gui/visualization/diffviewer/shiftwidget.py,sha256=ZY-P1nEudYXXYqnioTa9dG_gEte_Nf84RlXUKp8rgdE,21029
|
@@ -780,10 +780,10 @@ tomwer/third_party/nabu/preproc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
780
780
|
tomwer/third_party/nabu/preproc/phase.py,sha256=H8rR68wiYSWb1z0OQZESdiaQ1MnCMfe37sNsG4dYsOk,14386
|
781
781
|
tomwer/third_party/tango/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
782
782
|
tomwer/third_party/tango/device.py,sha256=RP1HbQkWQKWpE8GdcxIz-lXvhTfrdhoEKe4OxBDbLtE,220
|
783
|
-
tomwer-1.2.
|
784
|
-
tomwer-1.2.
|
785
|
-
tomwer-1.2.
|
786
|
-
tomwer-1.2.
|
787
|
-
tomwer-1.2.
|
788
|
-
tomwer-1.2.
|
789
|
-
tomwer-1.2.
|
783
|
+
tomwer-1.2.0a3.dist-info/LICENSE,sha256=yR_hIZ1MfDh9x2_s23uFqBH7m5DgrBl9nJKkE37YChM,1877
|
784
|
+
tomwer-1.2.0a3.dist-info/METADATA,sha256=nvn0-fe5aWpltF_l6DKuNQpMYW6sBFgYChswDXNiPGI,10865
|
785
|
+
tomwer-1.2.0a3.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
786
|
+
tomwer-1.2.0a3.dist-info/entry_points.txt,sha256=fIcDnCxjgwzfIylLYhUsFyiNZjZMxsfRQBxi4f-cJg8,440
|
787
|
+
tomwer-1.2.0a3.dist-info/namespace_packages.txt,sha256=Iut-JTfT11SZHHm77_ZeszD7pZDWXcTweCbvrJpqDyQ,14
|
788
|
+
tomwer-1.2.0a3.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
|
789
|
+
tomwer-1.2.0a3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|