dcscope 2.22.1__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.
- dcscope/__init__.py +17 -0
- dcscope/__main__.py +44 -0
- dcscope/_version.py +21 -0
- dcscope/extensions.py +250 -0
- dcscope/gui/__init__.py +2 -0
- dcscope/gui/analysis/__init__.py +10 -0
- dcscope/gui/analysis/ana_basins.py +110 -0
- dcscope/gui/analysis/ana_basins.ui +143 -0
- dcscope/gui/analysis/ana_filter.py +341 -0
- dcscope/gui/analysis/ana_filter.ui +364 -0
- dcscope/gui/analysis/ana_log.py +122 -0
- dcscope/gui/analysis/ana_log.ui +100 -0
- dcscope/gui/analysis/ana_meta.py +207 -0
- dcscope/gui/analysis/ana_meta.ui +141 -0
- dcscope/gui/analysis/ana_plot.py +638 -0
- dcscope/gui/analysis/ana_plot.ui +1060 -0
- dcscope/gui/analysis/ana_slot.py +504 -0
- dcscope/gui/analysis/ana_slot.ui +684 -0
- dcscope/gui/analysis/ana_tables.py +227 -0
- dcscope/gui/analysis/ana_tables.ui +195 -0
- dcscope/gui/analysis/ana_view.py +69 -0
- dcscope/gui/analysis/ana_view.ui +269 -0
- dcscope/gui/analysis/dlg_slot_reorder.py +55 -0
- dcscope/gui/analysis/dlg_slot_reorder.ui +138 -0
- dcscope/gui/bulk/__init__.py +2 -0
- dcscope/gui/bulk/bulk_emodulus.py +200 -0
- dcscope/gui/bulk/bulk_emodulus.ui +245 -0
- dcscope/gui/compute/__init__.py +3 -0
- dcscope/gui/compute/comp_lme4.py +115 -0
- dcscope/gui/compute/comp_lme4.ui +194 -0
- dcscope/gui/compute/comp_lme4_dataset.py +51 -0
- dcscope/gui/compute/comp_lme4_dataset.ui +92 -0
- dcscope/gui/compute/comp_lme4_results.py +120 -0
- dcscope/gui/compute/comp_lme4_results.ui +268 -0
- dcscope/gui/compute/comp_stats.py +223 -0
- dcscope/gui/compute/comp_stats.ui +187 -0
- dcscope/gui/dcor/__init__.py +304 -0
- dcscope/gui/dcor/dcor.ui +118 -0
- dcscope/gui/export/__init__.py +3 -0
- dcscope/gui/export/e2data.py +394 -0
- dcscope/gui/export/e2data.ui +367 -0
- dcscope/gui/export/e2filter.py +76 -0
- dcscope/gui/export/e2filter.ui +111 -0
- dcscope/gui/export/e2plot.py +94 -0
- dcscope/gui/export/e2plot.ui +175 -0
- dcscope/gui/main.py +1089 -0
- dcscope/gui/main.ui +579 -0
- dcscope/gui/matrix/__init__.py +4 -0
- dcscope/gui/matrix/block_matrix.py +141 -0
- dcscope/gui/matrix/block_matrix.ui +207 -0
- dcscope/gui/matrix/data_matrix.py +574 -0
- dcscope/gui/matrix/dm_dataset.py +116 -0
- dcscope/gui/matrix/dm_dataset.ui +348 -0
- dcscope/gui/matrix/dm_element.py +111 -0
- dcscope/gui/matrix/dm_element.ui +169 -0
- dcscope/gui/matrix/dm_filter.py +115 -0
- dcscope/gui/matrix/dm_filter.ui +287 -0
- dcscope/gui/matrix/plot_matrix.py +316 -0
- dcscope/gui/matrix/pm_element.py +39 -0
- dcscope/gui/matrix/pm_plot.py +86 -0
- dcscope/gui/matrix/pm_plot.ui +249 -0
- dcscope/gui/pipeline_plot.py +797 -0
- dcscope/gui/pipeline_plot.ui +66 -0
- dcscope/gui/preferences.py +380 -0
- dcscope/gui/preferences.ui +554 -0
- dcscope/gui/quick_view/__init__.py +1 -0
- dcscope/gui/quick_view/qv_main.py +1072 -0
- dcscope/gui/quick_view/qv_main.ui +1297 -0
- dcscope/gui/quick_view/qv_scatter.py +284 -0
- dcscope/gui/quick_view/qv_style.css +10 -0
- dcscope/gui/update.py +90 -0
- dcscope/gui/widgets/__init__.py +15 -0
- dcscope/gui/widgets/bg_thread.py +29 -0
- dcscope/gui/widgets/bulk_list.py +79 -0
- dcscope/gui/widgets/bulk_list.ui +95 -0
- dcscope/gui/widgets/double_spin_box_nan.py +75 -0
- dcscope/gui/widgets/feature_combobox.py +140 -0
- dcscope/gui/widgets/get_path.py +42 -0
- dcscope/gui/widgets/key_value_table_widget.css +12 -0
- dcscope/gui/widgets/key_value_table_widget.py +75 -0
- dcscope/gui/widgets/mdi_subwindow_wo_close.py +12 -0
- dcscope/gui/widgets/qrangeslider.py +262 -0
- dcscope/gui/widgets/rangecontrol.py +308 -0
- dcscope/gui/widgets/rangecontrol.ui +136 -0
- dcscope/gui/widgets/simple_image_view.py +55 -0
- dcscope/gui/widgets/simple_plot_widget.py +113 -0
- dcscope/gui/widgets/so_colorbaritem.py +29 -0
- dcscope/gui/widgets/wait_cursor.py +33 -0
- dcscope/idiom.py +26 -0
- dcscope/img/__init__.py +2 -0
- dcscope/img/icon-theme/breeze/COPYING-ICONS +209 -0
- dcscope/img/icon-theme/breeze/COPYING.LIB +510 -0
- dcscope/img/icon-theme/breeze/README +5 -0
- dcscope/img/icon-theme/breeze/actions/16/application-exit.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/16/code-context.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-cancel.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-close.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-messages.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-ok-apply.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/dialog-ok.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/document-open-folder.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/document-open.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/document-save.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/documentinfo.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/16/draw-watercolor.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/edit-clear-all.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/edit-clear.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/edit-paste.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/globe.svg +16 -0
- dcscope/img/icon-theme/breeze/actions/16/gtk-preferences.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/list-add.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/messagebox_warning.svg +20 -0
- dcscope/img/icon-theme/breeze/actions/16/object-columns.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/object-order-lower.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/object-rows.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/office-chart-line-stacked.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/office-chart-ring.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/office-chart-scatter.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/path-mode-polyline.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/preferences-activities.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/remove.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/16/search.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/show-grid.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/special_paste.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/tools-wizard.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/view-calendar-list.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/view-filter.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/view-list-tree.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/view-statistics.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/16/visibility.svg +21 -0
- dcscope/img/icon-theme/breeze/actions/22/application-exit.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/22/code-context.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-cancel.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-close.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-messages.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-ok-apply.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/dialog-ok.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/document-open-folder.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/document-open.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/document-save.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/documentinfo.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/draw-watercolor.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/edit-clear-all.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/edit-clear.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/edit-paste.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/globe.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/22/gtk-preferences.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/22/list-add.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/messagebox_warning.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/object-columns.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/object-order-lower.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/object-rows.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/office-chart-line-stacked.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/office-chart-ring.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/office-chart-scatter.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/path-mode-polyline.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/22/preferences-activities.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/remove.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/22/special_paste.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/tools-wizard.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/view-calendar-list.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/view-filter.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/view-list-tree.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/view-statistics.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/22/visibility.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/application-exit.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/code-context.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-cancel.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-close.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-messages.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-ok-apply.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/dialog-ok.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/document-open-folder.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/document-open.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/document-save.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/documentinfo.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/draw-watercolor.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/edit-clear-all.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/edit-clear.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/edit-paste.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/globe.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/24/gtk-preferences.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/24/list-add.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/messagebox_warning.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/24/object-columns.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/object-order-lower.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/object-rows.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/office-chart-line-stacked.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/office-chart-ring.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/office-chart-scatter.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/path-mode-polyline.svg +15 -0
- dcscope/img/icon-theme/breeze/actions/24/preferences-activities.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/24/remove.svg +10 -0
- dcscope/img/icon-theme/breeze/actions/24/special_paste.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/tools-wizard.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/view-calendar-list.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/view-filter.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/view-list-tree.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/view-statistics.svg +12 -0
- dcscope/img/icon-theme/breeze/actions/24/visibility.svg +14 -0
- dcscope/img/icon-theme/breeze/actions/32/application-exit.svg +8 -0
- dcscope/img/icon-theme/breeze/actions/32/dialog-cancel.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/32/dialog-messages.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/32/dialog-ok-apply.svg +1 -0
- dcscope/img/icon-theme/breeze/actions/32/dialog-ok.svg +1 -0
- dcscope/img/icon-theme/breeze/actions/32/document-open-folder.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/32/document-open.svg +13 -0
- dcscope/img/icon-theme/breeze/actions/32/document-save.svg +18 -0
- dcscope/img/icon-theme/breeze/actions/32/gtk-preferences.svg +17 -0
- dcscope/img/icon-theme/breeze/actions/32/object-order-lower.svg +18 -0
- dcscope/img/icon-theme/breeze/actions/32/view-filter.svg +18 -0
- dcscope/img/icon-theme/breeze/actions/32/view-list-tree.svg +18 -0
- dcscope/img/icon-theme/breeze/places/16/folder-cloud.svg +13 -0
- dcscope/img/icon-theme/breeze/places/16/folder.svg +13 -0
- dcscope/img/icon-theme/breeze/places/22/folder-cloud.svg +13 -0
- dcscope/img/icon-theme/breeze/places/22/folder.svg +13 -0
- dcscope/img/icon-theme/breeze/places/24/folder-cloud.svg +12 -0
- dcscope/img/icon-theme/breeze/places/24/folder.svg +12 -0
- dcscope/img/icon-theme/breeze/places/32/folder-cloud.svg +35 -0
- dcscope/img/icon-theme/breeze/places/32/folder.svg +30 -0
- dcscope/img/icon-theme/breeze/places/64/folder-cloud.svg +35 -0
- dcscope/img/icon-theme/breeze/places/64/folder.svg +30 -0
- dcscope/img/icon-theme/breeze/status/16/dialog-error.svg +9 -0
- dcscope/img/icon-theme/breeze/status/16/dialog-information.svg +9 -0
- dcscope/img/icon-theme/breeze/status/16/dialog-question.svg +7 -0
- dcscope/img/icon-theme/breeze/status/16/dialog-warning.svg +9 -0
- dcscope/img/icon-theme/breeze/status/22/dialog-error.svg +9 -0
- dcscope/img/icon-theme/breeze/status/22/dialog-information.svg +9 -0
- dcscope/img/icon-theme/breeze/status/22/dialog-question.svg +7 -0
- dcscope/img/icon-theme/breeze/status/22/dialog-warning.svg +9 -0
- dcscope/img/icon-theme/breeze/status/24/dialog-error.svg +13 -0
- dcscope/img/icon-theme/breeze/status/24/dialog-information.svg +13 -0
- dcscope/img/icon-theme/breeze/status/24/dialog-question.svg +9 -0
- dcscope/img/icon-theme/breeze/status/24/dialog-warning.svg +1 -0
- dcscope/img/icon-theme/breeze/status/64/dialog-error.svg +25 -0
- dcscope/img/icon-theme/breeze/status/64/dialog-information.svg +25 -0
- dcscope/img/icon-theme/breeze/status/64/dialog-question.svg +25 -0
- dcscope/img/icon-theme/breeze/status/64/dialog-warning.svg +25 -0
- dcscope/img/icon-theme/collect_icons.py +124 -0
- dcscope/img/icon-theme/dcscope/dcor.png +0 -0
- dcscope/img/icon-theme/dcscope/edit-copy-anew.svg +13 -0
- dcscope/img/icon-theme/dcscope/emodulus.svg +69 -0
- dcscope/img/icon-theme/dcscope/filter_ray.svg +54 -0
- dcscope/img/icon-theme/dcscope/region_channel.svg +86 -0
- dcscope/img/icon-theme/dcscope/region_reservoir.svg +89 -0
- dcscope/img/icon-theme/dcscope/rlang.svg +108 -0
- dcscope/img/icon-theme/dcscope/statistical_significance.svg +106 -0
- dcscope/img/icon-theme/index.theme +81 -0
- dcscope/img/icon.png +0 -0
- dcscope/img/icon.svg +73 -0
- dcscope/img/splash.png +0 -0
- dcscope/meta_tool.py +143 -0
- dcscope/pipeline/__init__.py +5 -0
- dcscope/pipeline/core.py +632 -0
- dcscope/pipeline/dataslot.py +270 -0
- dcscope/pipeline/filter.py +161 -0
- dcscope/pipeline/filter_ray.py +170 -0
- dcscope/pipeline/plot.py +187 -0
- dcscope/plot_cache.py +79 -0
- dcscope/session.py +379 -0
- dcscope/util.py +34 -0
- dcscope-2.22.1.dist-info/METADATA +95 -0
- dcscope-2.22.1.dist-info/RECORD +267 -0
- dcscope-2.22.1.dist-info/WHEEL +5 -0
- dcscope-2.22.1.dist-info/entry_points.txt +2 -0
- dcscope-2.22.1.dist-info/licenses/LICENSE +621 -0
- dcscope-2.22.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import numbers
|
|
2
|
+
import importlib.resources
|
|
3
|
+
|
|
4
|
+
import dclab
|
|
5
|
+
import numpy as np
|
|
6
|
+
from PyQt6 import uic, QtCore, QtWidgets
|
|
7
|
+
|
|
8
|
+
from ... import meta_tool
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MetaPanel(QtWidgets.QWidget):
|
|
12
|
+
def __init__(self, *args, **kwargs):
|
|
13
|
+
super(MetaPanel, self).__init__(*args, **kwargs)
|
|
14
|
+
ref = importlib.resources.files(
|
|
15
|
+
"dcscope.gui.analysis") / "ana_meta.ui"
|
|
16
|
+
with importlib.resources.as_file(ref) as path_ui:
|
|
17
|
+
uic.loadUi(path_ui, self)
|
|
18
|
+
|
|
19
|
+
self.comboBox_slots.currentIndexChanged.connect(self.update_content)
|
|
20
|
+
self.pipeline_state = None
|
|
21
|
+
self.update_content()
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def current_slot_state(self):
|
|
25
|
+
if self.pipeline_state is not None:
|
|
26
|
+
slot_index = self.comboBox_slots.currentIndex()
|
|
27
|
+
slot_state = self.pipeline_state["slots"][slot_index]
|
|
28
|
+
else:
|
|
29
|
+
slot_state = None
|
|
30
|
+
return slot_state
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def slot_ids(self):
|
|
34
|
+
"""List of slot identifiers"""
|
|
35
|
+
if self.pipeline_state is not None:
|
|
36
|
+
ids = [ss["identifier"] for ss in self.pipeline_state["slots"]]
|
|
37
|
+
else:
|
|
38
|
+
ids = []
|
|
39
|
+
return ids
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def slot_names(self):
|
|
43
|
+
"""List of slot names"""
|
|
44
|
+
if self.pipeline_state is not None:
|
|
45
|
+
nms = [ss["name"] for ss in self.pipeline_state["slots"]]
|
|
46
|
+
else:
|
|
47
|
+
nms = []
|
|
48
|
+
return nms
|
|
49
|
+
|
|
50
|
+
def set_pipeline(self, pipeline):
|
|
51
|
+
self.pipeline_state = pipeline.__getstate__()
|
|
52
|
+
|
|
53
|
+
def update_info_box(self, group_box, config, section):
|
|
54
|
+
"""Populate an individual group box with keyword-value pairs"""
|
|
55
|
+
group_box.layout().setAlignment(QtCore.Qt.AlignmentFlag.AlignTop)
|
|
56
|
+
# cleanup
|
|
57
|
+
for ii in reversed(range(group_box.layout().count())):
|
|
58
|
+
item = group_box.layout().itemAt(ii).widget()
|
|
59
|
+
if item is not None:
|
|
60
|
+
item.deleteLater()
|
|
61
|
+
item.setParent(None)
|
|
62
|
+
# populate
|
|
63
|
+
items = sort_config_section_items(section, config[section].items())
|
|
64
|
+
if items:
|
|
65
|
+
for key, value in items:
|
|
66
|
+
k, v, t = format_config_key_value(section, key, value)
|
|
67
|
+
widget = QtWidgets.QWidget()
|
|
68
|
+
hbox = QtWidgets.QHBoxLayout()
|
|
69
|
+
hbox.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft)
|
|
70
|
+
hbox.setContentsMargins(0, 0, 0, 0)
|
|
71
|
+
ldescr = QtWidgets.QLabel(k + ": ")
|
|
72
|
+
ldescr.setToolTip(f"{section}:{key}")
|
|
73
|
+
ldescr.setAlignment(QtCore.Qt.AlignmentFlag.AlignTop)
|
|
74
|
+
hbox.addWidget(ldescr)
|
|
75
|
+
lvalue = QtWidgets.QLabel(v)
|
|
76
|
+
if t:
|
|
77
|
+
lvalue.setToolTip(t)
|
|
78
|
+
lvalue.setAlignment(QtCore.Qt.AlignmentFlag.AlignBottom)
|
|
79
|
+
hbox.addWidget(lvalue)
|
|
80
|
+
widget.setLayout(hbox)
|
|
81
|
+
group_box.layout().addWidget(widget)
|
|
82
|
+
group_box.show()
|
|
83
|
+
else:
|
|
84
|
+
group_box.hide()
|
|
85
|
+
self.update()
|
|
86
|
+
|
|
87
|
+
def update_content(self, slot_index=None, **kwargs):
|
|
88
|
+
if self.slot_ids:
|
|
89
|
+
self.setEnabled(True)
|
|
90
|
+
# update combobox
|
|
91
|
+
self.comboBox_slots.blockSignals(True)
|
|
92
|
+
if slot_index is None or slot_index < 0:
|
|
93
|
+
slot_index = max(0, self.comboBox_slots.currentIndex())
|
|
94
|
+
slot_index = min(slot_index, len(self.slot_ids) - 1)
|
|
95
|
+
|
|
96
|
+
self.comboBox_slots.clear()
|
|
97
|
+
self.comboBox_slots.addItems(self.slot_names)
|
|
98
|
+
self.comboBox_slots.setCurrentIndex(slot_index)
|
|
99
|
+
self.comboBox_slots.blockSignals(False)
|
|
100
|
+
# populate content
|
|
101
|
+
slot_state = self.pipeline_state["slots"][slot_index]
|
|
102
|
+
cfg = meta_tool.get_rtdc_config(slot_state["path"])
|
|
103
|
+
self.update_info_box(self.groupBox_experiment, cfg,
|
|
104
|
+
"experiment")
|
|
105
|
+
self.update_info_box(self.groupBox_pipeline, cfg,
|
|
106
|
+
"pipeline")
|
|
107
|
+
self.update_info_box(self.groupBox_fluorescence, cfg,
|
|
108
|
+
"fluorescence")
|
|
109
|
+
self.update_info_box(self.groupBox_imaging, cfg,
|
|
110
|
+
"imaging")
|
|
111
|
+
self.update_info_box(self.groupBox_online_contour, cfg,
|
|
112
|
+
"online_contour")
|
|
113
|
+
self.update_info_box(self.groupBox_online_filter, cfg,
|
|
114
|
+
"online_filter")
|
|
115
|
+
self.update_info_box(self.groupBox_setup, cfg,
|
|
116
|
+
"setup")
|
|
117
|
+
self.update_info_box(self.groupBox_user, cfg,
|
|
118
|
+
"user")
|
|
119
|
+
else:
|
|
120
|
+
self.setEnabled(False)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def format_config_key_value(section, key, value):
|
|
124
|
+
dtype = dclab.dfn.get_config_value_type(section, key)
|
|
125
|
+
descr = dclab.dfn.get_config_value_descr(section, key)
|
|
126
|
+
tip = ""
|
|
127
|
+
# Value formatting
|
|
128
|
+
if dtype == numbers.Number: # pretty-print floats
|
|
129
|
+
if abs(value) < 1e-12:
|
|
130
|
+
# small enough to be considered zero for all metadata
|
|
131
|
+
string = "0.0"
|
|
132
|
+
else:
|
|
133
|
+
# determine number of decimals
|
|
134
|
+
dec = int(np.ceil(np.log10(1/np.abs(value))))
|
|
135
|
+
if dec < 0:
|
|
136
|
+
dec = 0
|
|
137
|
+
string = ("{:." + "{}".format(dec + 2) + "f}").format(value)
|
|
138
|
+
else:
|
|
139
|
+
string = str(value)
|
|
140
|
+
|
|
141
|
+
# Special cases
|
|
142
|
+
if section == "experiment":
|
|
143
|
+
if key in ["date", "time"]:
|
|
144
|
+
descr, form = descr.split("(")
|
|
145
|
+
tip = form.strip("()'")
|
|
146
|
+
elif key == "sample":
|
|
147
|
+
descr = "Sample name"
|
|
148
|
+
elif section == "online_filter":
|
|
149
|
+
if key.endswith("polygon points"):
|
|
150
|
+
# format polygon points
|
|
151
|
+
descr = "\n".join(descr.split(" ", 1))
|
|
152
|
+
string = "\n".join([f"({x:.5g}, {y:.5g})" for x, y in value])
|
|
153
|
+
elif key.endswith("soft limit"):
|
|
154
|
+
descr = "\n".join(descr.split(", polygon ", 1))
|
|
155
|
+
elif section == "setup":
|
|
156
|
+
if key == "chip region":
|
|
157
|
+
descr = descr.split(" (")[0]
|
|
158
|
+
elif key == "medium" and string == "CellCarrierB":
|
|
159
|
+
string = "CellCarrier B"
|
|
160
|
+
elif key == "module composition":
|
|
161
|
+
descr = "Modules used"
|
|
162
|
+
string = ", ".join(string.split(","))
|
|
163
|
+
elif key == "software version":
|
|
164
|
+
descr = "Software"
|
|
165
|
+
|
|
166
|
+
# Units
|
|
167
|
+
if descr.endswith("]"):
|
|
168
|
+
descr, units = descr.rsplit(" [", 1)
|
|
169
|
+
units = units.strip("] ")
|
|
170
|
+
string += " " + units
|
|
171
|
+
|
|
172
|
+
return descr, string, tip
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def sort_config_section_items(section, items):
|
|
176
|
+
if section == "experiment":
|
|
177
|
+
order = ["sample", "run index", "event count", "date", "time"]
|
|
178
|
+
elif section == "pipeline":
|
|
179
|
+
order = ["dcnum generation",
|
|
180
|
+
"dcnum data",
|
|
181
|
+
"dcnum background",
|
|
182
|
+
"dcnum segmenter",
|
|
183
|
+
"dcnum feature",
|
|
184
|
+
"dcnum gate",
|
|
185
|
+
"dcnum hash",
|
|
186
|
+
"dcnum mapping",
|
|
187
|
+
"dcnum yield",
|
|
188
|
+
]
|
|
189
|
+
elif section == "setup":
|
|
190
|
+
order = ["medium", "channel width"]
|
|
191
|
+
else:
|
|
192
|
+
order = None
|
|
193
|
+
|
|
194
|
+
if order is None:
|
|
195
|
+
sitems = items
|
|
196
|
+
else:
|
|
197
|
+
sitems = []
|
|
198
|
+
for key in order:
|
|
199
|
+
for item in items:
|
|
200
|
+
if key == item[0]:
|
|
201
|
+
sitems.append(item)
|
|
202
|
+
break
|
|
203
|
+
# append those not in `order`
|
|
204
|
+
for item in items:
|
|
205
|
+
if item not in sitems:
|
|
206
|
+
sitems.append(item)
|
|
207
|
+
return sitems
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<ui version="4.0">
|
|
3
|
+
<class>Form</class>
|
|
4
|
+
<widget class="QWidget" name="Form">
|
|
5
|
+
<property name="geometry">
|
|
6
|
+
<rect>
|
|
7
|
+
<x>0</x>
|
|
8
|
+
<y>0</y>
|
|
9
|
+
<width>700</width>
|
|
10
|
+
<height>532</height>
|
|
11
|
+
</rect>
|
|
12
|
+
</property>
|
|
13
|
+
<property name="windowTitle">
|
|
14
|
+
<string>Form</string>
|
|
15
|
+
</property>
|
|
16
|
+
<layout class="QVBoxLayout" name="verticalLayout_7">
|
|
17
|
+
<item>
|
|
18
|
+
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
19
|
+
<property name="topMargin">
|
|
20
|
+
<number>0</number>
|
|
21
|
+
</property>
|
|
22
|
+
<item>
|
|
23
|
+
<widget class="QLabel" name="label">
|
|
24
|
+
<property name="text">
|
|
25
|
+
<string>Dataset</string>
|
|
26
|
+
</property>
|
|
27
|
+
</widget>
|
|
28
|
+
</item>
|
|
29
|
+
<item>
|
|
30
|
+
<widget class="QComboBox" name="comboBox_slots">
|
|
31
|
+
<property name="sizeAdjustPolicy">
|
|
32
|
+
<enum>QComboBox::AdjustToContents</enum>
|
|
33
|
+
</property>
|
|
34
|
+
</widget>
|
|
35
|
+
</item>
|
|
36
|
+
<item>
|
|
37
|
+
<spacer name="horizontalSpacer">
|
|
38
|
+
<property name="orientation">
|
|
39
|
+
<enum>Qt::Horizontal</enum>
|
|
40
|
+
</property>
|
|
41
|
+
<property name="sizeHint" stdset="0">
|
|
42
|
+
<size>
|
|
43
|
+
<width>0</width>
|
|
44
|
+
<height>20</height>
|
|
45
|
+
</size>
|
|
46
|
+
</property>
|
|
47
|
+
</spacer>
|
|
48
|
+
</item>
|
|
49
|
+
</layout>
|
|
50
|
+
</item>
|
|
51
|
+
<item>
|
|
52
|
+
<widget class="QScrollArea" name="scrollArea">
|
|
53
|
+
<property name="widgetResizable">
|
|
54
|
+
<bool>true</bool>
|
|
55
|
+
</property>
|
|
56
|
+
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
57
|
+
<property name="geometry">
|
|
58
|
+
<rect>
|
|
59
|
+
<x>0</x>
|
|
60
|
+
<y>0</y>
|
|
61
|
+
<width>680</width>
|
|
62
|
+
<height>482</height>
|
|
63
|
+
</rect>
|
|
64
|
+
</property>
|
|
65
|
+
<layout class="QGridLayout" name="gridLayout_2">
|
|
66
|
+
<item row="4" column="0">
|
|
67
|
+
<widget class="QGroupBox" name="groupBox_imaging">
|
|
68
|
+
<property name="title">
|
|
69
|
+
<string>Imaging</string>
|
|
70
|
+
</property>
|
|
71
|
+
<layout class="QVBoxLayout" name="verticalLayout_3"/>
|
|
72
|
+
</widget>
|
|
73
|
+
</item>
|
|
74
|
+
<item row="3" column="0">
|
|
75
|
+
<widget class="QGroupBox" name="groupBox_setup">
|
|
76
|
+
<property name="title">
|
|
77
|
+
<string>Setup</string>
|
|
78
|
+
</property>
|
|
79
|
+
<layout class="QVBoxLayout" name="verticalLayout_2"/>
|
|
80
|
+
</widget>
|
|
81
|
+
</item>
|
|
82
|
+
<item row="7" column="0">
|
|
83
|
+
<widget class="QGroupBox" name="groupBox_online_filter">
|
|
84
|
+
<property name="title">
|
|
85
|
+
<string>Online Filter</string>
|
|
86
|
+
</property>
|
|
87
|
+
<property name="checkable">
|
|
88
|
+
<bool>false</bool>
|
|
89
|
+
</property>
|
|
90
|
+
<layout class="QVBoxLayout" name="verticalLayout_5"/>
|
|
91
|
+
</widget>
|
|
92
|
+
</item>
|
|
93
|
+
<item row="0" column="0">
|
|
94
|
+
<widget class="QGroupBox" name="groupBox_experiment">
|
|
95
|
+
<property name="title">
|
|
96
|
+
<string>Experiment</string>
|
|
97
|
+
</property>
|
|
98
|
+
<layout class="QVBoxLayout" name="verticalLayout"/>
|
|
99
|
+
</widget>
|
|
100
|
+
</item>
|
|
101
|
+
<item row="2" column="0">
|
|
102
|
+
<widget class="QGroupBox" name="groupBox_user">
|
|
103
|
+
<property name="title">
|
|
104
|
+
<string>User</string>
|
|
105
|
+
</property>
|
|
106
|
+
<layout class="QVBoxLayout" name="verticalLayout_8"/>
|
|
107
|
+
</widget>
|
|
108
|
+
</item>
|
|
109
|
+
<item row="5" column="0">
|
|
110
|
+
<widget class="QGroupBox" name="groupBox_fluorescence">
|
|
111
|
+
<property name="title">
|
|
112
|
+
<string>Fluorescence</string>
|
|
113
|
+
</property>
|
|
114
|
+
<layout class="QVBoxLayout" name="verticalLayout_4"/>
|
|
115
|
+
</widget>
|
|
116
|
+
</item>
|
|
117
|
+
<item row="8" column="0">
|
|
118
|
+
<widget class="QGroupBox" name="groupBox_online_contour">
|
|
119
|
+
<property name="title">
|
|
120
|
+
<string>Online Contour</string>
|
|
121
|
+
</property>
|
|
122
|
+
<layout class="QVBoxLayout" name="verticalLayout_6"/>
|
|
123
|
+
</widget>
|
|
124
|
+
</item>
|
|
125
|
+
<item row="1" column="0">
|
|
126
|
+
<widget class="QGroupBox" name="groupBox_pipeline">
|
|
127
|
+
<property name="title">
|
|
128
|
+
<string>Pipeline</string>
|
|
129
|
+
</property>
|
|
130
|
+
<layout class="QVBoxLayout" name="verticalLayout_9"/>
|
|
131
|
+
</widget>
|
|
132
|
+
</item>
|
|
133
|
+
</layout>
|
|
134
|
+
</widget>
|
|
135
|
+
</widget>
|
|
136
|
+
</item>
|
|
137
|
+
</layout>
|
|
138
|
+
</widget>
|
|
139
|
+
<resources/>
|
|
140
|
+
<connections/>
|
|
141
|
+
</ui>
|