tomwer 1.2.8__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 -18
- 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.8.dist-info → tomwer-1.3.0a0.dist-info}/METADATA +39 -44
- {tomwer-1.2.8.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.8-py3.11-nspkg.pth → /tomwer-1.3.0a0-py3.11-nspkg.pth +0 -0
- {tomwer-1.2.8.dist-info → tomwer-1.3.0a0.dist-info}/LICENSE +0 -0
- {tomwer-1.2.8.dist-info → tomwer-1.3.0a0.dist-info}/WHEEL +0 -0
- {tomwer-1.2.8.dist-info → tomwer-1.3.0a0.dist-info}/entry_points.txt +0 -0
- {tomwer-1.2.8.dist-info → tomwer-1.3.0a0.dist-info}/namespace_packages.txt +0 -0
- {tomwer-1.2.8.dist-info → tomwer-1.3.0a0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,84 @@
|
|
1
|
+
"""some utils to move a path to process_data or to raw_data"""
|
2
|
+
|
3
|
+
import os
|
4
|
+
from nxtomomill.converter.hdf5.utils import (
|
5
|
+
RAW_DATA_DIR_NAME,
|
6
|
+
PROCESSED_DATA_DIR_NAME,
|
7
|
+
)
|
8
|
+
|
9
|
+
|
10
|
+
def to_raw_data_path(file_path: str):
|
11
|
+
"""convert a path to 'RAW_DATA' when possible"""
|
12
|
+
split_path = file_path.split(os.sep)
|
13
|
+
# reverse it to find the lower level value of 'PROCESSED_DATA_DIR_NAME' if by any 'chance' has several in the path
|
14
|
+
# in this case this is most likely what we want
|
15
|
+
split_path = split_path[::-1]
|
16
|
+
# check if already contain in a "RAW_DATA_DIR_NAME" directory
|
17
|
+
try:
|
18
|
+
index_raw_data = split_path.index(RAW_DATA_DIR_NAME)
|
19
|
+
except ValueError:
|
20
|
+
index_raw_data = None
|
21
|
+
|
22
|
+
try:
|
23
|
+
index_processed_data = split_path.index(PROCESSED_DATA_DIR_NAME)
|
24
|
+
except ValueError:
|
25
|
+
# if the value is not in the list
|
26
|
+
pass
|
27
|
+
else:
|
28
|
+
if index_raw_data is None or index_raw_data > index_processed_data:
|
29
|
+
# make sure we are not already in a 'PROCESSED_DATA' directory. Not sure it will never happen but safer
|
30
|
+
split_path[index_processed_data] = RAW_DATA_DIR_NAME
|
31
|
+
|
32
|
+
# reorder path to original
|
33
|
+
split_path = split_path[::-1]
|
34
|
+
return os.sep.join(split_path)
|
35
|
+
|
36
|
+
|
37
|
+
def to_processed_data_path(file_path: str):
|
38
|
+
"""convert a path to 'PROCESSED_DATA' when possible"""
|
39
|
+
split_path = file_path.split(os.sep)
|
40
|
+
# reverse it to find the lower level value of '_RAW_DATA_DIR_NAME' if by any 'chance' has several in the path
|
41
|
+
# in this case this is most likely what we want
|
42
|
+
split_path = split_path[::-1]
|
43
|
+
# check if already contain in a "PROCESSED_DATA" directory
|
44
|
+
try:
|
45
|
+
index_processed_data = split_path.index(PROCESSED_DATA_DIR_NAME)
|
46
|
+
except ValueError:
|
47
|
+
index_processed_data = None
|
48
|
+
|
49
|
+
try:
|
50
|
+
index_raw_data = split_path.index(RAW_DATA_DIR_NAME)
|
51
|
+
except ValueError:
|
52
|
+
# if the value is not in the list
|
53
|
+
pass
|
54
|
+
else:
|
55
|
+
if index_processed_data is None or index_raw_data < index_processed_data:
|
56
|
+
# make sure we are not already in a 'PROCESSED_DATA' directory. Not sure it will never happen but safer
|
57
|
+
split_path[index_raw_data] = PROCESSED_DATA_DIR_NAME
|
58
|
+
|
59
|
+
# reorder path to original
|
60
|
+
split_path = split_path[::-1]
|
61
|
+
return os.sep.join(split_path)
|
62
|
+
|
63
|
+
|
64
|
+
def file_is_on_processed_data(file_path: str):
|
65
|
+
"""Util that raises an error if path is not in PROCESSED_DATA folder"""
|
66
|
+
split_path = file_path.split(os.sep)
|
67
|
+
# reverse it to find the lower level value of 'PROCESSED_DATA_DIR_NAME' if by any 'chance' has several in the path
|
68
|
+
# in this case this is most likely what we want
|
69
|
+
split_path = split_path[::-1]
|
70
|
+
# check if already contain in a "RAW_DATA_DIR_NAME" directory
|
71
|
+
try:
|
72
|
+
index_raw_data = split_path.index(RAW_DATA_DIR_NAME)
|
73
|
+
except ValueError:
|
74
|
+
index_raw_data = None
|
75
|
+
|
76
|
+
try:
|
77
|
+
index_processed_data = split_path.index(PROCESSED_DATA_DIR_NAME)
|
78
|
+
except ValueError:
|
79
|
+
# if the value is not in the list
|
80
|
+
index_processed_data = None
|
81
|
+
else:
|
82
|
+
if index_raw_data is not None and index_raw_data < index_processed_data:
|
83
|
+
return False
|
84
|
+
return index_processed_data is not None
|
tomwer/io/utils/tomoobj.py
CHANGED
@@ -36,7 +36,7 @@ def get_tomo_objs_instances(tomo_objs: tuple) -> tuple:
|
|
36
36
|
"""
|
37
37
|
instances = []
|
38
38
|
has_scans = False
|
39
|
-
has_vols =
|
39
|
+
has_vols = False
|
40
40
|
for tomo_obj in tomo_objs:
|
41
41
|
|
42
42
|
def get_scans():
|
@@ -45,9 +45,7 @@ def get_tomo_objs_instances(tomo_objs: tuple) -> tuple:
|
|
45
45
|
except Exception:
|
46
46
|
try:
|
47
47
|
return ScanFactory.create_scan_objects(tomo_obj)
|
48
|
-
except Exception
|
49
|
-
raise e
|
50
|
-
print("error is", e)
|
48
|
+
except Exception:
|
51
49
|
return tuple()
|
52
50
|
|
53
51
|
def get_volumes():
|
@@ -68,12 +66,12 @@ def get_tomo_objs_instances(tomo_objs: tuple) -> tuple:
|
|
68
66
|
# we start by scan because they have a 'definition' as NXtomo available.
|
69
67
|
# otherwise we might get some entries defined as scan AND volume...
|
70
68
|
# for stitching we expect users to ask of for one or the other.
|
71
|
-
volumes = get_volumes()
|
69
|
+
volumes = get_volumes() or ()
|
72
70
|
if len(volumes) > 0:
|
73
71
|
has_vols = True
|
74
72
|
instances.extend(volumes)
|
75
73
|
else:
|
76
|
-
has_scans =
|
74
|
+
has_scans = len(scans_found) > 0
|
77
75
|
instances.extend(scans_found)
|
78
76
|
|
79
77
|
return tuple(instances), (has_scans, has_vols)
|
Binary file
|
@@ -0,0 +1,273 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
width="48"
|
6
|
+
height="48"
|
7
|
+
viewBox="0 0 12.7 12.7"
|
8
|
+
version="1.1"
|
9
|
+
id="svg5"
|
10
|
+
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
11
|
+
sodipodi:docname="ruler.svg"
|
12
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
13
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
15
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
16
|
+
<sodipodi:namedview
|
17
|
+
id="namedview7"
|
18
|
+
pagecolor="#ffffff"
|
19
|
+
bordercolor="#000000"
|
20
|
+
borderopacity="0.25"
|
21
|
+
inkscape:showpageshadow="2"
|
22
|
+
inkscape:pageopacity="0.0"
|
23
|
+
inkscape:pagecheckerboard="0"
|
24
|
+
inkscape:deskcolor="#d1d1d1"
|
25
|
+
inkscape:document-units="mm"
|
26
|
+
showgrid="true"
|
27
|
+
inkscape:zoom="6.7277216"
|
28
|
+
inkscape:cx="60.86756"
|
29
|
+
inkscape:cy="-1.635026"
|
30
|
+
inkscape:window-width="1920"
|
31
|
+
inkscape:window-height="1163"
|
32
|
+
inkscape:window-x="1920"
|
33
|
+
inkscape:window-y="0"
|
34
|
+
inkscape:window-maximized="1"
|
35
|
+
inkscape:current-layer="layer1">
|
36
|
+
<inkscape:grid
|
37
|
+
type="xygrid"
|
38
|
+
id="grid3452" />
|
39
|
+
</sodipodi:namedview>
|
40
|
+
<defs
|
41
|
+
id="defs2">
|
42
|
+
<marker
|
43
|
+
style="overflow:visible"
|
44
|
+
id="marker2158"
|
45
|
+
refX="0"
|
46
|
+
refY="0"
|
47
|
+
orient="auto"
|
48
|
+
inkscape:stockid="Dot"
|
49
|
+
markerWidth="1"
|
50
|
+
markerHeight="1"
|
51
|
+
viewBox="0 0 5.6666667 5.6666667"
|
52
|
+
inkscape:isstock="true"
|
53
|
+
inkscape:collect="always"
|
54
|
+
preserveAspectRatio="xMidYMid">
|
55
|
+
<path
|
56
|
+
transform="scale(0.5)"
|
57
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
58
|
+
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
59
|
+
id="path2156"
|
60
|
+
sodipodi:nodetypes="sssss" />
|
61
|
+
</marker>
|
62
|
+
<marker
|
63
|
+
style="overflow:visible"
|
64
|
+
id="Dot"
|
65
|
+
refX="0"
|
66
|
+
refY="0"
|
67
|
+
orient="auto"
|
68
|
+
inkscape:stockid="Dot"
|
69
|
+
markerWidth="1"
|
70
|
+
markerHeight="1"
|
71
|
+
viewBox="0 0 5.6666667 5.6666667"
|
72
|
+
inkscape:isstock="true"
|
73
|
+
inkscape:collect="always"
|
74
|
+
preserveAspectRatio="xMidYMid">
|
75
|
+
<path
|
76
|
+
transform="scale(0.5)"
|
77
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
78
|
+
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
79
|
+
id="Dot1"
|
80
|
+
sodipodi:nodetypes="sssss" />
|
81
|
+
</marker>
|
82
|
+
<marker
|
83
|
+
style="overflow:visible"
|
84
|
+
id="Dot-3"
|
85
|
+
refX="0"
|
86
|
+
refY="0"
|
87
|
+
orient="auto"
|
88
|
+
inkscape:stockid="Dot"
|
89
|
+
markerWidth="1"
|
90
|
+
markerHeight="1"
|
91
|
+
viewBox="0 0 5.6666667 5.6666667"
|
92
|
+
inkscape:isstock="true"
|
93
|
+
inkscape:collect="always"
|
94
|
+
preserveAspectRatio="xMidYMid">
|
95
|
+
<path
|
96
|
+
transform="scale(0.5)"
|
97
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
98
|
+
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
99
|
+
id="Dot1-6"
|
100
|
+
sodipodi:nodetypes="sssss" />
|
101
|
+
</marker>
|
102
|
+
<marker
|
103
|
+
style="overflow:visible"
|
104
|
+
id="Dot-3-5"
|
105
|
+
refX="0"
|
106
|
+
refY="0"
|
107
|
+
orient="auto"
|
108
|
+
inkscape:stockid="Dot"
|
109
|
+
markerWidth="1"
|
110
|
+
markerHeight="1"
|
111
|
+
viewBox="0 0 5.6666667 5.6666667"
|
112
|
+
inkscape:isstock="true"
|
113
|
+
inkscape:collect="always"
|
114
|
+
preserveAspectRatio="xMidYMid">
|
115
|
+
<path
|
116
|
+
transform="scale(0.5)"
|
117
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
118
|
+
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
119
|
+
id="Dot1-6-3"
|
120
|
+
sodipodi:nodetypes="sssss" />
|
121
|
+
</marker>
|
122
|
+
<marker
|
123
|
+
style="overflow:visible"
|
124
|
+
id="marker2158-6"
|
125
|
+
refX="0"
|
126
|
+
refY="0"
|
127
|
+
orient="auto"
|
128
|
+
inkscape:stockid="Dot"
|
129
|
+
markerWidth="1"
|
130
|
+
markerHeight="1"
|
131
|
+
viewBox="0 0 5.6666667 5.6666667"
|
132
|
+
inkscape:isstock="true"
|
133
|
+
inkscape:collect="always"
|
134
|
+
preserveAspectRatio="xMidYMid">
|
135
|
+
<path
|
136
|
+
transform="scale(0.5)"
|
137
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
138
|
+
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
139
|
+
id="path2156-2"
|
140
|
+
sodipodi:nodetypes="sssss" />
|
141
|
+
</marker>
|
142
|
+
<marker
|
143
|
+
style="overflow:visible"
|
144
|
+
id="Dot-3-5-1"
|
145
|
+
refX="0"
|
146
|
+
refY="0"
|
147
|
+
orient="auto"
|
148
|
+
inkscape:stockid="Dot"
|
149
|
+
markerWidth="1"
|
150
|
+
markerHeight="1"
|
151
|
+
viewBox="0 0 5.6666667 5.6666667"
|
152
|
+
inkscape:isstock="true"
|
153
|
+
inkscape:collect="always"
|
154
|
+
preserveAspectRatio="xMidYMid">
|
155
|
+
<path
|
156
|
+
transform="scale(0.5)"
|
157
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
158
|
+
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
159
|
+
id="Dot1-6-3-2"
|
160
|
+
sodipodi:nodetypes="sssss" />
|
161
|
+
</marker>
|
162
|
+
<marker
|
163
|
+
style="overflow:visible"
|
164
|
+
id="marker2158-6-0"
|
165
|
+
refX="0"
|
166
|
+
refY="0"
|
167
|
+
orient="auto"
|
168
|
+
inkscape:stockid="Dot"
|
169
|
+
markerWidth="1"
|
170
|
+
markerHeight="1"
|
171
|
+
viewBox="0 0 5.6666667 5.6666667"
|
172
|
+
inkscape:isstock="true"
|
173
|
+
inkscape:collect="always"
|
174
|
+
preserveAspectRatio="xMidYMid">
|
175
|
+
<path
|
176
|
+
transform="scale(0.5)"
|
177
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
178
|
+
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
179
|
+
id="path2156-2-9"
|
180
|
+
sodipodi:nodetypes="sssss" />
|
181
|
+
</marker>
|
182
|
+
<marker
|
183
|
+
style="overflow:visible"
|
184
|
+
id="marker2158-6-6"
|
185
|
+
refX="0"
|
186
|
+
refY="0"
|
187
|
+
orient="auto"
|
188
|
+
inkscape:stockid="Dot"
|
189
|
+
markerWidth="1"
|
190
|
+
markerHeight="1"
|
191
|
+
viewBox="0 0 5.6666667 5.6666667"
|
192
|
+
inkscape:isstock="true"
|
193
|
+
inkscape:collect="always"
|
194
|
+
preserveAspectRatio="xMidYMid">
|
195
|
+
<path
|
196
|
+
transform="scale(0.5)"
|
197
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
198
|
+
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
199
|
+
id="path2156-2-0"
|
200
|
+
sodipodi:nodetypes="sssss" />
|
201
|
+
</marker>
|
202
|
+
<marker
|
203
|
+
style="overflow:visible"
|
204
|
+
id="Dot-3-5-1-2"
|
205
|
+
refX="0"
|
206
|
+
refY="0"
|
207
|
+
orient="auto"
|
208
|
+
inkscape:stockid="Dot"
|
209
|
+
markerWidth="1"
|
210
|
+
markerHeight="1"
|
211
|
+
viewBox="0 0 5.6666667 5.6666667"
|
212
|
+
inkscape:isstock="true"
|
213
|
+
inkscape:collect="always"
|
214
|
+
preserveAspectRatio="xMidYMid">
|
215
|
+
<path
|
216
|
+
transform="scale(0.5)"
|
217
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
218
|
+
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
219
|
+
id="Dot1-6-3-2-6"
|
220
|
+
sodipodi:nodetypes="sssss" />
|
221
|
+
</marker>
|
222
|
+
</defs>
|
223
|
+
<g
|
224
|
+
inkscape:label="Layer 1"
|
225
|
+
inkscape:groupmode="layer"
|
226
|
+
id="layer1">
|
227
|
+
<rect
|
228
|
+
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1"
|
229
|
+
id="rect234"
|
230
|
+
width="2.2563748"
|
231
|
+
height="13.271752"
|
232
|
+
x="7.9736362"
|
233
|
+
y="-6.5288706"
|
234
|
+
ry="0.33685613"
|
235
|
+
transform="rotate(44.246507)" />
|
236
|
+
<path
|
237
|
+
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot)"
|
238
|
+
d="M 3.7284007,10.909518 2.6226078,9.821972"
|
239
|
+
id="path1741" />
|
240
|
+
<path
|
241
|
+
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2158)"
|
242
|
+
d="M 4.5846537,9.9373806 4.0595052,9.4357496"
|
243
|
+
id="path1743" />
|
244
|
+
<path
|
245
|
+
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot-3)"
|
246
|
+
d="M 5.6609211,9.076106 4.5551282,7.98856"
|
247
|
+
id="path1741-7" />
|
248
|
+
<path
|
249
|
+
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot-3-5)"
|
250
|
+
d="M 7.3190237,7.3712884 6.2132308,6.2837424"
|
251
|
+
id="path1741-7-5" />
|
252
|
+
<path
|
253
|
+
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot-3-5-1)"
|
254
|
+
d="M 9.0589949,5.663934 7.9532027,4.576388"
|
255
|
+
id="path1741-7-5-7" />
|
256
|
+
<path
|
257
|
+
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2158-6)"
|
258
|
+
d="M 6.301306,8.1024081 5.7761575,7.6007771"
|
259
|
+
id="path1743-9" />
|
260
|
+
<path
|
261
|
+
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2158-6-0)"
|
262
|
+
d="M 8.0338077,6.4004863 7.5086592,5.8988553"
|
263
|
+
id="path1743-9-3" />
|
264
|
+
<path
|
265
|
+
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2158-6-6)"
|
266
|
+
d="M 9.7570035,4.5519285 9.2318545,4.0502975"
|
267
|
+
id="path1743-9-6" />
|
268
|
+
<path
|
269
|
+
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot-3-5-1-2)"
|
270
|
+
d="M 10.848322,3.6556113 9.7425292,2.5680653"
|
271
|
+
id="path1741-7-5-7-1" />
|
272
|
+
</g>
|
273
|
+
</svg>
|
Binary file
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
width="48"
|
6
|
+
height="48"
|
7
|
+
viewBox="0 0 12.7 12.7"
|
8
|
+
version="1.1"
|
9
|
+
id="svg975"
|
10
|
+
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
11
|
+
sodipodi:docname="short.svg"
|
12
|
+
inkscape:export-filename="short.png"
|
13
|
+
inkscape:export-xdpi="96"
|
14
|
+
inkscape:export-ydpi="96"
|
15
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
16
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
17
|
+
xmlns="http://www.w3.org/2000/svg"
|
18
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
19
|
+
<sodipodi:namedview
|
20
|
+
id="namedview977"
|
21
|
+
pagecolor="#ffffff"
|
22
|
+
bordercolor="#000000"
|
23
|
+
borderopacity="0.25"
|
24
|
+
inkscape:showpageshadow="2"
|
25
|
+
inkscape:pageopacity="0.0"
|
26
|
+
inkscape:pagecheckerboard="0"
|
27
|
+
inkscape:deskcolor="#d1d1d1"
|
28
|
+
inkscape:document-units="mm"
|
29
|
+
showgrid="false"
|
30
|
+
inkscape:zoom="6.7277216"
|
31
|
+
inkscape:cx="13.154528"
|
32
|
+
inkscape:cy="36.862405"
|
33
|
+
inkscape:window-width="1920"
|
34
|
+
inkscape:window-height="1131"
|
35
|
+
inkscape:window-x="0"
|
36
|
+
inkscape:window-y="32"
|
37
|
+
inkscape:window-maximized="1"
|
38
|
+
inkscape:current-layer="layer1" />
|
39
|
+
<defs
|
40
|
+
id="defs972" />
|
41
|
+
<g
|
42
|
+
inkscape:label="Layer 1"
|
43
|
+
inkscape:groupmode="layer"
|
44
|
+
id="layer1">
|
45
|
+
<text
|
46
|
+
xml:space="preserve"
|
47
|
+
style="font-style:italic;font-size:5.95578px;font-family:'Nimbus Sans';-inkscape-font-specification:'Nimbus Sans Italic';opacity:0.907409;fill:#000000;stroke-width:0.759712;stroke-miterlimit:3.5"
|
48
|
+
x="-0.02063646"
|
49
|
+
y="7.5627742"
|
50
|
+
id="text1150"
|
51
|
+
transform="scale(0.89694342,1.1148975)"><tspan
|
52
|
+
sodipodi:role="line"
|
53
|
+
id="tspan1148"
|
54
|
+
style="stroke-width:0.759713"
|
55
|
+
x="-0.02063646"
|
56
|
+
y="7.5627742">short</tspan></text>
|
57
|
+
</g>
|
58
|
+
</svg>
|
Binary file
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
width="48"
|
6
|
+
height="48"
|
7
|
+
viewBox="0 0 12.7 12.7"
|
8
|
+
version="1.1"
|
9
|
+
id="svg5"
|
10
|
+
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
11
|
+
sodipodi:docname="url.svg"
|
12
|
+
inkscape:export-filename="url.png"
|
13
|
+
inkscape:export-xdpi="96"
|
14
|
+
inkscape:export-ydpi="96"
|
15
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
16
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
17
|
+
xmlns="http://www.w3.org/2000/svg"
|
18
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
19
|
+
<sodipodi:namedview
|
20
|
+
id="namedview7"
|
21
|
+
pagecolor="#ffffff"
|
22
|
+
bordercolor="#000000"
|
23
|
+
borderopacity="0.25"
|
24
|
+
inkscape:showpageshadow="2"
|
25
|
+
inkscape:pageopacity="0.0"
|
26
|
+
inkscape:pagecheckerboard="0"
|
27
|
+
inkscape:deskcolor="#d1d1d1"
|
28
|
+
inkscape:document-units="mm"
|
29
|
+
showgrid="false"
|
30
|
+
inkscape:zoom="3.3638608"
|
31
|
+
inkscape:cx="36.119211"
|
32
|
+
inkscape:cy="25.863139"
|
33
|
+
inkscape:window-width="1920"
|
34
|
+
inkscape:window-height="1131"
|
35
|
+
inkscape:window-x="0"
|
36
|
+
inkscape:window-y="32"
|
37
|
+
inkscape:window-maximized="1"
|
38
|
+
inkscape:current-layer="layer1" />
|
39
|
+
<defs
|
40
|
+
id="defs2" />
|
41
|
+
<g
|
42
|
+
inkscape:label="Layer 1"
|
43
|
+
inkscape:groupmode="layer"
|
44
|
+
id="layer1">
|
45
|
+
<text
|
46
|
+
xml:space="preserve"
|
47
|
+
style="font-style:italic;font-size:9.97676px;font-family:'Nimbus Sans';-inkscape-font-specification:'Nimbus Sans Italic';opacity:0.907409;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.27262;stroke-miterlimit:3.5"
|
48
|
+
x="0.16326435"
|
49
|
+
y="9.5309248"
|
50
|
+
id="text236"
|
51
|
+
transform="scale(0.97072659,1.0301562)"><tspan
|
52
|
+
sodipodi:role="line"
|
53
|
+
id="tspan234"
|
54
|
+
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.27263"
|
55
|
+
x="0.16326435"
|
56
|
+
y="9.5309248">url</tspan></text>
|
57
|
+
</g>
|
58
|
+
</svg>
|
@@ -38,7 +38,7 @@ from tomwer.core.process.edit import darkflatpatch
|
|
38
38
|
from tomwer.core.scan.edfscan import EDFTomoScan
|
39
39
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
40
40
|
from tomwer.core.settings import get_lbsram_path, isOnLbsram
|
41
|
-
from tomwer.core.utils import
|
41
|
+
from tomwer.core.utils.lbsram import is_low_on_memory
|
42
42
|
|
43
43
|
from ..processingstack import FIFO, ProcessingThread
|
44
44
|
|
@@ -60,7 +60,7 @@ class DarkFlatPatchProcessStack(FIFO, qt.QObject):
|
|
60
60
|
assert isinstance(data, TomwerScanBase)
|
61
61
|
self._computationThread.finished.connect(self._end_threaded_computation)
|
62
62
|
|
63
|
-
if isOnLbsram(data) and
|
63
|
+
if isOnLbsram(data) and is_low_on_memory(get_lbsram_path()) is True:
|
64
64
|
# if computer is running into low memory on lbsram skip it
|
65
65
|
mess = "low memory, skip dark-flat-patch reconstruction for", data.path
|
66
66
|
_logger.processSkipped(mess)
|
@@ -36,7 +36,7 @@ from silx.gui import qt
|
|
36
36
|
from tomwer.core.process.edit import imagekeyeditor
|
37
37
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
38
38
|
from tomwer.core.settings import get_lbsram_path, isOnLbsram
|
39
|
-
from tomwer.core.utils import
|
39
|
+
from tomwer.core.utils.lbsram import is_low_on_memory
|
40
40
|
|
41
41
|
from ..processingstack import FIFO, ProcessingThread
|
42
42
|
|
@@ -57,7 +57,7 @@ class ImageKeyEditorProcessStack(FIFO, qt.QObject):
|
|
57
57
|
assert isinstance(data, TomwerScanBase)
|
58
58
|
self._computationThread.finished.connect(self._end_threaded_computation)
|
59
59
|
|
60
|
-
if isOnLbsram(data) and
|
60
|
+
if isOnLbsram(data) and is_low_on_memory(get_lbsram_path()) is True:
|
61
61
|
# if computer is running into low memory on lbsram skip it
|
62
62
|
mess = f"low memory, skip image-key-edition for {data.path}"
|
63
63
|
_logger.processSkipped(mess)
|
@@ -37,10 +37,10 @@ from silx.gui import qt
|
|
37
37
|
from tomwer.core.process.reconstruction.axis import AxisTask
|
38
38
|
from tomwer.core.process.reconstruction.axis.axis import NoAxisUrl
|
39
39
|
from tomwer.core.process.reconstruction.axis.mode import AxisMode
|
40
|
-
from tomwer.core.scan.
|
40
|
+
from tomwer.core.scan.nxtomoscan import NXtomoScan
|
41
41
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
42
42
|
from tomwer.core.settings import get_lbsram_path, isOnLbsram
|
43
|
-
from tomwer.core.utils import
|
43
|
+
from tomwer.core.utils.lbsram import is_low_on_memory
|
44
44
|
from tomwer.synctools.axis import QAxisRP
|
45
45
|
|
46
46
|
from ..processingstack import FIFO, ProcessingThread
|
@@ -70,7 +70,7 @@ class AxisProcessStack(FIFO, qt.QObject):
|
|
70
70
|
self._data_currently_computed = data
|
71
71
|
self._axis_params.frame_width = data.dim_1
|
72
72
|
mode = self._axis_params.mode
|
73
|
-
if isOnLbsram(data) and
|
73
|
+
if isOnLbsram(data) and is_low_on_memory(get_lbsram_path()) is True:
|
74
74
|
# if computer is running into low memory on lbsram skip it
|
75
75
|
mess = "low memory, skip axis calculation", data.path
|
76
76
|
ProcessManager().notify_dataset_state(
|
@@ -92,7 +92,7 @@ class AxisProcessStack(FIFO, qt.QObject):
|
|
92
92
|
cor = 0
|
93
93
|
data._axis_params.set_relative_value(cor)
|
94
94
|
cor = data._axis_params.relative_cor_value
|
95
|
-
if isinstance(data,
|
95
|
+
if isinstance(data, NXtomoScan):
|
96
96
|
entry = data.entry
|
97
97
|
else:
|
98
98
|
entry = "entry"
|
@@ -38,7 +38,7 @@ from tomwer.core.process.reconstruction.nabu.castvolume import CastVolumeTask
|
|
38
38
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
39
39
|
from tomwer.core.settings import get_lbsram_path, isOnLbsram
|
40
40
|
from tomwer.core.tomwer_object import TomwerObject
|
41
|
-
from tomwer.core.utils import
|
41
|
+
from tomwer.core.utils.lbsram import is_low_on_memory
|
42
42
|
from tomwer.core.volume.volumebase import TomwerVolumeBase
|
43
43
|
from tomwer.core.volume.volumefactory import VolumeFactory
|
44
44
|
|
@@ -81,7 +81,7 @@ class CastVolumeProcessStack(FIFO, qt.QObject):
|
|
81
81
|
if (
|
82
82
|
path is not None
|
83
83
|
and isOnLbsram(path)
|
84
|
-
and
|
84
|
+
and is_low_on_memory(get_lbsram_path()) is True
|
85
85
|
):
|
86
86
|
# if computer is running into low memory on lbsram skip it
|
87
87
|
mess = f"low memory, skip volume cast {data}"
|
@@ -38,7 +38,7 @@ from silx.gui import qt
|
|
38
38
|
from tomwer.core.process.reconstruction.darkref.darkrefscopy import DarkRefsCopy
|
39
39
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
40
40
|
from tomwer.core.settings import get_lbsram_path, isOnLbsram
|
41
|
-
from tomwer.core.utils import
|
41
|
+
from tomwer.core.utils.lbsram import is_low_on_memory
|
42
42
|
|
43
43
|
from ..processingstack import FIFO, ProcessingThread
|
44
44
|
|
@@ -85,7 +85,7 @@ class DarkRefCopyProcessStack(FIFO, qt.QObject):
|
|
85
85
|
_logger.processStarted(f"dk-flat-copy {data}")
|
86
86
|
assert isinstance(data, TomwerScanBase)
|
87
87
|
self._data_currently_computed = data
|
88
|
-
if isOnLbsram(data) and
|
88
|
+
if isOnLbsram(data) and is_low_on_memory(get_lbsram_path()) is True:
|
89
89
|
# if computer is running into low memory on lbsram skip it
|
90
90
|
mess = "low memory, skip dk-flat-copy", data.path
|
91
91
|
try:
|
@@ -107,7 +107,7 @@ class DarkRefCopyProcessStack(FIFO, qt.QObject):
|
|
107
107
|
# need to manage connect before starting it because
|
108
108
|
fct_callback = functools.partial(self._end_threaded_computation, callback)
|
109
109
|
self._computationThread.finished.connect(fct_callback)
|
110
|
-
self._computationThread.sigRefSetted.connect(self.
|
110
|
+
self._computationThread.sigRefSetted.connect(self.sigRefSetted)
|
111
111
|
self._computationThread.start()
|
112
112
|
|
113
113
|
def _end_computation(self, data, future_tomo_obj, callback):
|
@@ -132,9 +132,6 @@ class DarkRefCopyProcessStack(FIFO, qt.QObject):
|
|
132
132
|
def _create_processing_thread(self, process_id=None) -> qt.QThread:
|
133
133
|
return _ProcessingThread(process_id=process_id, save_dir=self._save_dir)
|
134
134
|
|
135
|
-
def _repeatSigRefSetted(self, *args, **kwargs):
|
136
|
-
self.sigRefSetted.emit(*args, **kwargs)
|
137
|
-
|
138
135
|
|
139
136
|
class _ProcessingThread(ProcessingThread, SuperviseProcess):
|
140
137
|
"""
|
@@ -167,15 +164,12 @@ class _ProcessingThread(ProcessingThread, SuperviseProcess):
|
|
167
164
|
process = DarkRefsCopyWithSig(
|
168
165
|
parent=self.parent(), inputs=inputs, process_id=self.process_id
|
169
166
|
)
|
170
|
-
process.sigRefSetted.connect(self.
|
167
|
+
process.sigRefSetted.connect(self.sigRefSetted)
|
171
168
|
try:
|
172
169
|
process.run()
|
173
170
|
except Exception as e:
|
174
171
|
_logger.warning(e)
|
175
172
|
|
176
|
-
def _repeatSigRefSetted(self, *args, **kwargs):
|
177
|
-
self.sigRefSetted.emit(*args, **kwargs)
|
178
|
-
|
179
173
|
|
180
174
|
class DarkRefsCopyWithSig(qt.QObject, DarkRefsCopy):
|
181
175
|
sigRefSetted = qt.Signal(str)
|