tomwer 1.0.4__py3-none-any.whl → 1.1.0__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/tutorials/EBS_tomo_listener.ows +39 -0
- orangecontrib/tomwer/tutorials/cast_volume.ows +34 -0
- orangecontrib/tomwer/tutorials/simple_slice_reconstruction.ows +39 -0
- orangecontrib/tomwer/tutorials/simple_volume_local_reconstruction.ows +49 -0
- orangecontrib/tomwer/tutorials/simple_volume_to_slurm_reconstruction.ows +59 -0
- orangecontrib/tomwer/tutorials/using_saaxis_to_find_cor.ows +44 -0
- orangecontrib/tomwer/widgets/cluster/FutureSupervisorOW.py +1 -1
- orangecontrib/tomwer/widgets/cluster/SlurmClusterOW.py +14 -4
- orangecontrib/tomwer/widgets/cluster/__init__.py +1 -1
- orangecontrib/tomwer/widgets/control/DataListOW.py +12 -5
- orangecontrib/tomwer/widgets/control/DataListenerOW.py +18 -9
- orangecontrib/tomwer/widgets/control/DataSelectorOW.py +13 -6
- orangecontrib/tomwer/widgets/control/DataTransfertOW.py +4 -5
- orangecontrib/tomwer/widgets/control/DataValidatorOW.py +8 -4
- orangecontrib/tomwer/widgets/control/DataWatcherOW.py +4 -6
- orangecontrib/tomwer/widgets/control/EDF2NXTomomillOW.py +49 -62
- orangecontrib/tomwer/widgets/control/FilterOW.py +2 -4
- orangecontrib/tomwer/widgets/control/NXTomomillMixIn.py +93 -0
- orangecontrib/tomwer/widgets/control/NXTomomillOW.py +135 -128
- orangecontrib/tomwer/widgets/control/NotifierOW.py +31 -7
- orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py +3 -5
- orangecontrib/tomwer/widgets/control/TomoObjSerieOW.py +85 -0
- orangecontrib/tomwer/widgets/control/VolumeSelector.py +12 -4
- orangecontrib/tomwer/widgets/control/VolumeSymLinkOW.py +11 -7
- orangecontrib/tomwer/widgets/control/icons/notification.svg +4 -4
- orangecontrib/tomwer/widgets/control/icons/nxtomomill.png +0 -0
- orangecontrib/tomwer/widgets/control/icons/nxtomomill.svg +8 -5
- orangecontrib/tomwer/widgets/control/icons/tomoobjserie.png +0 -0
- orangecontrib/tomwer/widgets/control/icons/tomoobjserie.svg +138 -0
- orangecontrib/tomwer/widgets/edit/DarkFlatPatchOW.py +16 -4
- orangecontrib/tomwer/widgets/edit/NXtomoEditorOW.py +100 -0
- orangecontrib/tomwer/widgets/edit/icons/image_key_editor.png +0 -0
- orangecontrib/tomwer/widgets/edit/icons/image_key_upgrader.png +0 -0
- orangecontrib/tomwer/widgets/edit/icons/nx_tomo_editor.png +0 -0
- orangecontrib/tomwer/widgets/edit/icons/nx_tomo_editor.svg +123 -0
- orangecontrib/tomwer/widgets/edit/test/test_dark_flat_patch.py +21 -1
- orangecontrib/tomwer/widgets/edit/test/test_image_key_editor.py +1 -1
- orangecontrib/tomwer/widgets/edit/test/test_image_key_upgrader.py +1 -1
- orangecontrib/tomwer/widgets/edit/test/test_nxtomo_editor.py +25 -0
- orangecontrib/tomwer/widgets/other/PythonScriptOW.py +19 -10
- orangecontrib/tomwer/widgets/reconstruction/AxisOW.py +20 -14
- orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py +24 -10
- orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py +26 -21
- orangecontrib/tomwer/widgets/reconstruction/NabuOW.py +29 -12
- orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py +44 -17
- orangecontrib/tomwer/widgets/reconstruction/SAAxisOW.py +28 -18
- orangecontrib/tomwer/widgets/reconstruction/SADeltaBetaOW.py +24 -17
- orangecontrib/tomwer/widgets/reconstruction/SinoNormOW.py +6 -6
- orangecontrib/tomwer/widgets/reconstruction/TofuOW.py +4 -2
- orangecontrib/tomwer/widgets/reconstruction/icons/nabu_2d.png +0 -0
- orangecontrib/tomwer/widgets/reconstruction/icons/nabu_2d.svg +11 -8
- orangecontrib/tomwer/widgets/visualization/DataViewerOW.py +10 -4
- orangecontrib/tomwer/widgets/visualization/DiffViewerOW.py +1 -1
- orangecontrib/tomwer/widgets/visualization/NXtomoMetadataViewerOW.py +69 -0
- orangecontrib/tomwer/widgets/visualization/SampleMovedOW.py +2 -4
- orangecontrib/tomwer/widgets/visualization/icons/nx_tomo_metadata_viewer.png +0 -0
- orangecontrib/tomwer/widgets/visualization/icons/nx_tomo_metadata_viewer.svg +105 -0
- tomwer/__main__.py +10 -5
- tomwer/app/canvas_launcher/config.py +10 -10
- tomwer/app/canvas_launcher/mainwindow.py +68 -6
- tomwer/app/canvas_launcher/widgetsscheme.py +1 -3
- tomwer/app/darkref.py +16 -12
- tomwer/app/imagekeyeditor.py +2 -2
- tomwer/app/imagekeyupgrader.py +104 -0
- tomwer/app/nxtomoeditor.py +103 -0
- tomwer/app/rsync.py +1 -1
- tomwer/core/cluster/cluster.py +1 -1
- tomwer/core/futureobject.py +1 -0
- tomwer/core/process/control/datalistener/datalistener.py +7 -1
- tomwer/core/process/control/datalistener/rpcserver.py +3 -3
- tomwer/core/process/control/datawatcher/datawatcher.py +18 -18
- tomwer/core/process/control/datawatcher/datawatcherobserver.py +5 -8
- tomwer/core/process/control/datawatcher/datawatcherprocess.py +2 -3
- tomwer/core/process/control/datawatcher/edfdwprocess.py +2 -2
- tomwer/core/process/control/nxtomomill.py +33 -58
- tomwer/core/process/control/scanlist.py +2 -1
- tomwer/core/process/control/scanselector.py +7 -0
- tomwer/core/process/control/scantransfer.py +9 -18
- tomwer/core/process/control/scanvalidator.py +6 -5
- tomwer/core/process/control/singletomoobj.py +2 -1
- tomwer/core/process/control/timer.py +2 -1
- tomwer/core/process/control/tomoobjserie.py +8 -0
- tomwer/core/process/control/volumeselector.py +2 -1
- tomwer/core/process/control/volumesymlink.py +2 -1
- tomwer/core/process/edit/darkflatpatch.py +2 -1
- tomwer/core/process/edit/imagekeyeditor.py +4 -3
- tomwer/core/process/reconstruction/axis/axis.py +29 -32
- tomwer/core/process/reconstruction/axis/mode.py +3 -2
- tomwer/core/process/reconstruction/axis/params.py +35 -16
- tomwer/core/process/reconstruction/darkref/darkrefs.py +90 -707
- tomwer/core/process/reconstruction/darkref/darkrefscopy.py +44 -16
- tomwer/core/process/reconstruction/darkref/params.py +62 -67
- tomwer/core/process/reconstruction/lamino/tofu.py +1 -1
- tomwer/core/process/reconstruction/nabu/castvolume.py +21 -26
- tomwer/core/process/reconstruction/nabu/nabucommon.py +36 -38
- tomwer/core/process/reconstruction/nabu/nabuscores.py +28 -13
- tomwer/core/process/reconstruction/nabu/nabuslices.py +41 -14
- tomwer/core/process/reconstruction/nabu/nabuvolume.py +21 -12
- tomwer/core/process/reconstruction/nabu/utils.py +12 -1
- tomwer/core/process/reconstruction/normalization/normalization.py +9 -8
- tomwer/core/process/reconstruction/saaxis/saaxis.py +46 -20
- tomwer/core/process/reconstruction/sadeltabeta/sadeltabeta.py +38 -12
- tomwer/core/process/reconstruction/test/__init__.py +0 -39
- tomwer/core/process/reconstruction/test/test_axis_params.py +25 -3
- tomwer/core/process/reconstruction/test/test_darkref_copy.py +117 -1
- tomwer/core/process/script/python.py +16 -12
- tomwer/core/process/task.py +3 -7
- tomwer/core/process/test/test_axis.py +1 -1
- tomwer/core/process/test/test_dark_and_flat.py +41 -111
- tomwer/core/process/test/test_data_listener.py +0 -29
- tomwer/core/process/test/test_data_transfer.py +10 -14
- tomwer/core/process/test/test_nabu.py +1 -1
- tomwer/core/process/test/test_normalization.py +1 -1
- tomwer/core/process/visualization/liveslice.py +6 -0
- tomwer/core/scan/blissscan.py +37 -2
- tomwer/core/scan/edfscan.py +14 -4
- tomwer/core/scan/hdf5scan.py +10 -4
- tomwer/core/scan/scanbase.py +35 -29
- tomwer/core/scan/scanfactory.py +3 -17
- tomwer/core/scan/test/test_h5.py +1 -1
- tomwer/core/scan/test/test_process_registration.py +0 -11
- tomwer/core/scan/test/test_scan.py +32 -30
- tomwer/core/settings.py +2 -2
- tomwer/core/test/test_utils.py +1 -1
- tomwer/core/tomwer_object.py +19 -0
- tomwer/core/utils/__init__.py +0 -45
- tomwer/core/utils/char.py +2 -0
- tomwer/core/utils/gpu.py +5 -5
- tomwer/core/utils/nxtomoutils.py +2 -2
- tomwer/core/utils/scanutils.py +50 -0
- tomwer/core/utils/volumeutils.py +13 -0
- tomwer/core/volume/edfvolume.py +4 -0
- tomwer/core/volume/hdf5volume.py +4 -0
- tomwer/core/volume/jp2kvolume.py +4 -0
- tomwer/core/volume/rawvolume.py +4 -0
- tomwer/core/volume/tiffvolume.py +4 -0
- tomwer/core/volume/volumebase.py +19 -12
- tomwer/core/volume/volumefactory.py +20 -1
- tomwer/gui/cluster/slurm.py +1 -1
- tomwer/gui/cluster/test/test_cluster.py +2 -2
- tomwer/gui/control/datalist.py +109 -34
- tomwer/gui/control/datatransfert.py +1 -1
- tomwer/gui/control/datawatcher/datawatcher.py +23 -13
- tomwer/gui/control/datawatcher/datawatcherobserver.py +1 -1
- tomwer/gui/control/observations.py +0 -3
- tomwer/gui/control/selectorwidgetbase.py +42 -11
- tomwer/gui/control/serie/seriecreator.py +967 -0
- tomwer/{web/__init__.py → gui/control/serie/seriewaiter.py} +5 -7
- tomwer/gui/control/singletomoobj.py +15 -3
- tomwer/gui/control/test/test_datalist.py +1 -1
- tomwer/gui/control/test/test_datalistener.py +1 -1
- tomwer/gui/control/test/test_inputwidget.py +1 -1
- tomwer/gui/control/test/test_process_manager.py +1 -13
- tomwer/gui/control/test/test_scanselector.py +1 -1
- tomwer/gui/control/test/test_scanvalidator.py +1 -1
- tomwer/gui/control/test/test_single_tomo_obj.py +1 -1
- tomwer/gui/control/test/test_volume_dialog.py +19 -7
- tomwer/gui/control/test/test_volumeselector.py +4 -4
- tomwer/gui/debugtools/datasetgenerator.py +1 -8
- tomwer/gui/edit/dkrfpatch.py +2 -2
- tomwer/gui/edit/imagekeyeditor.py +12 -9
- tomwer/gui/edit/nxtomoeditor.py +475 -0
- tomwer/gui/edit/test/test_dkrf_patch.py +2 -14
- tomwer/gui/edit/test/test_image_key_editor.py +2 -2
- tomwer/gui/edit/test/test_nx_editor.py +155 -0
- tomwer/gui/qfolderdialog.py +11 -0
- tomwer/gui/reconstruction/axis/CompareImages.py +27 -29
- tomwer/gui/reconstruction/axis/axis.py +2 -0
- tomwer/gui/reconstruction/axis/radioaxis.py +67 -11
- tomwer/gui/reconstruction/darkref/darkrefcopywidget.py +7 -9
- tomwer/gui/reconstruction/darkref/darkrefwidget.py +22 -24
- tomwer/gui/reconstruction/lamino/tofu/projections.py +1 -1
- tomwer/gui/reconstruction/lamino/tofu/tofu.py +3 -3
- tomwer/gui/reconstruction/lamino/tofu/tofuexpert.py +4 -4
- tomwer/gui/reconstruction/lamino/tofu/tofuoutput.py +10 -4
- tomwer/gui/reconstruction/nabu/castvolume.py +80 -11
- tomwer/gui/reconstruction/nabu/check.py +1 -1
- tomwer/gui/reconstruction/nabu/nabuconfig/ctf.py +352 -0
- tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +0 -9
- tomwer/gui/reconstruction/nabu/nabuconfig/output.py +1 -1
- tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +18 -19
- tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +30 -7
- tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +26 -13
- tomwer/gui/reconstruction/nabu/slices.py +10 -2
- tomwer/gui/reconstruction/nabu/slurm.py +1 -1
- tomwer/gui/reconstruction/nabu/volume.py +13 -7
- tomwer/gui/reconstruction/normalization/intensity.py +1 -1
- tomwer/gui/reconstruction/saaxis/corrangeselector.py +10 -34
- tomwer/gui/reconstruction/saaxis/saaxis.py +11 -6
- tomwer/gui/reconstruction/saaxis/sliceselector.py +11 -26
- tomwer/gui/reconstruction/sadeltabeta/saadeltabeta.py +13 -8
- tomwer/gui/reconstruction/scores/scoreplot.py +67 -61
- tomwer/gui/reconstruction/test/test_axis.py +2 -2
- tomwer/gui/reconstruction/test/test_lamino.py +2 -2
- tomwer/gui/reconstruction/test/test_nabu.py +14 -1
- tomwer/gui/reconstruction/test/test_saaxis.py +8 -17
- tomwer/gui/reconstruction/test/test_sadeltabeta.py +7 -13
- tomwer/gui/stackplot.py +11 -28
- tomwer/gui/test/test_axis_gui.py +4 -4
- tomwer/gui/test/test_qfolder_dialog.py +12 -0
- tomwer/gui/utils/inputwidget.py +42 -21
- tomwer/gui/utils/lineselector/lineselector.py +13 -21
- tomwer/gui/utils/scandescription.py +2 -4
- tomwer/gui/utils/slider.py +1 -102
- tomwer/gui/utils/unitsystem.py +48 -11
- tomwer/gui/visualization/dataviewer.py +24 -17
- tomwer/gui/visualization/diffviewer/diffviewer.py +2 -11
- tomwer/gui/visualization/nxtomometadata.py +21 -0
- tomwer/gui/visualization/scanoverview.py +0 -1
- tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +72 -0
- tomwer/gui/visualization/test/test_stacks.py +1 -1
- tomwer/gui/visualization/tomoobjoverview.py +49 -0
- tomwer/gui/visualization/volumeoverview.py +64 -0
- tomwer/gui/visualization/volumeviewer.py +1 -1
- tomwer/resources/gui/icons/multi-document-save.png +0 -0
- tomwer/resources/gui/icons/multi-document-save.svg +101 -0
- tomwer/resources/gui/illustrations/ctf_z1.png +0 -0
- tomwer/resources/gui/illustrations/ctf_z1.svg +471 -0
- tomwer/synctools/datalistener.py +5 -1
- tomwer/synctools/imageloaderthread.py +2 -2
- tomwer/synctools/stacks/edit/imagekeyeditor.py +1 -1
- tomwer/synctools/stacks/processingstack.py +2 -2
- tomwer/synctools/stacks/reconstruction/castvolume.py +1 -0
- tomwer/synctools/stacks/reconstruction/lamino.py +1 -3
- tomwer/synctools/stacks/reconstruction/sadeltabeta.py +0 -2
- tomwer/synctools/test/test_darkRefs.py +32 -149
- tomwer/synctools/test/test_foldertransfer.py +1 -1
- tomwer/synctools/test/test_scanstages.py +2 -2
- tomwer/tests/__init__.py +0 -0
- tomwer/tests/conftest.py +51 -0
- tomwer/{test → tests}/test_scripts.py +1 -1
- tomwer/tests/test_utils.py +10 -0
- tomwer/{test → tests}/utils/utilstest.py +0 -11
- tomwer/version.py +3 -3
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/METADATA +14 -16
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/RECORD +245 -217
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/WHEEL +1 -1
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/entry_points.txt +6 -0
- orangecontrib/tomwer/setup.py +0 -45
- orangecontrib/tomwer/widgets/setup.py +0 -49
- tomwer/app/process.py +0 -153
- tomwer/core/process/reconstruction/nabu/slurm.py +0 -36
- tomwer/core/process/reconstruction/utils/nabu_slice_exec.py +0 -10
- tomwer/core/utils/laminoutils.py +0 -80
- tomwer/gui/utils/lineselector/lineselection.py +0 -76
- tomwer/setup.py +0 -52
- tomwer/web/client.py +0 -43
- tomwer/web/config.py +0 -36
- tomwer/web/test/test_graylog_connection.py +0 -59
- {tomwer/test → orangecontrib/tomwer/tutorials}/__init__.py +0 -0
- /tomwer/{web/test → gui/control/serie}/__init__.py +0 -0
- /tomwer/{test → tests}/utils/__init__.py +0 -0
- /tomwer-1.0.4-py3.8-nspkg.pth → /tomwer-1.1.0-py3.9-nspkg.pth +0 -0
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/LICENSE +0 -0
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/namespace_packages.txt +0 -0
- {tomwer-1.0.4.dist-info → tomwer-1.1.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
# /*##########################################################################
|
3
|
-
#
|
3
|
+
#
|
4
|
+
# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
|
4
5
|
#
|
5
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
7
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -20,11 +21,8 @@
|
|
20
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
22
|
# THE SOFTWARE.
|
22
23
|
#
|
23
|
-
|
24
|
-
"""Module containing process relative to the web (like classes used to link
|
25
|
-
with graylog)
|
26
|
-
"""
|
24
|
+
# ###########################################################################*/
|
27
25
|
|
28
|
-
__authors__ = ["H.Payno"]
|
26
|
+
__authors__ = ["H. Payno"]
|
29
27
|
__license__ = "MIT"
|
30
|
-
__date__ = "
|
28
|
+
__date__ = "12/01/2022"
|
@@ -50,7 +50,7 @@ class SingleTomoObj(qt.QWidget):
|
|
50
50
|
def getTomoObjIdentifier(self) -> str:
|
51
51
|
return self._tomoObjIdentifierLineQLE.text()
|
52
52
|
|
53
|
-
def _selectObject(self, *args, **kwargs):
|
53
|
+
def _selectObject(self, *args, **kwargs): # pragma: no cover
|
54
54
|
dialog = QDataDialog(self, multiSelection=True)
|
55
55
|
dialog.setNameFilters(
|
56
56
|
[
|
@@ -110,7 +110,7 @@ class SingleTomoObj(qt.QWidget):
|
|
110
110
|
return ScanFactory.create_scan_objects(path)
|
111
111
|
except: # noqa E722
|
112
112
|
try:
|
113
|
-
|
113
|
+
volumes = guess_volumes(
|
114
114
|
path,
|
115
115
|
scheme_to_vol={
|
116
116
|
EDFVolumeIdentifier.scheme: EDFVolume,
|
@@ -123,7 +123,19 @@ class SingleTomoObj(qt.QWidget):
|
|
123
123
|
)
|
124
124
|
except: # noqa E722
|
125
125
|
pass
|
126
|
-
|
126
|
+
return None
|
127
|
+
else:
|
128
|
+
# filter potential 'nabu histogram'
|
129
|
+
if volumes is not None:
|
130
|
+
|
131
|
+
def is_not_histogram(vol_identifier):
|
132
|
+
return not (
|
133
|
+
hasattr(vol_identifier, "data_path")
|
134
|
+
and vol_identifier.data_path.endswith("histogram")
|
135
|
+
)
|
136
|
+
|
137
|
+
volumes = tuple(filter(is_not_histogram, volumes))
|
138
|
+
return volumes
|
127
139
|
|
128
140
|
|
129
141
|
class _TomoObjQLE(QLFileSystem):
|
@@ -29,7 +29,7 @@ __date__ = "05/11/2018"
|
|
29
29
|
|
30
30
|
from tomwer.gui.control.datalist import GenericScanListDialog
|
31
31
|
from tomwer.gui.control.datalist import VolumeList
|
32
|
-
from tomwer.
|
32
|
+
from tomwer.tests.utils import skip_gui_test
|
33
33
|
from silx.gui.utils.testutils import TestCaseQt
|
34
34
|
from tomwer.core.utils.scanutils import MockEDF
|
35
35
|
from silx.gui import qt
|
@@ -30,7 +30,7 @@ __date__ = "18/03/2020"
|
|
30
30
|
|
31
31
|
from silx.gui import qt
|
32
32
|
from silx.gui.utils.testutils import TestCaseQt
|
33
|
-
from tomwer.
|
33
|
+
from tomwer.tests.utils import skip_gui_test
|
34
34
|
from tomwer.gui.control.datalistener import ConfigurationWidget
|
35
35
|
from silx.gui.utils.testutils import SignalListener
|
36
36
|
import pytest
|
@@ -28,7 +28,7 @@ __date__ = "16/06/2021"
|
|
28
28
|
|
29
29
|
|
30
30
|
from tomwer.gui.utils import inputwidget
|
31
|
-
from tomwer.
|
31
|
+
from tomwer.tests.utils import skip_gui_test
|
32
32
|
from silx.gui.utils.testutils import TestCaseQt
|
33
33
|
from silx.gui import qt
|
34
34
|
import numpy
|
@@ -28,11 +28,10 @@ __license__ = "MIT"
|
|
28
28
|
__date__ = "09/11/2020"
|
29
29
|
|
30
30
|
|
31
|
-
import unittest
|
32
31
|
import pytest
|
33
32
|
from silx.gui import qt
|
34
33
|
from silx.gui.utils.testutils import TestCaseQt
|
35
|
-
from tomwer.
|
34
|
+
from tomwer.tests.utils import skip_gui_test
|
36
35
|
from tomwer.gui.control.datalistener import ConfigurationWidget
|
37
36
|
from silx.gui.utils.testutils import SignalListener
|
38
37
|
|
@@ -64,14 +63,3 @@ class TestProcessManager(TestCaseQt):
|
|
64
63
|
self.assertEqual(
|
65
64
|
self._configWidget.getConfiguration(), {"host": "toto", "port": 0}
|
66
65
|
)
|
67
|
-
|
68
|
-
|
69
|
-
def suite():
|
70
|
-
test_suite = unittest.TestSuite()
|
71
|
-
for ui in (TestProcessManager,):
|
72
|
-
test_suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ui))
|
73
|
-
return test_suite
|
74
|
-
|
75
|
-
|
76
|
-
if __name__ == "__main__":
|
77
|
-
unittest.main(defaultTest="suite")
|
@@ -27,7 +27,7 @@ __license__ = "MIT"
|
|
27
27
|
__date__ = "22/01/2017"
|
28
28
|
|
29
29
|
|
30
|
-
from tomwer.
|
30
|
+
from tomwer.tests.utils import skip_gui_test
|
31
31
|
from silx.gui.utils.testutils import TestCaseQt
|
32
32
|
from tomwer.gui.control.scanselectorwidget import ScanSelectorWidget
|
33
33
|
from tomwer.core.utils.scanutils import MockEDF
|
@@ -41,7 +41,7 @@ from tomwer.core.utils.scanutils import MockEDF
|
|
41
41
|
from tomwer.core.process.control.scanvalidator import ScanValidatorP
|
42
42
|
from tomwer.gui.utils.waiterthread import QWaiterThread
|
43
43
|
from tomwer.core.scan.edfscan import EDFTomoScan
|
44
|
-
from tomwer.
|
44
|
+
from tomwer.tests.utils import skip_gui_test
|
45
45
|
|
46
46
|
logging.disable(logging.INFO)
|
47
47
|
|
@@ -22,7 +22,7 @@ class TestSingletomoObj(TestCaseQt):
|
|
22
22
|
self.volume = HDF5Volume(
|
23
23
|
file_path=self._volume_file_path,
|
24
24
|
data_path="my_volume",
|
25
|
-
data=numpy.linspace(0, 200, 200).reshape(2, 10, 10),
|
25
|
+
data=numpy.linspace(start=0, stop=200, num=200).reshape((2, 10, 10)),
|
26
26
|
)
|
27
27
|
self.volume.save()
|
28
28
|
|
@@ -34,7 +34,7 @@ import shutil
|
|
34
34
|
import tempfile
|
35
35
|
from silx.gui.utils.testutils import TestCaseQt
|
36
36
|
from silx.gui import qt
|
37
|
-
from tomwer.
|
37
|
+
from tomwer.tests.utils import skip_gui_test
|
38
38
|
from tomwer.gui.qfolderdialog import QVolumeDialog
|
39
39
|
from tomoscan.esrf.volume.edfvolume import EDFVolume
|
40
40
|
from tomoscan.esrf.volume.hdf5volume import HDF5Volume
|
@@ -67,7 +67,9 @@ class TestVolumeDialog(TestCaseQt):
|
|
67
67
|
volume = HDF5Volume(
|
68
68
|
file_path=file_path,
|
69
69
|
data_path="entry",
|
70
|
-
data=numpy.linspace(1, 10, 300, dtype=numpy.uint8).reshape(
|
70
|
+
data=numpy.linspace(start=1, stop=10, num=300, dtype=numpy.uint8).reshape(
|
71
|
+
(3, 10, 10)
|
72
|
+
),
|
71
73
|
)
|
72
74
|
volume.save()
|
73
75
|
self._dialog.show()
|
@@ -93,7 +95,9 @@ class TestVolumeDialog(TestCaseQt):
|
|
93
95
|
volume = HDF5Volume(
|
94
96
|
file_path=file_path,
|
95
97
|
data_path="entry",
|
96
|
-
data=numpy.linspace(1, 10, 300, dtype=numpy.uint8).reshape(
|
98
|
+
data=numpy.linspace(start=1, stop=10, num=300, dtype=numpy.uint8).reshape(
|
99
|
+
(3, 10, 10)
|
100
|
+
),
|
97
101
|
)
|
98
102
|
volume.save()
|
99
103
|
|
@@ -115,7 +119,9 @@ class TestVolumeDialog(TestCaseQt):
|
|
115
119
|
self._dialog.setFullAuto(True)
|
116
120
|
volume = EDFVolume(
|
117
121
|
folder=self.tmp_dir,
|
118
|
-
data=numpy.linspace(1, 10, 300, dtype=numpy.uint8).reshape(
|
122
|
+
data=numpy.linspace(start=1, stop=10, num=300, dtype=numpy.uint8).reshape(
|
123
|
+
(3, 10, 10)
|
124
|
+
),
|
119
125
|
)
|
120
126
|
volume.save()
|
121
127
|
self._dialog.show()
|
@@ -140,7 +146,9 @@ class TestVolumeDialog(TestCaseQt):
|
|
140
146
|
self._dialog.setFullAuto(False)
|
141
147
|
volume = EDFVolume(
|
142
148
|
folder=self.tmp_dir,
|
143
|
-
data=numpy.linspace(1, 10, 300, dtype=numpy.uint8).reshape(
|
149
|
+
data=numpy.linspace(start=1, stop=10, num=300, dtype=numpy.uint8).reshape(
|
150
|
+
(3, 10, 10)
|
151
|
+
),
|
144
152
|
volume_basename="test",
|
145
153
|
)
|
146
154
|
volume.save()
|
@@ -168,7 +176,9 @@ class TestVolumeDialog(TestCaseQt):
|
|
168
176
|
volume = HDF5Volume(
|
169
177
|
file_path=file_path,
|
170
178
|
data_path="entry",
|
171
|
-
data=numpy.linspace(1, 10, 300, dtype=numpy.uint8).reshape(
|
179
|
+
data=numpy.linspace(start=1, stop=10, num=300, dtype=numpy.uint8).reshape(
|
180
|
+
(3, 10, 10)
|
181
|
+
),
|
172
182
|
)
|
173
183
|
volume.save()
|
174
184
|
self._dialog.setVolumeUrl(volume.get_identifier().to_str())
|
@@ -187,7 +197,9 @@ class TestVolumeDialog(TestCaseQt):
|
|
187
197
|
"""
|
188
198
|
volume = EDFVolume(
|
189
199
|
folder=self.tmp_dir,
|
190
|
-
data=numpy.linspace(1, 10, 300, dtype=numpy.uint8).reshape(
|
200
|
+
data=numpy.linspace(start=1, stop=10, num=300, dtype=numpy.uint8).reshape(
|
201
|
+
(3, 10, 10)
|
202
|
+
),
|
191
203
|
volume_basename="test",
|
192
204
|
)
|
193
205
|
volume.save()
|
@@ -28,7 +28,7 @@ __date__ = "22/01/2017"
|
|
28
28
|
|
29
29
|
|
30
30
|
import os
|
31
|
-
from tomwer.
|
31
|
+
from tomwer.tests.utils import skip_gui_test
|
32
32
|
from silx.gui import qt
|
33
33
|
from silx.gui.utils.testutils import TestCaseQt
|
34
34
|
from tomwer.gui.control.volumeselectorwidget import VolumeSelectorWidget
|
@@ -52,20 +52,20 @@ class TestVolumeSelector(TestCaseQt):
|
|
52
52
|
self.volume_1 = HDF5Volume(
|
53
53
|
file_path=os.path.join(self.folder, "my_volume.hdf5"),
|
54
54
|
data_path="entry0000",
|
55
|
-
data=numpy.linspace(1, 100, 300).reshape(3, 10, 10),
|
55
|
+
data=numpy.linspace(start=1, stop=100, num=300).reshape((3, 10, 10)),
|
56
56
|
)
|
57
57
|
self.volume_1.save()
|
58
58
|
|
59
59
|
self.volume_2 = HDF5Volume(
|
60
60
|
file_path=os.path.join(self.folder, "my_volume.hdf5"),
|
61
61
|
data_path="entry0001",
|
62
|
-
data=numpy.linspace(1, 100, 400).reshape(4, 10, 10),
|
62
|
+
data=numpy.linspace(start=1, stop=100, num=400).reshape((4, 10, 10)),
|
63
63
|
)
|
64
64
|
self.volume_2.save()
|
65
65
|
|
66
66
|
self.volume_3 = EDFVolume(
|
67
67
|
folder=os.path.join(self.folder, "vol"),
|
68
|
-
data=numpy.linspace(1, 100, 500).reshape(5, 10, 10),
|
68
|
+
data=numpy.linspace(start=1, stop=100, num=500).reshape((5, 10, 10)),
|
69
69
|
)
|
70
70
|
self.volume_3.save()
|
71
71
|
|
@@ -182,7 +182,7 @@ class DatasetGeneratorConfig(qt.QWidget):
|
|
182
182
|
def _signalUpdated(self, *args, **kwargs):
|
183
183
|
self.sigConfigChanged.emit()
|
184
184
|
|
185
|
-
def _selectRootFolder(self):
|
185
|
+
def _selectRootFolder(self): # pragma: no cover
|
186
186
|
defaultDirectory = self._outputQLE.text()
|
187
187
|
dialog = qt.QFileDialog(self, directory=defaultDirectory)
|
188
188
|
dialog.setFileMode(qt.QFileDialog.DirectoryOnly)
|
@@ -277,10 +277,3 @@ class DatasetGeneratorConfig(qt.QWidget):
|
|
277
277
|
if "flat_at_beginning" in config:
|
278
278
|
self.setFlatNeededAtBeginning(config["flat_at_beginning"])
|
279
279
|
self.blockSignals(old)
|
280
|
-
|
281
|
-
|
282
|
-
if __name__ == "__main__":
|
283
|
-
app = qt.QApplication([])
|
284
|
-
dialog = DatasetGeneratorDialog(parent=None)
|
285
|
-
dialog.show()
|
286
|
-
app.exec_()
|
tomwer/gui/edit/dkrfpatch.py
CHANGED
@@ -31,7 +31,7 @@ __date__ = "30/10/2020"
|
|
31
31
|
import h5py
|
32
32
|
from silx.gui import qt
|
33
33
|
from silx.io.utils import h5py_read_dataset
|
34
|
-
from tomoscan.esrf.hdf5scan import ImageKey
|
34
|
+
from tomoscan.esrf.scan.hdf5scan import ImageKey
|
35
35
|
from silx.io.url import DataUrl
|
36
36
|
from tomoscan.io import HDF5File
|
37
37
|
from tomwer.core.scan.hdf5scan import HDF5TomoScan
|
@@ -241,7 +241,7 @@ class _DarkOrFlatUrl(qt.QWidget):
|
|
241
241
|
scheme="silx",
|
242
242
|
)
|
243
243
|
except Exception as e:
|
244
|
-
_logger.warning("Fail to create url. Reason is
|
244
|
+
_logger.warning(f"Fail to create url. Reason is {e}")
|
245
245
|
return None
|
246
246
|
else:
|
247
247
|
return url
|
@@ -32,7 +32,7 @@ from silx.gui import qt
|
|
32
32
|
from tomwer.core.process.edit.imagekeyeditor import IMAGE_KEYS
|
33
33
|
from typing import Union
|
34
34
|
from tomwer.core.scan.hdf5scan import HDF5TomoScan
|
35
|
-
from tomoscan.esrf.hdf5scan import ImageKey as _ImageKey
|
35
|
+
from tomoscan.esrf.scan.hdf5scan import ImageKey as _ImageKey
|
36
36
|
import weakref
|
37
37
|
import functools
|
38
38
|
from collections.abc import Iterable
|
@@ -171,7 +171,7 @@ class _ImageKeyEditor(qt.QDialog):
|
|
171
171
|
# mode selection
|
172
172
|
self.layout().addWidget(qt.QLabel("selection mode"), 1, 0, 1, 1)
|
173
173
|
self._selectionModeCB = qt.QComboBox(self)
|
174
|
-
for mode in ("
|
174
|
+
for mode in ("range", "list"):
|
175
175
|
self._selectionModeCB.addItem(mode)
|
176
176
|
self._selectionModeCB.setCurrentIndex(self._selectionModeCB.findText("list"))
|
177
177
|
self.layout().addWidget(self._selectionModeCB, 1, 1, 1, 1)
|
@@ -224,7 +224,7 @@ class _ImageKeyEditor(qt.QDialog):
|
|
224
224
|
def getSelectionMode(self) -> str:
|
225
225
|
"""
|
226
226
|
|
227
|
-
:return: frame indexes selection mode. Can be '
|
227
|
+
:return: frame indexes selection mode. Can be 'range' or 'list'
|
228
228
|
"""
|
229
229
|
return self._selectionModeCB.currentText()
|
230
230
|
|
@@ -234,7 +234,7 @@ class _ImageKeyEditor(qt.QDialog):
|
|
234
234
|
:return: list of indexes to be modified
|
235
235
|
:rtype: list
|
236
236
|
"""
|
237
|
-
if self.getSelectionMode() == "
|
237
|
+
if self.getSelectionMode() == "range":
|
238
238
|
return self._selectionWidget.getSlice()
|
239
239
|
elif self.getSelectionMode() == "list":
|
240
240
|
return self._selectionWidget.getList()
|
@@ -321,7 +321,7 @@ class _ListSelection(qt.QWidget):
|
|
321
321
|
def _selectFrames(self):
|
322
322
|
if self._scan is None or self._scan() is None:
|
323
323
|
_logger.warning(
|
324
|
-
"No scan set or has been moved. Unable to select
|
324
|
+
"No scan set or has been moved. Unable to select slices from it."
|
325
325
|
)
|
326
326
|
return
|
327
327
|
scan = self._scan()
|
@@ -375,11 +375,14 @@ class _EditionSelection(qt.QWidget):
|
|
375
375
|
def setSelectionMode(self, mode: str) -> None:
|
376
376
|
"""
|
377
377
|
|
378
|
-
:param str mode: define indexes selection mode. Can be '
|
378
|
+
:param str mode: define indexes selection mode. Can be 'range' or
|
379
379
|
'list'
|
380
380
|
"""
|
381
|
-
|
382
|
-
|
381
|
+
if mode == "slice":
|
382
|
+
# for backward compatibility (user can have .ows with old name)
|
383
|
+
mode = "range"
|
384
|
+
assert mode in ("range", "list")
|
385
|
+
self._sliceSelection.setVisible(mode == "range")
|
383
386
|
self._listSelection.setVisible(mode == "list")
|
384
387
|
|
385
388
|
def getList(self) -> list:
|
@@ -445,7 +448,7 @@ class _ImageKeyList(qt.QTableWidget):
|
|
445
448
|
"""
|
446
449
|
Update the QTableWidget for the provided frames
|
447
450
|
|
448
|
-
:param Iterable frames: Iterable of tomoscan.esrf.HDF5TomoScan.Frame
|
451
|
+
:param Iterable frames: Iterable of tomoscan.esrf.scan.HDF5TomoScan.Frame
|
449
452
|
:param dict frames_new_keys: dictionary with frame edited. key is frame
|
450
453
|
index. Value is the new `image_key` value
|
451
454
|
"""
|