PaIRS-UniNa 0.2.8__cp312-cp312-win_amd64.whl → 0.2.10__cp312-cp312-win_amd64.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.
- PaIRS_UniNa/Calibration_Tab.py +16 -0
- PaIRS_UniNa/Changes.txt +21 -0
- PaIRS_UniNa/Explorer.py +3312 -3126
- PaIRS_UniNa/FolderLoop.py +561 -561
- PaIRS_UniNa/Input_Tab.py +824 -826
- PaIRS_UniNa/Input_Tab_CalVi.py +1 -0
- PaIRS_UniNa/Input_Tab_tools.py +3020 -3019
- PaIRS_UniNa/PaIRS.py +17 -17
- PaIRS_UniNa/PaIRS_pypacks.py +18 -65
- PaIRS_UniNa/Process_Tab.py +19 -15
- PaIRS_UniNa/Process_Tab_Disp.py +8 -1
- PaIRS_UniNa/SPIVCalHelp.py +155 -0
- PaIRS_UniNa/Saving_tools.py +279 -277
- PaIRS_UniNa/TabTools.py +165 -6
- PaIRS_UniNa/Vis_Tab.py +11 -4
- PaIRS_UniNa/Vis_Tab_CalVi.py +1 -2
- PaIRS_UniNa/_PaIRS_PIV.pyd +0 -0
- PaIRS_UniNa/__init__.py +3 -3
- PaIRS_UniNa/addwidgets_ps.py +570 -70
- PaIRS_UniNa/gPaIRS.py +3933 -3889
- PaIRS_UniNa/icons/information.png +0 -0
- PaIRS_UniNa/icons/information2.png +0 -0
- PaIRS_UniNa/icons/spiv_setup_no.png +0 -0
- PaIRS_UniNa/icons/spiv_setup_ok.png +0 -0
- PaIRS_UniNa/listLib.py +301 -301
- PaIRS_UniNa/parForMulti.py +433 -433
- PaIRS_UniNa/rqrdpckgs.txt +7 -7
- PaIRS_UniNa/tabSplitter.py +606 -606
- PaIRS_UniNa/ui_Calibration_Tab.py +576 -543
- PaIRS_UniNa/ui_Custom_Top.py +294 -294
- PaIRS_UniNa/ui_Input_Tab.py +1098 -1098
- PaIRS_UniNa/ui_Input_Tab_CalVi.py +1280 -1280
- PaIRS_UniNa/ui_Log_Tab.py +261 -261
- PaIRS_UniNa/ui_Output_Tab.py +2360 -2360
- PaIRS_UniNa/ui_Process_Tab.py +3808 -3808
- PaIRS_UniNa/ui_Process_Tab_CalVi.py +1547 -1547
- PaIRS_UniNa/ui_Process_Tab_Disp.py +1139 -1139
- PaIRS_UniNa/ui_Process_Tab_Min.py +435 -435
- PaIRS_UniNa/ui_ResizePopup.py +203 -203
- PaIRS_UniNa/ui_Vis_Tab.py +1626 -1626
- PaIRS_UniNa/ui_Vis_Tab_CalVi.py +1249 -1249
- PaIRS_UniNa/ui_Whatsnew.py +131 -131
- PaIRS_UniNa/ui_gPairs.py +873 -873
- PaIRS_UniNa/ui_infoPaIRS.py +550 -550
- PaIRS_UniNa/whatsnew.txt +2 -4
- {pairs_unina-0.2.8.dist-info → pairs_unina-0.2.10.dist-info}/METADATA +7 -13
- {pairs_unina-0.2.8.dist-info → pairs_unina-0.2.10.dist-info}/RECORD +49 -45
- {pairs_unina-0.2.8.dist-info → pairs_unina-0.2.10.dist-info}/WHEEL +0 -0
- {pairs_unina-0.2.8.dist-info → pairs_unina-0.2.10.dist-info}/top_level.txt +0 -0
PaIRS_UniNa/TabTools.py
CHANGED
|
@@ -706,16 +706,130 @@ class gPaIRS_Tab(QWidget):
|
|
|
706
706
|
lab.setFont(font)
|
|
707
707
|
|
|
708
708
|
def setTABWarnLabel(self):
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
709
|
+
if hasattr(self.ui,'label_done'):
|
|
710
|
+
self.ui.name_tab.setFixedWidth(self.ui.name_tab.sizeHint().width())
|
|
711
|
+
self.ui.label_done.setPixmap(self.pixmap_done if self.TABpar.OptionDone==1 else self.pixmap_warnc)
|
|
712
|
+
self.ui.label_done.setToolTip(self.TABpar.warningMessage)
|
|
713
|
+
|
|
714
|
+
def syncPrevGlobalFields(self, ref_vals=None, include_bases=False, exceptions=[], FlagSync=True):
|
|
715
|
+
"""
|
|
716
|
+
Sync class-level fields (declared in class bodies, e.g. PROpar.mode = mode_init)
|
|
717
|
+
across all TABpar-like instances inside self.TABpar_prev (nested lists / None / TABpar).
|
|
718
|
+
|
|
719
|
+
Parameters
|
|
720
|
+
----------
|
|
721
|
+
ref : object | None
|
|
722
|
+
Reference TABpar instance whose values will be copied (default: self.TABpar).
|
|
723
|
+
include_bases : bool
|
|
724
|
+
If True, include class-level fields declared in base classes too.
|
|
725
|
+
If False, include ONLY fields declared in the concrete class (e.g., PROpar only).
|
|
726
|
+
"""
|
|
727
|
+
|
|
728
|
+
ref = getattr(self, "TABpar", None)
|
|
729
|
+
if ref is None:
|
|
730
|
+
return []
|
|
731
|
+
ref_cls = type(ref)
|
|
732
|
+
|
|
733
|
+
# Decide which class we consider as "TABpar-like"
|
|
734
|
+
# If your tabs store subclasses of a known ParClass, use that; otherwise fallback to TABpar.
|
|
735
|
+
par_base = getattr(self, "ParClass", None)
|
|
736
|
+
if par_base is None:
|
|
737
|
+
par_base = TABpar # assumes TABpar is in scope in TabTools.py
|
|
738
|
+
|
|
739
|
+
# Reference object
|
|
740
|
+
if ref_vals is None:
|
|
741
|
+
|
|
742
|
+
# Collect class-level fields declared in class bodies
|
|
743
|
+
def _class_fields(cls):
|
|
744
|
+
if include_bases:
|
|
745
|
+
classes = [C for C in cls.mro() if C not in (object,)]
|
|
746
|
+
else:
|
|
747
|
+
classes = [cls]
|
|
748
|
+
|
|
749
|
+
out = []
|
|
750
|
+
for C in classes:
|
|
751
|
+
for name, val in C.__dict__.items():
|
|
752
|
+
if name.startswith("__"):
|
|
753
|
+
continue
|
|
754
|
+
# Skip methods / descriptors
|
|
755
|
+
if callable(val) or isinstance(val, (staticmethod, classmethod, property)):
|
|
756
|
+
continue
|
|
757
|
+
out.append(name)
|
|
758
|
+
|
|
759
|
+
# Unique preserving order
|
|
760
|
+
seen = set()
|
|
761
|
+
fields = []
|
|
762
|
+
for n in out:
|
|
763
|
+
if n not in seen:
|
|
764
|
+
seen.add(n)
|
|
765
|
+
fields.append(n)
|
|
766
|
+
return fields
|
|
767
|
+
|
|
768
|
+
fields = _class_fields(ref_cls)
|
|
769
|
+
|
|
770
|
+
# Build reference values (prefer instance override, otherwise class default)
|
|
771
|
+
ref_vals = {}
|
|
772
|
+
#pri.Info.green(f'{self.TABname}:')
|
|
773
|
+
for f in fields:
|
|
774
|
+
try:
|
|
775
|
+
ref_vals[f] = getattr(ref, f)
|
|
776
|
+
#pri.Info.green(f'{f} = {ref_vals[f]}')
|
|
777
|
+
except Exception:
|
|
778
|
+
pass
|
|
779
|
+
#pri.Info.green('\n')
|
|
780
|
+
|
|
781
|
+
if not FlagSync: return ref_vals
|
|
782
|
+
|
|
783
|
+
# Exclude exception fields (if any)
|
|
784
|
+
if exceptions:
|
|
785
|
+
exc = set(exceptions)
|
|
786
|
+
ref_vals = {k: v for k, v in ref_vals.items() if k not in exc}
|
|
787
|
+
|
|
788
|
+
# Walk nested structure and patch instances
|
|
789
|
+
def _walk(node, ParBase=par_base): # <-- bind ParBase safely here
|
|
790
|
+
if node is None:
|
|
791
|
+
return
|
|
792
|
+
if isinstance(node, ParBase):
|
|
793
|
+
for f, v in ref_vals.items():
|
|
794
|
+
try:
|
|
795
|
+
setattr(node, f, v)
|
|
796
|
+
except Exception:
|
|
797
|
+
pass
|
|
798
|
+
return
|
|
799
|
+
if isinstance(node, (list, tuple)):
|
|
800
|
+
for it in node:
|
|
801
|
+
_walk(it, ParBase)
|
|
802
|
+
return
|
|
803
|
+
if isinstance(node, dict):
|
|
804
|
+
for it in node.values():
|
|
805
|
+
_walk(it, ParBase)
|
|
806
|
+
return
|
|
807
|
+
|
|
808
|
+
_walk(getattr(self, "TABpar_prev", None))
|
|
809
|
+
|
|
810
|
+
# Set class-level (global) fields ONCE
|
|
811
|
+
for C in (ref_cls, self.TABpar, self.TABpar_old):
|
|
812
|
+
if C is None:
|
|
813
|
+
continue
|
|
814
|
+
for f, v in ref_vals.items():
|
|
815
|
+
try:
|
|
816
|
+
setattr(C, f, v)
|
|
817
|
+
except Exception:
|
|
818
|
+
pass
|
|
819
|
+
return ref_vals
|
|
820
|
+
|
|
713
821
|
#*************************************************** Undo/redo
|
|
714
822
|
def adjustTABparInd(self):
|
|
715
823
|
TABpar_ind=self.TABpar_at(self.TABpar.ind)
|
|
716
824
|
if TABpar_ind:
|
|
717
825
|
TABpar_ind.copyfrom(self.TABpar)
|
|
718
826
|
|
|
827
|
+
def adjustFromTABparInd(self,ind=None):
|
|
828
|
+
if ind is None: ind=self.TABpar.ind
|
|
829
|
+
TABpar_ind=self.TABpar_at(ind)
|
|
830
|
+
if TABpar_ind:
|
|
831
|
+
self.TABpar.copyfrom(TABpar_ind)
|
|
832
|
+
|
|
719
833
|
def gen_TABpar(self,ind,FlagSet=True,FlagEmptyPrev=False,FlagNone=False,FlagInsert=-1,Process=None,Step=None):
|
|
720
834
|
Prev=prev=self.TABpar_prev if FlagSet else []
|
|
721
835
|
|
|
@@ -956,6 +1070,7 @@ class gPaIRS_Tab(QWidget):
|
|
|
956
1070
|
d=0
|
|
957
1071
|
|
|
958
1072
|
menu=QMenu(b)
|
|
1073
|
+
menu.setStyleSheet(self.gui.ui.menu.styleSheet())
|
|
959
1074
|
act=[]
|
|
960
1075
|
nur=len(krange)
|
|
961
1076
|
flag=nur==Num_Prevs_back_forw
|
|
@@ -989,7 +1104,6 @@ class gPaIRS_Tab(QWidget):
|
|
|
989
1104
|
if self.TABpar.ind[:-1]==ind[:-1]:
|
|
990
1105
|
self.TABpar.ind[-1]=0
|
|
991
1106
|
|
|
992
|
-
|
|
993
1107
|
#*************************************************** Special spin boxes (x,y,w,h)
|
|
994
1108
|
def setMinMaxSpinxywh(self):
|
|
995
1109
|
self.ui.spin_x.setMinimum(0)
|
|
@@ -1062,7 +1176,10 @@ def setupWid(self:gPaIRS_Tab,FlagFontSize=True):
|
|
|
1062
1176
|
|
|
1063
1177
|
if hasattr(self,'widgets'): widgets=self.widgets
|
|
1064
1178
|
else: widgets=self.findChildren(QWidget)
|
|
1179
|
+
if isinstance(widgets[0],list):
|
|
1180
|
+
widgets=[w for wi in widgets for w in wi]
|
|
1065
1181
|
widgets+=self.findChildren(CollapsibleBox)
|
|
1182
|
+
widgets+=self.findChildren(QTextEdit)
|
|
1066
1183
|
for w in widgets:
|
|
1067
1184
|
w:QToolButton
|
|
1068
1185
|
if hasattr(w,'toolTip'):
|
|
@@ -1082,9 +1199,51 @@ def setupWid(self:gPaIRS_Tab,FlagFontSize=True):
|
|
|
1082
1199
|
if hasattr(w,'setup2'):
|
|
1083
1200
|
w.setup2()
|
|
1084
1201
|
|
|
1085
|
-
if isinstance(w,QToolButton) or isinstance(w,QPushButton):
|
|
1202
|
+
if isinstance(w,QToolButton) or isinstance(w,QPushButton) or isinstance(w,QCheckBox) or isinstance(w,QRadioButton) or isinstance(w,QComboBox):
|
|
1086
1203
|
if w.cursor().shape()==Qt.CursorShape.ArrowCursor:
|
|
1087
1204
|
w.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
|
|
1205
|
+
if isinstance(w,QToolButton) or isinstance(w,QPushButton):
|
|
1206
|
+
if not w.icon().isNull():
|
|
1207
|
+
size = w.iconSize()
|
|
1208
|
+
new_size = QSize(
|
|
1209
|
+
max(1, size.width() ),
|
|
1210
|
+
max(1, size.height() )
|
|
1211
|
+
)
|
|
1212
|
+
w.setIconSize(new_size)
|
|
1213
|
+
if (isinstance(w,QToolButton) or isinstance(w,QPushButton) or isinstance(w,ClickableLabel) or w.objectName()=='logo') and w.metaObject().className() not in ('DraggableButton','RichTextPushButton') and w.objectName() not in ('binButton','CollapsibleBox_toggle','StartingPage_Button'):
|
|
1214
|
+
if w.objectName() in ('logo','title_icon','workspace_icon'):
|
|
1215
|
+
apply_hover_glow_label(w)
|
|
1216
|
+
w.default_stylesheet=w.styleSheet()
|
|
1217
|
+
else:
|
|
1218
|
+
setButtonHoverStyle(w)
|
|
1219
|
+
if w.metaObject().className() == "RichTextPushButton":
|
|
1220
|
+
w.icnWidget.setAttribute(Qt.WA_Hover, True)
|
|
1221
|
+
w.icnWidget.setMouseTracking(True)
|
|
1222
|
+
setButtonHoverStyle(w,FlagCls=False)
|
|
1223
|
+
setButtonHoverStyle(w.icnWidget,FlagCls=False,FlagBorder=False)
|
|
1224
|
+
if isinstance(w,QCheckBox) or isinstance(w,QRadioButton):
|
|
1225
|
+
style=f"{w.metaObject().className()}{'::hover{ background-color: rgba(0, 116, 255, 0.1); border-radius: 6px;}'}"
|
|
1226
|
+
w.setStyleSheet(style)
|
|
1227
|
+
if isinstance(w,QSlider):
|
|
1228
|
+
w.setMouseTracking(True)
|
|
1229
|
+
cursor_filter = SliderHandleCursorFilter(w)
|
|
1230
|
+
w.installEventFilter(cursor_filter)
|
|
1231
|
+
if w.objectName()=='log' and hasattr(self,'gui'):
|
|
1232
|
+
base="""
|
|
1233
|
+
QTextEdit {
|
|
1234
|
+
background-color: #000000;
|
|
1235
|
+
color: #FFFFFF;
|
|
1236
|
+
border: 1px solid #2a2a2a;
|
|
1237
|
+
border-radius: 6px;
|
|
1238
|
+
|
|
1239
|
+
padding: 2px;
|
|
1240
|
+
|
|
1241
|
+
selection-background-color: rgba(0, 116, 255, 0.8);
|
|
1242
|
+
selection-color: #FFFFFF;
|
|
1243
|
+
}
|
|
1244
|
+
"""
|
|
1245
|
+
w.setStyleSheet(base + "\n" + gPaIRS_QMenu_style)
|
|
1246
|
+
|
|
1088
1247
|
|
|
1089
1248
|
for sname in ('range_from','range_to','x','y','w','h'):
|
|
1090
1249
|
if hasattr(self.ui,"spin_"+sname):
|
PaIRS_UniNa/Vis_Tab.py
CHANGED
|
@@ -443,6 +443,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
443
443
|
pri.Time.magenta('Colormap generation: start')
|
|
444
444
|
# Create the popup menu
|
|
445
445
|
self.colorMapMenu = QMenu(self)
|
|
446
|
+
self.colorMapMenu.setStyleSheet(self.gui.ui.menu.styleSheet())
|
|
446
447
|
# Add the colormap thumbnails to the menu
|
|
447
448
|
def on_colormap_selected(name):
|
|
448
449
|
self.VISpar.vcolorMap[self.VISpar.variableKey]=self.VISpar.colorMap=name
|
|
@@ -463,6 +464,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
463
464
|
pri.Time.magenta('Vector color generation: start')
|
|
464
465
|
# Create the popup menu
|
|
465
466
|
self.vectorColorMenu = QMenu(self)
|
|
467
|
+
self.vectorColorMenu.setStyleSheet(self.gui.ui.menu.styleSheet())
|
|
466
468
|
# Add the colormap thumbnails to the menu
|
|
467
469
|
def on_vectorcolor_selected(name):
|
|
468
470
|
self.VISpar.vvectorColor[self.VISpar.variableKey]=self.VISpar.vectorColor=name
|
|
@@ -477,7 +479,9 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
477
479
|
action = menu.addAction(QIcon(pixmap), ' '+colorName.lower())
|
|
478
480
|
action.triggered.connect(lambda _, name=colorName: on_vectorcolor_selected(name))
|
|
479
481
|
pri.Time.magenta('Vector color generation: end')
|
|
480
|
-
|
|
482
|
+
|
|
483
|
+
apply_hover_glow_label(self.ui.icon)
|
|
484
|
+
|
|
481
485
|
#------------------------------------- Declaration of parameters
|
|
482
486
|
self.VISpar_base=VISpar()
|
|
483
487
|
self.VISpar:VISpar=self.TABpar
|
|
@@ -505,14 +509,15 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
505
509
|
|
|
506
510
|
slider.valueChanged.connect(callback)
|
|
507
511
|
|
|
512
|
+
"""
|
|
508
513
|
if n in ('nclev','streamdens'):
|
|
509
514
|
def sliderMessage(s:QSlider):
|
|
510
515
|
if self.VISpar.field_rep==2:
|
|
511
516
|
tip = f"Release to repaint"
|
|
512
|
-
|
|
513
|
-
QToolTip.showText(s.mapToGlobal(s.rect().topLeft()), tip)
|
|
517
|
+
show_mouse_tooltip(s,tip)
|
|
514
518
|
slider.sliderPressed.connect(lambda: sliderMessage(slider))
|
|
515
|
-
|
|
519
|
+
"""
|
|
520
|
+
|
|
516
521
|
setattr(self,'slider_'+n+'_callbcak',callback)
|
|
517
522
|
setattr(self,'spin_'+n+'_action',action)
|
|
518
523
|
setattr(self,'spin_'+n+'_set',setting)
|
|
@@ -1347,6 +1352,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1347
1352
|
|
|
1348
1353
|
# Create a context menu and populate it with the available sizes
|
|
1349
1354
|
menu = QMenu(self)
|
|
1355
|
+
menu.setStyleSheet(self.gui.ui.menu.styleSheet())
|
|
1350
1356
|
for i in range(n):
|
|
1351
1357
|
label = f"{Vect[2][i]} x {Vect[0][i]}"
|
|
1352
1358
|
act = menu.addAction(label)
|
|
@@ -2024,6 +2030,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
2024
2030
|
#*************************************************** Menus
|
|
2025
2031
|
def contextMenuEvent(self, event):
|
|
2026
2032
|
contextMenu = QMenu(self)
|
|
2033
|
+
contextMenu.setStyleSheet(self.gui.ui.menu.styleSheet())
|
|
2027
2034
|
copy2clipboard = contextMenu.addAction("Copy to clipboard ("+self.QS_copy2clipboard.key().toString(QKeySequence.NativeText)+")")
|
|
2028
2035
|
copy2clipboard.setIcon(self.ui.plot.copyIcon)
|
|
2029
2036
|
copy2newfig = contextMenu.addAction("Open in new figure ("+self.QS_copy2newfig.key().toString(QKeySequence.NativeText)+")")
|
PaIRS_UniNa/Vis_Tab_CalVi.py
CHANGED
|
@@ -385,6 +385,7 @@ class Vis_Tab_CalVi(gPaIRS_Tab):
|
|
|
385
385
|
self.ui.w_Commands.setVisible(self.VISpar.FlagRunning)
|
|
386
386
|
if self.VISpar.FlagRunning:
|
|
387
387
|
self.calibView.contextMenu = QtWidgets.QMenu(self)
|
|
388
|
+
self.calibView.contextMenu.setStyleSheet(self.gui.ui.menu.styleSheet())
|
|
388
389
|
for a in self.calibView.contextMenuActions:
|
|
389
390
|
self.calibView.contextMenu.addAction(a)
|
|
390
391
|
self.calibView.contextMenu.insertSeparator(self.calibView.contextMenuActions[1])
|
|
@@ -968,8 +969,6 @@ class Vis_Tab_CalVi(gPaIRS_Tab):
|
|
|
968
969
|
FlagVisible=all([not bool(p) for p in calVect.flagPlane[:-1]])
|
|
969
970
|
self.gui.ui.button_Run_CalVi.setVisible(FlagVisible)
|
|
970
971
|
|
|
971
|
-
|
|
972
|
-
|
|
973
972
|
|
|
974
973
|
if __name__ == "__main__":
|
|
975
974
|
import sys
|
PaIRS_UniNa/_PaIRS_PIV.pyd
CHANGED
|
Binary file
|
PaIRS_UniNa/__init__.py
CHANGED