tomwer 1.2.9__py3-none-any.whl → 1.3.0a0__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/icat_publication.ows +58 -0
- orangecontrib/tomwer/widgets/__init__.py +1 -0
- orangecontrib/tomwer/widgets/control/DataDiscoveryOW.py +2 -2
- orangecontrib/tomwer/widgets/control/DataListOW.py +9 -7
- orangecontrib/tomwer/widgets/control/DataSelectorOW.py +21 -10
- orangecontrib/tomwer/widgets/control/EDF2NXTomomillOW.py +11 -5
- orangecontrib/tomwer/widgets/control/EmailOW.py +4 -4
- orangecontrib/tomwer/widgets/control/NXTomomillOW.py +31 -18
- orangecontrib/tomwer/widgets/control/NXtomoConcatenate.py +14 -7
- orangecontrib/tomwer/widgets/control/NotifierOW.py +1 -0
- orangecontrib/tomwer/widgets/control/VolumeSelector.py +7 -4
- orangecontrib/tomwer/widgets/control/VolumeSymLinkOW.py +182 -182
- orangecontrib/tomwer/widgets/debugtools/DatasetGeneratorOW.py +4 -4
- orangecontrib/tomwer/widgets/edit/DarkFlatPatchOW.py +4 -4
- orangecontrib/tomwer/widgets/edit/ImageKeyEditorOW.py +3 -3
- orangecontrib/tomwer/widgets/edit/ImageKeyUpgraderOW.py +2 -0
- orangecontrib/tomwer/widgets/edit/NXtomoEditorOW.py +3 -3
- orangecontrib/tomwer/widgets/edit/test/test_nxtomo_editor.py +3 -3
- orangecontrib/tomwer/widgets/icat/PublishProcessedDataOW.py +115 -0
- orangecontrib/tomwer/widgets/icat/RawDataScreenshotCreatorOW.py +98 -0
- orangecontrib/tomwer/widgets/icat/SaveToGalleryAndPublishOW.py +129 -0
- orangecontrib/tomwer/widgets/icat/__init__.py +13 -0
- orangecontrib/tomwer/widgets/icat/icons/add_gallery.png +0 -0
- orangecontrib/tomwer/widgets/icat/icons/add_gallery.svg +82 -0
- orangecontrib/tomwer/widgets/icat/icons/publish_processed_data.png +0 -0
- orangecontrib/tomwer/widgets/icat/icons/publish_processed_data.svg +95 -0
- orangecontrib/tomwer/widgets/icat/icons/raw_screenshots.png +0 -0
- orangecontrib/tomwer/widgets/icat/icons/raw_screenshots.svg +143 -0
- orangecontrib/tomwer/widgets/icons/tomwer_data_portal.png +0 -0
- orangecontrib/tomwer/widgets/icons/tomwer_data_portal.svg +76 -0
- orangecontrib/tomwer/widgets/reconstruction/AxisOW.py +9 -8
- orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py +3 -3
- orangecontrib/tomwer/widgets/reconstruction/NabuHelicalPrepareWeightsDoubleOW.py +179 -169
- orangecontrib/tomwer/widgets/reconstruction/NabuOW.py +23 -0
- orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py +39 -5
- orangecontrib/tomwer/widgets/reconstruction/SAAxisOW.py +7 -13
- orangecontrib/tomwer/widgets/reconstruction/SADeltaBetaOW.py +7 -17
- orangecontrib/tomwer/widgets/reconstruction/SinoNormOW.py +3 -4
- orangecontrib/tomwer/widgets/visualization/LivesliceOW.py +1 -1
- orangecontrib/tomwer/widgets/visualization/NXtomoMetadataViewerOW.py +3 -3
- orangecontrib/tomwer/widgets/visualization/VolumeViewerOW.py +3 -29
- tomwer/__main__.py +11 -58
- tomwer/app/canvas.py +8 -0
- tomwer/app/canvas_launcher/config.py +13 -11
- tomwer/app/darkref.py +1 -1
- tomwer/app/darkrefpatch.py +1 -1
- tomwer/app/imagekeyeditor.py +5 -5
- tomwer/app/imagekeyupgrader.py +5 -5
- tomwer/app/intensitynormalization.py +2 -2
- tomwer/app/radiostack.py +2 -2
- tomwer/app/zstitching.py +74 -3
- tomwer/core/cluster/cluster.py +26 -0
- tomwer/core/log/logger.py +7 -5
- tomwer/core/process/conditions/filters.py +1 -1
- tomwer/core/process/control/datalistener/datalistener.py +3 -3
- tomwer/core/process/control/nxtomoconcatenate.py +13 -13
- tomwer/core/process/control/nxtomomill.py +83 -25
- tomwer/core/process/control/scantransfer.py +11 -10
- tomwer/core/process/control/scanvalidator.py +3 -2
- tomwer/core/process/control/test/test_concatenate_nxtomos.py +9 -9
- tomwer/core/process/control/test/test_email.py +4 -4
- tomwer/core/process/control/test/test_h52nx_process.py +59 -7
- tomwer/core/process/control/test/test_volume_link.py +64 -64
- tomwer/core/process/control/timer.py +1 -1
- tomwer/core/process/control/volumesymlink.py +200 -200
- tomwer/core/process/edit/darkflatpatch.py +6 -6
- tomwer/core/process/edit/imagekeyeditor.py +17 -18
- tomwer/core/process/icat/__init__.py +0 -0
- tomwer/core/process/icat/createscreenshots.py +100 -0
- tomwer/core/process/icat/gallery.py +377 -0
- tomwer/core/process/icat/icatbase.py +36 -0
- tomwer/core/process/icat/publish.py +228 -0
- tomwer/core/process/icat/screenshots.py +26 -0
- tomwer/core/process/output.py +52 -0
- tomwer/core/process/reconstruction/axis/axis.py +17 -10
- tomwer/core/process/reconstruction/axis/mode.py +4 -0
- tomwer/core/process/reconstruction/axis/params.py +9 -4
- tomwer/core/process/reconstruction/darkref/darkrefs.py +8 -6
- tomwer/core/process/reconstruction/darkref/darkrefscopy.py +1 -1
- tomwer/core/process/reconstruction/darkref/params.py +1 -1
- tomwer/core/process/reconstruction/lamino/tofu.py +4 -4
- tomwer/core/process/reconstruction/nabu/castvolume.py +1 -1
- tomwer/core/process/reconstruction/nabu/helical.py +9 -5
- tomwer/core/process/reconstruction/nabu/nabucommon.py +32 -62
- tomwer/core/process/reconstruction/nabu/nabuscores.py +387 -61
- tomwer/core/process/reconstruction/nabu/nabuslices.py +33 -21
- tomwer/core/process/reconstruction/nabu/nabuvolume.py +37 -14
- tomwer/core/process/reconstruction/nabu/settings.py +2 -2
- tomwer/core/process/reconstruction/nabu/utils.py +129 -24
- tomwer/core/process/reconstruction/output.py +108 -0
- tomwer/core/process/reconstruction/saaxis/saaxis.py +233 -263
- tomwer/core/process/reconstruction/sadeltabeta/sadeltabeta.py +140 -86
- tomwer/core/process/reconstruction/scores/params.py +4 -1
- tomwer/core/process/reconstruction/scores/scores.py +13 -0
- tomwer/core/process/reconstruction/test/test_axis_params.py +2 -2
- tomwer/core/process/reconstruction/test/test_darkref.py +3 -3
- tomwer/core/process/reconstruction/test/test_darkref_copy.py +3 -3
- tomwer/core/process/reconstruction/test/test_saaxis.py +3 -4
- tomwer/core/process/reconstruction/test/test_sadeltabeta.py +2 -2
- tomwer/core/process/stitching/nabustitcher.py +2 -2
- tomwer/core/process/test/test_axis.py +6 -6
- tomwer/core/process/test/test_dark_and_flat.py +10 -7
- tomwer/core/process/test/test_data_transfer.py +7 -6
- tomwer/core/process/test/test_nabu.py +4 -4
- tomwer/core/process/test/test_normalization.py +2 -2
- tomwer/core/scan/edfscan.py +4 -1
- tomwer/core/scan/hdf5scan.py +19 -500
- tomwer/core/scan/nxtomoscan.py +532 -0
- tomwer/core/scan/scanbase.py +42 -20
- tomwer/core/scan/scanfactory.py +13 -13
- tomwer/core/scan/test/test_future_scan.py +2 -2
- tomwer/core/scan/test/test_h5.py +12 -10
- tomwer/core/scan/test/test_process_registration.py +2 -2
- tomwer/core/scan/test/test_scan.py +4 -3
- tomwer/core/settings.py +20 -0
- tomwer/core/test/test_scanutils.py +8 -7
- tomwer/core/test/test_utils.py +33 -26
- tomwer/core/utils/__init__.py +0 -466
- tomwer/core/utils/deprecation.py +1 -1
- tomwer/core/utils/dictutils.py +14 -0
- tomwer/core/utils/lbsram.py +35 -0
- tomwer/core/utils/nxtomoutils.py +1 -1
- tomwer/core/utils/scanutils.py +6 -6
- tomwer/core/utils/spec.py +263 -0
- tomwer/core/volume/volumefactory.py +2 -2
- tomwer/gui/cluster/slurm.py +260 -60
- tomwer/gui/cluster/test/test_cluster.py +13 -0
- tomwer/gui/cluster/test/test_supervisor.py +2 -2
- tomwer/gui/configuration/__init__.py +0 -0
- tomwer/gui/{reconstruction/nabu → configuration}/action.py +1 -32
- tomwer/gui/configuration/level.py +22 -0
- tomwer/gui/control/actions.py +54 -0
- tomwer/gui/control/datalist.py +78 -16
- tomwer/gui/control/datalistener.py +4 -16
- tomwer/gui/control/{email.py → emailnotifier.py} +9 -18
- tomwer/gui/control/history.py +2 -2
- tomwer/gui/control/observations.py +2 -2
- tomwer/gui/control/reducedarkflatselector.py +1 -1
- tomwer/gui/control/selectorwidgetbase.py +36 -9
- tomwer/gui/control/serie/seriecreator.py +5 -22
- tomwer/gui/control/test/test_email.py +1 -1
- tomwer/gui/control/test/test_scanvalidator.py +6 -5
- tomwer/gui/control/test/test_single_tomo_obj.py +2 -2
- tomwer/gui/control/tomoobjdisplaymode.py +8 -0
- tomwer/gui/debugtools/datasetgenerator.py +3 -3
- tomwer/gui/edit/dkrfpatch.py +16 -22
- tomwer/gui/edit/imagekeyeditor.py +8 -11
- tomwer/gui/edit/nxtomoeditor.py +111 -44
- tomwer/gui/edit/nxtomowarmer.py +4 -4
- tomwer/gui/edit/test/test_dkrf_patch.py +7 -7
- tomwer/gui/edit/test/test_image_key_editor.py +3 -3
- tomwer/gui/edit/test/test_nx_editor.py +40 -16
- tomwer/gui/icat/__init__.py +0 -0
- tomwer/gui/icat/createscreenshots.py +80 -0
- tomwer/gui/icat/gallery.py +214 -0
- tomwer/gui/icat/publish.py +187 -0
- tomwer/gui/reconstruction/axis/axis.py +171 -57
- tomwer/gui/reconstruction/axis/radioaxis.py +80 -95
- tomwer/gui/reconstruction/darkref/darkrefcopywidget.py +3 -2
- tomwer/gui/reconstruction/lamino/tofu/projections.py +1 -1
- tomwer/gui/reconstruction/lamino/tofu/tofuoutput.py +3 -6
- tomwer/gui/reconstruction/nabu/castvolume.py +1 -1
- tomwer/gui/reconstruction/nabu/check.py +9 -9
- tomwer/gui/reconstruction/nabu/helical.py +29 -12
- tomwer/gui/reconstruction/nabu/nabuconfig/base.py +2 -4
- tomwer/gui/reconstruction/nabu/nabuconfig/output.py +110 -33
- tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +9 -12
- tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +219 -29
- tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +3 -6
- tomwer/gui/reconstruction/nabu/nabuflow.py +12 -20
- tomwer/gui/reconstruction/nabu/slices.py +6 -7
- tomwer/gui/reconstruction/nabu/volume.py +22 -10
- tomwer/gui/reconstruction/normalization/intensity.py +15 -23
- tomwer/gui/reconstruction/saaxis/corrangeselector.py +7 -23
- tomwer/gui/reconstruction/saaxis/dimensionwidget.py +1 -1
- tomwer/gui/reconstruction/saaxis/saaxis.py +7 -9
- tomwer/gui/reconstruction/sadeltabeta/saadeltabeta.py +2 -1
- tomwer/gui/reconstruction/scores/control.py +2 -9
- tomwer/gui/reconstruction/scores/scoreplot.py +11 -5
- tomwer/gui/reconstruction/test/test_axis.py +23 -12
- tomwer/gui/reconstruction/test/test_lamino.py +8 -3
- tomwer/gui/reconstruction/test/test_nabu.py +28 -9
- tomwer/gui/reconstruction/test/test_saaxis.py +3 -3
- tomwer/gui/reconstruction/test/test_sadeltabeta.py +2 -2
- tomwer/gui/settings.py +5 -28
- tomwer/gui/stackplot.py +2 -5
- tomwer/gui/stitching/action.py +49 -0
- tomwer/gui/stitching/config/axisparams.py +7 -24
- tomwer/gui/stitching/config/output.py +10 -8
- tomwer/gui/stitching/config/positionoveraxis.py +22 -23
- tomwer/gui/stitching/normalization.py +117 -0
- tomwer/gui/stitching/stitchandbackground.py +4 -6
- tomwer/gui/stitching/stitching.py +265 -43
- tomwer/gui/stitching/stitching_preview.py +62 -5
- tomwer/gui/stitching/stitching_raw.py +2 -5
- tomwer/gui/stitching/z_stitching/fineestimation.py +0 -60
- tomwer/gui/utils/buttons.py +112 -29
- tomwer/gui/utils/inputwidget.py +33 -25
- tomwer/gui/utils/scandescription.py +4 -0
- tomwer/gui/utils/step.py +144 -0
- tomwer/gui/utils/unitsystem.py +2 -5
- tomwer/gui/utils/vignettes.py +176 -15
- tomwer/gui/visualization/dataviewer.py +1 -4
- tomwer/gui/visualization/diffviewer/diffviewer.py +7 -16
- tomwer/gui/visualization/diffviewer/shiftwidget.py +2 -5
- tomwer/gui/visualization/scanoverview.py +1 -1
- tomwer/gui/visualization/sinogramviewer.py +1 -10
- tomwer/gui/visualization/test/test_diffviewer.py +3 -3
- tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +4 -4
- tomwer/gui/visualization/test/test_sinogramviewer.py +2 -2
- tomwer/gui/visualization/test/test_stacks.py +3 -3
- tomwer/gui/visualization/test/test_volumeviewer.py +2 -2
- tomwer/io/utils/raw_and_processed_data.py +84 -0
- tomwer/io/utils/tomoobj.py +4 -6
- tomwer/resources/gui/icons/ruler.png +0 -0
- tomwer/resources/gui/icons/ruler.svg +273 -0
- tomwer/resources/gui/icons/short_description.png +0 -0
- tomwer/resources/gui/icons/short_description.svg +58 -0
- tomwer/resources/gui/icons/url.png +0 -0
- tomwer/resources/gui/icons/url.svg +58 -0
- tomwer/synctools/stacks/edit/darkflatpatch.py +2 -2
- tomwer/synctools/stacks/edit/imagekeyeditor.py +2 -2
- tomwer/synctools/stacks/reconstruction/axis.py +4 -4
- tomwer/synctools/stacks/reconstruction/castvolume.py +2 -2
- tomwer/synctools/stacks/reconstruction/dkrefcopy.py +4 -10
- tomwer/synctools/stacks/reconstruction/nabu.py +2 -2
- tomwer/synctools/stacks/reconstruction/normalization.py +2 -2
- tomwer/synctools/stacks/reconstruction/saaxis.py +2 -2
- tomwer/synctools/stacks/reconstruction/sadeltabeta.py +2 -2
- tomwer/synctools/test/test_darkRefs.py +7 -58
- tomwer/synctools/test/test_foldertransfer.py +6 -6
- tomwer/synctools/utils/scanstages.py +6 -6
- tomwer/tests/conftest.py +34 -0
- tomwer/tests/datasets.py +13 -0
- tomwer/tests/test_scripts.py +92 -39
- tomwer/tests/utils.py +5 -0
- tomwer/version.py +3 -3
- {tomwer-1.2.9.dist-info → tomwer-1.3.0a0.dist-info}/METADATA +39 -39
- {tomwer-1.2.9.dist-info → tomwer-1.3.0a0.dist-info}/RECORD +248 -209
- tomwer/resources/gui/icons/esrf_1.svg +0 -307
- tomwer/resources/gui/icons/triangle.svg +0 -80
- tomwer/synctools/test/test_scanstages.py +0 -162
- tomwer/tests/utils/__init__.py +0 -247
- tomwer/tests/utils/utilstest.py +0 -220
- /tomwer/app/{saaxis.py → multicor.py} +0 -0
- /tomwer/app/{sadeltabeta.py → multipag.py} +0 -0
- /tomwer/core/process/control/{email.py → emailnotifier.py} +0 -0
- /tomwer-1.2.9-py3.11-nspkg.pth → /tomwer-1.3.0a0-py3.11-nspkg.pth +0 -0
- {tomwer-1.2.9.dist-info → tomwer-1.3.0a0.dist-info}/LICENSE +0 -0
- {tomwer-1.2.9.dist-info → tomwer-1.3.0a0.dist-info}/WHEEL +0 -0
- {tomwer-1.2.9.dist-info → tomwer-1.3.0a0.dist-info}/entry_points.txt +0 -0
- {tomwer-1.2.9.dist-info → tomwer-1.3.0a0.dist-info}/namespace_packages.txt +0 -0
- {tomwer-1.2.9.dist-info → tomwer-1.3.0a0.dist-info}/top_level.txt +0 -0
tomwer/gui/control/datalist.py
CHANGED
@@ -39,11 +39,11 @@ from silx.gui import qt
|
|
39
39
|
|
40
40
|
from tomoscan.esrf.volume.utils import guess_volumes
|
41
41
|
from tomoscan.identifier import BaseIdentifier
|
42
|
-
from tomoscan.esrf.identifier.hdf5Identifier import
|
42
|
+
from tomoscan.esrf.identifier.hdf5Identifier import NXtomoScanIdentifier
|
43
43
|
|
44
44
|
from tomwer.core.scan.blissscan import BlissScan
|
45
45
|
from tomwer.core.scan.edfscan import EDFTomoScan
|
46
|
-
from tomwer.core.scan.
|
46
|
+
from tomwer.core.scan.nxtomoscan import NXtomoScan
|
47
47
|
from tomwer.core.scan.scanfactory import ScanFactory
|
48
48
|
from tomwer.core.tomwer_object import TomwerObject
|
49
49
|
from tomwer.core.volume.volumefactory import VolumeFactory
|
@@ -56,6 +56,8 @@ from tomwer.gui.utils.inputwidget import (
|
|
56
56
|
NXTomomillOutputDirSelector,
|
57
57
|
)
|
58
58
|
from tomwer.gui.utils.qt_utils import block_signals
|
59
|
+
from tomwer.gui.control.tomoobjdisplaymode import DisplayMode
|
60
|
+
from tomwer.gui.control.actions import TomoObjDisplayModeToolButton
|
59
61
|
|
60
62
|
logger = logging.getLogger(__name__)
|
61
63
|
|
@@ -251,7 +253,8 @@ class BlissHDF5DataListDialog(_DataListDialog):
|
|
251
253
|
added_scans = []
|
252
254
|
for file_ in filesSelected:
|
253
255
|
added_scans = self.add(file_)
|
254
|
-
|
256
|
+
if added_scans is None:
|
257
|
+
continue
|
255
258
|
added_scans.extend(added_scans)
|
256
259
|
super()._callbackAddPath()
|
257
260
|
self.datalist.setMySelection(added_scans)
|
@@ -331,6 +334,10 @@ class _RawDataListMainWindow(qt.QMainWindow):
|
|
331
334
|
toolbar.addAction(self._parametersAction)
|
332
335
|
self._parametersAction.triggered.connect(self._parametersTriggered)
|
333
336
|
|
337
|
+
# add tomo obj display mode
|
338
|
+
self._tomoObjdisplayAction = TomoObjDisplayModeToolButton(self)
|
339
|
+
toolbar.addWidget(self._tomoObjdisplayAction)
|
340
|
+
|
334
341
|
# toolbar spacer
|
335
342
|
spacer = qt.QWidget(toolbar)
|
336
343
|
spacer.setSizePolicy(qt.QSizePolicy.Expanding, qt.QSizePolicy.Minimum)
|
@@ -351,8 +358,12 @@ class _RawDataListMainWindow(qt.QMainWindow):
|
|
351
358
|
|
352
359
|
# connect signal / slot
|
353
360
|
self._dialog.sigConfigFileChanged.connect(self._cfgFileChanged)
|
354
|
-
self._dialog.sigOutputdirChanged.connect(self.
|
355
|
-
self._widget.sigUpdated.connect(self.
|
361
|
+
self._dialog.sigOutputdirChanged.connect(self.sigUpdated)
|
362
|
+
self._widget.sigUpdated.connect(self.sigUpdated)
|
363
|
+
self._tomoObjdisplayAction.sigDisplayModeChanged.connect(self.setDisplayMode)
|
364
|
+
|
365
|
+
def setDisplayMode(self, *args, **kwargs):
|
366
|
+
self.datalist.setDisplayMode(*args, **kwargs)
|
356
367
|
|
357
368
|
def getOutputFolder(self):
|
358
369
|
return self._dialog.getOutputFolder()
|
@@ -360,9 +371,6 @@ class _RawDataListMainWindow(qt.QMainWindow):
|
|
360
371
|
def setOutputFolder(self, output_dir):
|
361
372
|
self._dialog.setOutputDialog(output_dir)
|
362
373
|
|
363
|
-
def _propagateUpdateSignal(self):
|
364
|
-
self.sigUpdated.emit()
|
365
|
-
|
366
374
|
def _parametersTriggered(self):
|
367
375
|
self._dialog.show()
|
368
376
|
self._dialog.raise_()
|
@@ -516,6 +524,44 @@ class GenericScanListDialog(_DataListDialog):
|
|
516
524
|
self.datalist.setMySelection(added_scans)
|
517
525
|
|
518
526
|
|
527
|
+
class GenericScanListWindow(qt.QMainWindow):
|
528
|
+
def __init__(self, parent=None) -> None:
|
529
|
+
super().__init__(parent)
|
530
|
+
self.setWindowFlags(qt.Qt.Widget)
|
531
|
+
|
532
|
+
self._widget = GenericScanListDialog()
|
533
|
+
self.datalist = self._widget.datalist
|
534
|
+
self.setCentralWidget(self._widget)
|
535
|
+
|
536
|
+
# toolbar
|
537
|
+
toolbar = qt.QToolBar()
|
538
|
+
toolbar.setMovable(False)
|
539
|
+
toolbar.setFloatable(False)
|
540
|
+
self.addToolBar(qt.Qt.TopToolBarArea, toolbar)
|
541
|
+
|
542
|
+
tomoObjdisplayAction = TomoObjDisplayModeToolButton(self)
|
543
|
+
toolbar.addWidget(tomoObjdisplayAction)
|
544
|
+
|
545
|
+
# set up
|
546
|
+
self.setDisplayMode(DisplayMode.SHORT)
|
547
|
+
|
548
|
+
# expose API
|
549
|
+
self.sigUpdated = self._widget.sigUpdated
|
550
|
+
|
551
|
+
# connect signal / slot
|
552
|
+
tomoObjdisplayAction.sigDisplayModeChanged.connect(self.setDisplayMode)
|
553
|
+
|
554
|
+
def setDisplayMode(self, display_mode: DisplayMode):
|
555
|
+
self.datalist.setDisplayMode(display_mode)
|
556
|
+
|
557
|
+
# expose API
|
558
|
+
def n_scan(self):
|
559
|
+
return self._widget.n_scan()
|
560
|
+
|
561
|
+
def add(self, *args, **kwargs):
|
562
|
+
self._widget.add(*args, **kwargs)
|
563
|
+
|
564
|
+
|
519
565
|
class VolumeListDialog(_DataListDialog):
|
520
566
|
"""Dialog used to load EDFScan or HEDF5 scans"""
|
521
567
|
|
@@ -574,13 +620,19 @@ class _TomwerObjectList(qt.QTableWidget):
|
|
574
620
|
self.menu.addAction(self._copyAction)
|
575
621
|
self.menu.addAction(self._pasteAction)
|
576
622
|
|
623
|
+
self.setDisplayMode(DisplayMode.SHORT)
|
624
|
+
|
625
|
+
def setDisplayMode(self, mode: DisplayMode) -> None:
|
626
|
+
self._displayMode = DisplayMode.from_value(mode)
|
627
|
+
self._update()
|
628
|
+
|
577
629
|
def n_data(self):
|
578
630
|
return len(self._myitems)
|
579
631
|
|
580
632
|
def remove_item(self, item):
|
581
633
|
"""Remove a given folder"""
|
582
634
|
try:
|
583
|
-
del self._myitems[item.
|
635
|
+
del self._myitems[item.data(qt.Qt.UserRole).get_identifier().to_str()]
|
584
636
|
except RuntimeError:
|
585
637
|
# look like this could failed on some Qt or PyQt version (see issue 802)
|
586
638
|
# no much that we can do so ignore it.
|
@@ -672,8 +724,8 @@ class _TomwerObjectList(qt.QTableWidget):
|
|
672
724
|
raise TypeError(
|
673
725
|
f"is expected to be an instance of str or of {TomwerObject} but {type(obj)}"
|
674
726
|
)
|
675
|
-
identifier_as_str = obj.get_identifier().to_str()
|
676
727
|
|
728
|
+
identifier_as_str = obj.get_identifier().to_str()
|
677
729
|
if identifier_as_str in self._myitems:
|
678
730
|
# in this case we will update the value. Because if the same identifier already exists at launch time
|
679
731
|
# it will create two different objects that could be an issue.
|
@@ -694,14 +746,24 @@ class _TomwerObjectList(qt.QTableWidget):
|
|
694
746
|
return (obj,)
|
695
747
|
|
696
748
|
def getTextToDisplay(self, obj: TomwerObject):
|
697
|
-
|
749
|
+
if self._displayMode is DisplayMode.SHORT:
|
750
|
+
return obj.get_identifier().short_description()
|
751
|
+
elif self._displayMode is DisplayMode.URL:
|
752
|
+
return obj.get_identifier().to_str()
|
753
|
+
else:
|
754
|
+
raise ValueError(
|
755
|
+
f"Requested display mode {self._displayMode} is not handled"
|
756
|
+
)
|
698
757
|
|
699
758
|
def setMySelection(self, datasets: tuple):
|
700
759
|
if datasets is None:
|
701
760
|
datasets = tuple()
|
702
761
|
for row in range(self.rowCount()):
|
703
762
|
item = self.item(row, 0)
|
704
|
-
select_it =
|
763
|
+
select_it = (
|
764
|
+
item.data(qt.Qt.UserRole).get_identifier().to_str() in datasets
|
765
|
+
or item.text() in datasets
|
766
|
+
)
|
705
767
|
item.setSelected(select_it)
|
706
768
|
|
707
769
|
def clear(self):
|
@@ -795,7 +857,7 @@ class _TomwerObjectList(qt.QTableWidget):
|
|
795
857
|
class GenericScanList(_TomwerObjectList):
|
796
858
|
"""Data list able to manage directories (EDF/HDF5?) or files (HDF5)"""
|
797
859
|
|
798
|
-
HEADER_NAMES = ("
|
860
|
+
HEADER_NAMES = ("dataset",)
|
799
861
|
|
800
862
|
def _getTomoObject(self, obj: str, allow_several: bool = False):
|
801
863
|
"""
|
@@ -869,7 +931,7 @@ class BlissScanList(_TomwerObjectList):
|
|
869
931
|
types = qt.QMessageBox.Ok | qt.QMessageBox.Cancel
|
870
932
|
msg.setStandardButtons(types)
|
871
933
|
|
872
|
-
if
|
934
|
+
if NXtomoScan.is_nexus_nxtomo_file(data):
|
873
935
|
text = (
|
874
936
|
f"The input file `{data}` seems to contain `NXTomo` entries. "
|
875
937
|
"and no valid `Bliss` valid entry. \n"
|
@@ -896,12 +958,12 @@ class BlissScanList(_TomwerObjectList):
|
|
896
958
|
else:
|
897
959
|
file_path = data
|
898
960
|
else:
|
899
|
-
identifier =
|
961
|
+
identifier = NXtomoScanIdentifier.from_str(data)
|
900
962
|
possible_entries.append(identifier.data_path)
|
901
963
|
file_path = identifier.file_path
|
902
964
|
created_scans = []
|
903
965
|
for entry in possible_entries:
|
904
|
-
scan =
|
966
|
+
scan = NXtomoScan(scan=file_path, entry=entry)
|
905
967
|
scan_objs = super().add(scan)
|
906
968
|
if scan_objs is not None:
|
907
969
|
for scan_obj in scan_objs:
|
@@ -125,10 +125,10 @@ class DataListenerWidget(qt.QMainWindow):
|
|
125
125
|
|
126
126
|
# signal / slot connection
|
127
127
|
self._actionGroup.triggered.connect(self._updateCentralWidget)
|
128
|
-
self._controlWidget.sigActivated.connect(self.
|
129
|
-
self._controlWidget.sigDeactivated.connect(self.
|
130
|
-
self._configWindow.sigConfigurationChanged.connect(self.
|
131
|
-
self._configWindow.sigCFGFileChanged.connect(self.
|
128
|
+
self._controlWidget.sigActivated.connect(self.sigActivate)
|
129
|
+
self._controlWidget.sigDeactivated.connect(self.sigDeactivate)
|
130
|
+
self._configWindow.sigConfigurationChanged.connect(self.sigConfigurationChanged)
|
131
|
+
self._configWindow.sigCFGFileChanged.connect(self.sigCFGFileChanged)
|
132
132
|
|
133
133
|
# expose api
|
134
134
|
self.activate = self._controlWidget.activate
|
@@ -171,18 +171,6 @@ class DataListenerWidget(qt.QMainWindow):
|
|
171
171
|
self._listener().sigScanAdded.disconnect(self._acquisitionUpdated)
|
172
172
|
self._listener().sigAcquisitionEnded.disconnect(self._acquisitionEnded)
|
173
173
|
|
174
|
-
def _activated(self):
|
175
|
-
self.sigActivate.emit()
|
176
|
-
|
177
|
-
def _deactivated(self):
|
178
|
-
self.sigDeactivate.emit()
|
179
|
-
|
180
|
-
def _configChanged(self):
|
181
|
-
self.sigConfigurationChanged.emit()
|
182
|
-
|
183
|
-
def _cfgFileChanged(self, cfg_file):
|
184
|
-
self.sigCFGFileChanged.emit(cfg_file)
|
185
|
-
|
186
174
|
def _updateCentralWidget(self, action_triggered):
|
187
175
|
action_to_widget = {
|
188
176
|
self._controlAction: self._controlWidget,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from typing import Optional
|
2
2
|
from silx.gui import qt
|
3
3
|
from tomwer.gui import icons as tomwericons
|
4
|
-
from tomwer.core.utils import concatenate_dict
|
4
|
+
from tomwer.core.utils.dictutils import concatenate_dict
|
5
5
|
|
6
6
|
|
7
7
|
class EmailComposition(qt.QWidget):
|
@@ -59,13 +59,10 @@ class EmailComposition(qt.QWidget):
|
|
59
59
|
self.layout().addRow(self._textQLE)
|
60
60
|
|
61
61
|
# connect signal / slot
|
62
|
-
self._fromAddressesQLE.editingFinished.connect(self.
|
63
|
-
self._toAdressesQLE.editingFinished.connect(self.
|
64
|
-
self._subjectQLE.editingFinished.connect(self.
|
65
|
-
self._textQLE.textChanged.connect(self.
|
66
|
-
|
67
|
-
def _changed(self):
|
68
|
-
self.sigChanged.emit()
|
62
|
+
self._fromAddressesQLE.editingFinished.connect(self.sigChanged)
|
63
|
+
self._toAdressesQLE.editingFinished.connect(self.sigChanged)
|
64
|
+
self._subjectQLE.editingFinished.connect(self.sigChanged)
|
65
|
+
self._textQLE.textChanged.connect(self.sigChanged)
|
69
66
|
|
70
67
|
def getToAddrs(self) -> tuple:
|
71
68
|
adresses = self._toAdressesQLE.text().replace(" ", "")
|
@@ -118,11 +115,8 @@ class EmailSettings(qt.QWidget):
|
|
118
115
|
self.layout().addRow("port", self._portQLE)
|
119
116
|
|
120
117
|
# connect signal / slot
|
121
|
-
self._hostQLE.editingFinished.connect(self.
|
122
|
-
self._portQLE.editingFinished.connect(self.
|
123
|
-
|
124
|
-
def _changed(self):
|
125
|
-
self.sigChanged.emit()
|
118
|
+
self._hostQLE.editingFinished.connect(self.sigChanged)
|
119
|
+
self._portQLE.editingFinished.connect(self.sigChanged)
|
126
120
|
|
127
121
|
def getConfiguration(self) -> dict:
|
128
122
|
return {"host": self._hostQLE.text(), "port": int(self._portQLE.text())}
|
@@ -166,11 +160,8 @@ class Emailwidget(qt.QTabWidget):
|
|
166
160
|
)
|
167
161
|
|
168
162
|
# connect signal / slot
|
169
|
-
self._compositionWidget.sigChanged.connect(self.
|
170
|
-
self._serverSettingsWidget.sigChanged.connect(self.
|
171
|
-
|
172
|
-
def _changed(self):
|
173
|
-
self.sigChanged.emit()
|
163
|
+
self._compositionWidget.sigChanged.connect(self.sigChanged)
|
164
|
+
self._serverSettingsWidget.sigChanged.connect(self.sigChanged)
|
174
165
|
|
175
166
|
def getConfiguration(self) -> dict:
|
176
167
|
return concatenate_dict(
|
tomwer/gui/control/history.py
CHANGED
@@ -32,7 +32,7 @@ from operator import itemgetter
|
|
32
32
|
|
33
33
|
from silx.gui import qt
|
34
34
|
|
35
|
-
from tomwer.core.scan.
|
35
|
+
from tomwer.core.scan.nxtomoscan import NXtomoScan
|
36
36
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
37
37
|
|
38
38
|
|
@@ -120,7 +120,7 @@ class _FoundScanModel(qt.QAbstractTableModel):
|
|
120
120
|
return path.type
|
121
121
|
elif isinstance(path, str) and path.startswith("hdf5 scan"):
|
122
122
|
return "hdf5"
|
123
|
-
elif
|
123
|
+
elif NXtomoScan.directory_contains_scan(path) or "@" in path:
|
124
124
|
return "hdf5"
|
125
125
|
else:
|
126
126
|
return "edf"
|
@@ -35,7 +35,7 @@ from collections import OrderedDict
|
|
35
35
|
from silx.gui import qt
|
36
36
|
|
37
37
|
from tomwer.core.scan.blissscan import BlissScan
|
38
|
-
from tomwer.core.scan.
|
38
|
+
from tomwer.core.scan.nxtomoscan import NXtomoScan
|
39
39
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
40
40
|
|
41
41
|
|
@@ -206,7 +206,7 @@ class _ObservedScanModel(qt.QAbstractTableModel):
|
|
206
206
|
return obs.type
|
207
207
|
elif isinstance(obs, BlissScan):
|
208
208
|
return "hdf5"
|
209
|
-
elif
|
209
|
+
elif NXtomoScan.directory_contains_scan(directory=obs):
|
210
210
|
return "hdf5"
|
211
211
|
else:
|
212
212
|
return "edf"
|
@@ -11,7 +11,7 @@ from silx.io.url import DataUrl
|
|
11
11
|
from silx.gui.dialog.DataFileDialog import DataFileDialog
|
12
12
|
|
13
13
|
from tomoscan.esrf.scan.utils import cwd_context
|
14
|
-
from tomoscan.
|
14
|
+
from tomoscan.framereducer.target import REDUCER_TARGET
|
15
15
|
from tomoscan.io import HDF5File
|
16
16
|
|
17
17
|
from tomwer.io.utils import get_default_directory
|
@@ -3,11 +3,13 @@ import logging
|
|
3
3
|
from silx.gui import qt
|
4
4
|
|
5
5
|
from tomwer.gui.utils.qt_utils import block_signals
|
6
|
+
from tomwer.gui.control.actions import TomoObjDisplayModeToolButton
|
7
|
+
from tomwer.gui.control.tomoobjdisplaymode import DisplayMode
|
6
8
|
|
7
9
|
_logger = logging.getLogger(__name__)
|
8
10
|
|
9
11
|
|
10
|
-
class _SelectorWidget(qt.
|
12
|
+
class _SelectorWidget(qt.QMainWindow):
|
11
13
|
"""widget used to select a dataset on a list (a scan or a volume for now)"""
|
12
14
|
|
13
15
|
sigSelectionChanged = qt.Signal(list)
|
@@ -17,18 +19,38 @@ class _SelectorWidget(qt.QWidget):
|
|
17
19
|
"""signal emitted when the scan list change"""
|
18
20
|
|
19
21
|
def __init__(self, parent=None):
|
20
|
-
qt.
|
21
|
-
|
22
|
+
qt.QMainWindow.__init__(self, parent)
|
23
|
+
# widget
|
24
|
+
self._mainWidget = qt.QWidget(self)
|
25
|
+
self._mainWidget.setLayout(qt.QVBoxLayout())
|
22
26
|
self.dataList = self._buildDataList()
|
23
27
|
self.dataList.setSelectionMode(qt.QAbstractItemView.ExtendedSelection)
|
24
|
-
self.layout().addWidget(self.dataList)
|
25
|
-
self.layout().addWidget(self._getAddAndRmButtons())
|
26
|
-
self.layout().addWidget(self._getSendButtons())
|
28
|
+
self._mainWidget.layout().addWidget(self.dataList)
|
29
|
+
self._mainWidget.layout().addWidget(self._getAddAndRmButtons())
|
30
|
+
self._mainWidget.layout().addWidget(self._getSendButtons())
|
31
|
+
self._mainWidget.setAcceptDrops(True)
|
27
32
|
self.setAcceptDrops(True)
|
33
|
+
self.setCentralWidget(self._mainWidget)
|
34
|
+
|
35
|
+
# toolbar
|
36
|
+
toolbar = qt.QToolBar()
|
37
|
+
toolbar.setMovable(False)
|
38
|
+
toolbar.setFloatable(False)
|
39
|
+
self.addToolBar(qt.Qt.TopToolBarArea, toolbar)
|
40
|
+
|
41
|
+
tomoObjdisplayAction = TomoObjDisplayModeToolButton(self)
|
42
|
+
toolbar.addWidget(tomoObjdisplayAction)
|
43
|
+
|
44
|
+
# set up
|
45
|
+
self.setDisplayMode(DisplayMode.SHORT)
|
28
46
|
|
29
47
|
# connect signal / slot
|
30
48
|
# for drag / drop we need to have an indirect call to the sigUpdated
|
31
49
|
self.dataList.listChanged.connect(self._updatedFromDragDrop)
|
50
|
+
tomoObjdisplayAction.sigDisplayModeChanged.connect(self.setDisplayMode)
|
51
|
+
|
52
|
+
def setDisplayMode(self, *args, **kwargs):
|
53
|
+
self.dataList.setDisplayMode(*args, **kwargs)
|
32
54
|
|
33
55
|
def _updatedFromDragDrop(self, *args, **kwargs):
|
34
56
|
self.sigUpdated.emit()
|
@@ -99,7 +121,9 @@ class _SelectorWidget(qt.QWidget):
|
|
99
121
|
def _selectActiveData(self):
|
100
122
|
sItem = self.dataList.selectedItems()
|
101
123
|
if sItem and len(sItem) >= 1:
|
102
|
-
selection = [
|
124
|
+
selection = [
|
125
|
+
_item.data(qt.Qt.UserRole).get_identifier().to_str() for _item in sItem
|
126
|
+
]
|
103
127
|
self.sigSelectionChanged.emit(list(selection))
|
104
128
|
else:
|
105
129
|
_logger.warning("No active scan detected")
|
@@ -112,7 +136,10 @@ class _SelectorWidget(qt.QWidget):
|
|
112
136
|
def _callbackRemoveSelectedDatasets(self):
|
113
137
|
""" """
|
114
138
|
selected_items = self.dataList.selectedItems()
|
115
|
-
tomwer_objs_to_remove = [
|
139
|
+
tomwer_objs_to_remove = [
|
140
|
+
item.data(qt.Qt.UserRole).get_identifier().to_str()
|
141
|
+
for item in selected_items
|
142
|
+
]
|
116
143
|
for tomwer_obj in tomwer_objs_to_remove:
|
117
144
|
self.remove(tomwer_obj)
|
118
145
|
self.sigUpdated.emit()
|
@@ -129,7 +156,7 @@ class _SelectorWidget(qt.QWidget):
|
|
129
156
|
|
130
157
|
def removeSelectedDatasets(self):
|
131
158
|
sItem = self.dataList.selectedItems()
|
132
|
-
selection = [_item.text() for _item in sItem]
|
159
|
+
selection = [_item.text().get_identifier().to_str() for _item in sItem]
|
133
160
|
|
134
161
|
with block_signals(self):
|
135
162
|
# make sure sigUpdated is called only once.
|
@@ -107,10 +107,10 @@ class SerieWidget(qt.QTabWidget):
|
|
107
107
|
|
108
108
|
# conenct signal / slot
|
109
109
|
self._historyWidget.sigEditSerie.connect(self._serieEditionRequested)
|
110
|
-
self._historyWidget.sigSerieSend.connect(self.
|
110
|
+
self._historyWidget.sigSerieSend.connect(self.sigSerieSend)
|
111
111
|
self._historyWidget.sigHistoryUpdated.connect(self._repeatHistoryUpdated)
|
112
112
|
self._serieDefinitionWidget.sigSerieChanged.connect(self._repeatSerieChanged)
|
113
|
-
self._serieDefinitionWidget.sigSerieSend.connect(self.
|
113
|
+
self._serieDefinitionWidget.sigSerieSend.connect(self.sigSerieSend)
|
114
114
|
self._serieDefinitionWidget.sigSerieSend.connect(self._historyWidget.addSerie)
|
115
115
|
|
116
116
|
def getHistoryWidget(self):
|
@@ -143,9 +143,6 @@ class SerieWidget(qt.QTabWidget):
|
|
143
143
|
def _repeatSerieChanged(self, *args, **kwargs):
|
144
144
|
self.sigCurrentSerieChanged.emit()
|
145
145
|
|
146
|
-
def _repeatSerieSend(self, serie: Serie):
|
147
|
-
self.sigSerieSend.emit(serie)
|
148
|
-
|
149
146
|
def _repeatHistoryUpdated(self, *args, **kwargs):
|
150
147
|
self.sigHistoryChanged.emit()
|
151
148
|
|
@@ -186,9 +183,7 @@ class SerieDefinition(qt.QWidget):
|
|
186
183
|
|
187
184
|
# connect signal / slot
|
188
185
|
self._modeCB.currentIndexChanged.connect(self._updateVisibility)
|
189
|
-
self._manualDefWidget._newSerieWidget.sigUpdated.connect(
|
190
|
-
self._repeatSerieChanged
|
191
|
-
)
|
186
|
+
self._manualDefWidget._newSerieWidget.sigUpdated.connect(self.sigSerieChanged)
|
192
187
|
|
193
188
|
# set up
|
194
189
|
self._updateVisibility()
|
@@ -217,12 +212,6 @@ class SerieDefinition(qt.QWidget):
|
|
217
212
|
def getAutoDefinitionWidget(self):
|
218
213
|
return self._automaticDefWidget
|
219
214
|
|
220
|
-
def _repeatSerieChanged(self, *args, **kwargs):
|
221
|
-
self.sigSerieChanged.emit()
|
222
|
-
|
223
|
-
def _repeatSerieSend(self, serie: Serie):
|
224
|
-
self.sigSerieSend.emit(serie)
|
225
|
-
|
226
215
|
def createManualSerie(self):
|
227
216
|
self._manualDefWidget.createSerie()
|
228
217
|
|
@@ -651,7 +640,7 @@ class NewSerieWidget(qt.QWidget):
|
|
651
640
|
|
652
641
|
# Signal / slot connection
|
653
642
|
self._serieTree.itemChanged.connect(self._handleItemUpdate)
|
654
|
-
self._serieTree.sigUpdated.connect(self.
|
643
|
+
self._serieTree.sigUpdated.connect(self.sigUpdated)
|
655
644
|
self._nameQLE.textChanged.connect(self._nameChangedOnQLE)
|
656
645
|
|
657
646
|
def setSerie(self, serie: Serie) -> None:
|
@@ -674,9 +663,6 @@ class NewSerieWidget(qt.QWidget):
|
|
674
663
|
self.blockSignals(old)
|
675
664
|
self.sigUpdated.emit()
|
676
665
|
|
677
|
-
def _repeatUpdateSignal(self):
|
678
|
-
self.sigUpdated.emit()
|
679
|
-
|
680
666
|
def addTomoObjToCurrentSerie(self, tomo_obj: TomwerObject):
|
681
667
|
assert isinstance(
|
682
668
|
tomo_obj, TomwerObject
|
@@ -726,7 +712,7 @@ class SerieManualDefinitionDialog(qt.QDialog):
|
|
726
712
|
|
727
713
|
# connect signal / slot
|
728
714
|
self._newSerieWidget.sigNameChanged.connect(self._nameChanged)
|
729
|
-
self._newSerieWidget.sigUpdated.connect(self.
|
715
|
+
self._newSerieWidget.sigUpdated.connect(self.sigUpdated)
|
730
716
|
self._addScanButton.clicked.connect(self.addScanFromFileDialog)
|
731
717
|
self._removeSelectedButton.clicked.connect(self.removeSelectedTomoObjs)
|
732
718
|
self._clearButton.clicked.connect(self.clearSerie)
|
@@ -742,9 +728,6 @@ class SerieManualDefinitionDialog(qt.QDialog):
|
|
742
728
|
serieTree.setSerieName(name=new_name)
|
743
729
|
self.sigUpdated.emit()
|
744
730
|
|
745
|
-
def _repeatUpdateSignal(self):
|
746
|
-
self.sigUpdated.emit()
|
747
|
-
|
748
731
|
def setSerieName(self, name: str):
|
749
732
|
self._newSerieWidget.setSerieName(name=name)
|
750
733
|
|
@@ -37,7 +37,8 @@ import time
|
|
37
37
|
import pytest
|
38
38
|
from silx.gui.utils.testutils import TestCaseQt
|
39
39
|
|
40
|
-
from tomwer.core import settings
|
40
|
+
from tomwer.core import settings
|
41
|
+
from tomwer.core.utils.lbsram import mock_low_memory, is_low_on_memory
|
41
42
|
from tomwer.core.process.control.scanvalidator import ScanValidatorP
|
42
43
|
from tomwer.core.scan.edfscan import EDFTomoScan
|
43
44
|
from tomwer.core.utils.scanutils import MockEDF
|
@@ -57,7 +58,7 @@ class TestScanValidator(TestCaseQt):
|
|
57
58
|
NB_SCANS = 2
|
58
59
|
|
59
60
|
def tearDown(self):
|
60
|
-
|
61
|
+
mock_low_memory(False)
|
61
62
|
|
62
63
|
@classmethod
|
63
64
|
def setUpClass(cls):
|
@@ -81,7 +82,7 @@ class TestScanValidator(TestCaseQt):
|
|
81
82
|
shutil.rmtree(f)
|
82
83
|
|
83
84
|
@pytest.mark.skipif(
|
84
|
-
(settings.isOnLbsram() and
|
85
|
+
(settings.isOnLbsram() and is_low_on_memory(settings.get_lbsram_path())),
|
85
86
|
reason="Lbsram already overloaded",
|
86
87
|
)
|
87
88
|
def testMemoryReleaseLoop(self):
|
@@ -102,11 +103,11 @@ class TestScanValidator(TestCaseQt):
|
|
102
103
|
time.sleep(self.LOOP_MEM_RELEASER_DURATION * 2)
|
103
104
|
|
104
105
|
add_all_scans()
|
105
|
-
|
106
|
+
mock_low_memory(True)
|
106
107
|
my_wait()
|
107
108
|
self.assertEqual(len(self.scanValidator._scans), 0)
|
108
109
|
|
109
|
-
|
110
|
+
mock_low_memory(False)
|
110
111
|
add_all_scans()
|
111
112
|
my_wait()
|
112
113
|
self.assertEqual(len(self.scanValidator._scans), self.NB_SCANS)
|
@@ -5,7 +5,7 @@ import numpy
|
|
5
5
|
from silx.gui import qt
|
6
6
|
from silx.gui.utils.testutils import TestCaseQt
|
7
7
|
|
8
|
-
from tomwer.core.utils.scanutils import
|
8
|
+
from tomwer.core.utils.scanutils import MockNXtomo
|
9
9
|
from tomwer.core.volume.hdf5volume import HDF5Volume
|
10
10
|
from tomwer.gui.control.singletomoobj import SingleTomoObj
|
11
11
|
|
@@ -29,7 +29,7 @@ class TestSingletomoObj(TestCaseQt):
|
|
29
29
|
self.volume.save()
|
30
30
|
|
31
31
|
self._scan_file_path = os.path.join(self._tempdir, "scan.nx")
|
32
|
-
self.scan_hdf5 =
|
32
|
+
self.scan_hdf5 = MockNXtomo(
|
33
33
|
scan_path=self._scan_file_path,
|
34
34
|
n_proj=10,
|
35
35
|
n_ini_proj=10,
|
@@ -34,7 +34,7 @@ from silx.gui import qt
|
|
34
34
|
|
35
35
|
from tomwer.core.scan.blissscan import BlissScan
|
36
36
|
from tomwer.core.scan.edfscan import EDFTomoScan
|
37
|
-
from tomwer.core.scan.
|
37
|
+
from tomwer.core.scan.nxtomoscan import NXtomoScan
|
38
38
|
|
39
39
|
|
40
40
|
class DatasetGeneratorDialog(qt.QDialog):
|
@@ -116,13 +116,13 @@ class DatasetGeneratorConfig(qt.QWidget):
|
|
116
116
|
self._typeCB = qt.QComboBox(self)
|
117
117
|
for _typeClass in (
|
118
118
|
EDFTomoScan,
|
119
|
-
|
119
|
+
NXtomoScan,
|
120
120
|
BlissScan,
|
121
121
|
):
|
122
122
|
self._typeCB.addItem(_typeClass.__name__)
|
123
123
|
self.layout().addWidget(qt.QLabel("type", self), 0, 0, 1, 1)
|
124
124
|
self.layout().addWidget(self._typeCB, 0, 1, 1, 2)
|
125
|
-
txt_index = self._typeCB.findText(
|
125
|
+
txt_index = self._typeCB.findText(NXtomoScan.__name__)
|
126
126
|
self._typeCB.setCurrentIndex(txt_index)
|
127
127
|
|
128
128
|
# generation timeout
|