PaIRS-UniNa 0.2.7__cp312-cp312-win_amd64.whl → 0.2.8__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/Changes.txt +18 -0
- PaIRS_UniNa/Explorer.py +3126 -3076
- PaIRS_UniNa/FolderLoop.py +561 -371
- PaIRS_UniNa/Input_Tab.py +826 -717
- PaIRS_UniNa/Input_Tab_CalVi.py +10 -12
- PaIRS_UniNa/Input_Tab_tools.py +3019 -3018
- PaIRS_UniNa/Output_Tab.py +1 -3
- PaIRS_UniNa/PaIRS.py +17 -17
- PaIRS_UniNa/PaIRS_pypacks.py +45 -0
- PaIRS_UniNa/Saving_tools.py +277 -277
- PaIRS_UniNa/Vis_Tab.py +39 -18
- PaIRS_UniNa/Whatsnew.py +4 -3
- PaIRS_UniNa/_PaIRS_PIV.pyd +0 -0
- PaIRS_UniNa/__init__.py +2 -2
- PaIRS_UniNa/gPaIRS.py +3889 -3832
- PaIRS_UniNa/icons/folder_loop_cleanup.png +0 -0
- PaIRS_UniNa/icons/folder_loop_cleanup_off.png +0 -0
- PaIRS_UniNa/icons/scan_path_loop.png +0 -0
- PaIRS_UniNa/icons/scan_path_loop_off.png +0 -0
- PaIRS_UniNa/listLib.py +301 -301
- PaIRS_UniNa/parForMulti.py +433 -433
- PaIRS_UniNa/procTools.py +46 -1
- PaIRS_UniNa/tabSplitter.py +606 -606
- PaIRS_UniNa/ui_Calibration_Tab.py +542 -542
- 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 +3 -2
- {pairs_unina-0.2.7.dist-info → pairs_unina-0.2.8.dist-info}/METADATA +13 -8
- {pairs_unina-0.2.7.dist-info → pairs_unina-0.2.8.dist-info}/RECORD +44 -40
- {pairs_unina-0.2.7.dist-info → pairs_unina-0.2.8.dist-info}/WHEEL +0 -0
- {pairs_unina-0.2.7.dist-info → pairs_unina-0.2.8.dist-info}/top_level.txt +0 -0
PaIRS_UniNa/Vis_Tab.py
CHANGED
|
@@ -234,8 +234,7 @@ class NamesPIV(TABpar):
|
|
|
234
234
|
|
|
235
235
|
class VISpar(TABpar):
|
|
236
236
|
FlagVis=True
|
|
237
|
-
|
|
238
|
-
FlagAutoSizes=True
|
|
237
|
+
|
|
239
238
|
class OUT(TABpar):
|
|
240
239
|
def __init__(self):
|
|
241
240
|
self.x = 0
|
|
@@ -269,7 +268,7 @@ class VISpar(TABpar):
|
|
|
269
268
|
def __init__(self,Process=ProcessTypes.null,Step=StepTypes.null):
|
|
270
269
|
self.setup(Process,Step)
|
|
271
270
|
super().__init__('VISpar','Vis')
|
|
272
|
-
self.unchecked_fields+=['
|
|
271
|
+
self.unchecked_fields+=['setPage']
|
|
273
272
|
self.uncopied_fields+=['graphics_fields']
|
|
274
273
|
|
|
275
274
|
def setup(self,Process,Step):
|
|
@@ -314,6 +313,8 @@ class VISpar(TABpar):
|
|
|
314
313
|
self.variableKey=''
|
|
315
314
|
self.field_rep=0
|
|
316
315
|
|
|
316
|
+
self.FlagAutoLevels=True
|
|
317
|
+
self.FlagAutoSizes=True
|
|
317
318
|
self.FlagYInvert=[False,False]
|
|
318
319
|
self.FlagResetLevels=True
|
|
319
320
|
self.FlagResetSizes=True
|
|
@@ -550,8 +551,8 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
550
551
|
self.setTABlayout=self.setVISlayout
|
|
551
552
|
|
|
552
553
|
self.FlagReset=True
|
|
553
|
-
self.FlagResetLevels=
|
|
554
|
-
self.FlagResetSizes =
|
|
554
|
+
self.FlagResetLevels=False
|
|
555
|
+
self.FlagResetSizes =False
|
|
555
556
|
|
|
556
557
|
self.image_file=''
|
|
557
558
|
self.image_raw=None
|
|
@@ -637,7 +638,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
637
638
|
FlagNew=(not self.VISpar.type and FlagNewImage) or (self.VISpar.type==1 and FlagNewResult)
|
|
638
639
|
FlagDiff=self.VISpar.isDifferentFrom(self.VISpar_old,fields=['img','cam','frame']) or FlagNew
|
|
639
640
|
|
|
640
|
-
if (VISpar.FlagAutoLevels and (FlagNewImage or FlagNewResult)):
|
|
641
|
+
if (self.VISpar.FlagAutoLevels and (FlagNewImage or FlagNewResult)):
|
|
641
642
|
self.resetAllLevels()
|
|
642
643
|
if FlagDiff or self.FlagResetLevels:
|
|
643
644
|
self.FlagResetLevels=False
|
|
@@ -646,7 +647,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
646
647
|
self.FlagResetLevels=False
|
|
647
648
|
self.resetLevels()
|
|
648
649
|
|
|
649
|
-
if (VISpar.FlagAutoSizes and (FlagNewImage or FlagNewResult)):
|
|
650
|
+
if (self.VISpar.FlagAutoSizes and (FlagNewImage or FlagNewResult)):
|
|
650
651
|
self.resetAllXYLims()
|
|
651
652
|
if FlagDiff or self.FlagResetSizes:
|
|
652
653
|
self.FlagResetSizes=False
|
|
@@ -654,8 +655,9 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
654
655
|
elif self.FlagResetSizes:
|
|
655
656
|
self.FlagResetSizes=False
|
|
656
657
|
self.resetXYLims()
|
|
657
|
-
|
|
658
|
+
|
|
658
659
|
self.adjustFieldRep()
|
|
660
|
+
|
|
659
661
|
|
|
660
662
|
def adjustImport(self):
|
|
661
663
|
self.VISpar.image_file=self.VISpar.image_file_Min=self.VISpar.image_file_Disp=''
|
|
@@ -702,7 +704,13 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
702
704
|
else:
|
|
703
705
|
self.VISpar.result_file=self.VISpar.resF(self.VISpar.img)
|
|
704
706
|
elif self.VISpar.img==0:
|
|
705
|
-
self.VISpar.result_file=self.VISpar.result_file_Mean
|
|
707
|
+
self.VISpar.result_file=self.VISpar.result_file_Mean
|
|
708
|
+
if not self.VISpar.FlagView:
|
|
709
|
+
ITE=self.gui.ui.Explorer.ITEfromInd(self.VISpar.ind)
|
|
710
|
+
id=ITE.procdata.name_proc
|
|
711
|
+
self.VISpar.FlagResult=fileIdenitifierCheck(id,self.VISpar.result_file)
|
|
712
|
+
if not self.VISpar.FlagResult: self.VISpar.result_file=''
|
|
713
|
+
|
|
706
714
|
|
|
707
715
|
FlagNewImage, FlagNewResult, _=self.importFiles()
|
|
708
716
|
return FlagNewImage, FlagNewResult
|
|
@@ -1063,7 +1071,8 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1063
1071
|
res[n]=tres[0][:,:,j]
|
|
1064
1072
|
if self.namesPIV.u in res and self.namesPIV.v in res:
|
|
1065
1073
|
res=self.calcMagnitude(res)
|
|
1066
|
-
|
|
1074
|
+
FlagUnit=self.VISpar.Out.xres!=1.0 or self.VISpar.Out.pixAR!=1.0
|
|
1075
|
+
res=self.calcZVorticity(res,FlagUnit)
|
|
1067
1076
|
for f in list(res):
|
|
1068
1077
|
if not f in self.namesPIV.allFields: del res[f]
|
|
1069
1078
|
except Exception as inst:
|
|
@@ -1079,9 +1088,10 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1079
1088
|
res[self.namesPIV.Mod]=np.sqrt(res[self.namesPIV.u]**2+res[self.namesPIV.v]**2)
|
|
1080
1089
|
return res
|
|
1081
1090
|
|
|
1082
|
-
def calcZVorticity(self,res):
|
|
1091
|
+
def calcZVorticity(self,res,FlagUnit=False):
|
|
1083
1092
|
if self.namesPIV.x in res and self.namesPIV.y in res and self.namesPIV.u in res and self.namesPIV.v in res:
|
|
1084
|
-
xres
|
|
1093
|
+
if FlagUnit: xres=yres=1/1000
|
|
1094
|
+
else: xres=yres=1.0
|
|
1085
1095
|
try:
|
|
1086
1096
|
du_dy, _=np.gradient(res[self.namesPIV.u],res[self.namesPIV.y][:,0]*yres,res[self.namesPIV.x][0,:]*xres) # Derivate di u rispetto a y e x
|
|
1087
1097
|
_, dv_dx=np.gradient(res[self.namesPIV.v],res[self.namesPIV.y][:,0]*yres,res[self.namesPIV.x][0,:]*xres) # Derivate di v rispetto a y e x
|
|
@@ -1182,11 +1192,21 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1182
1192
|
self.setLevels()
|
|
1183
1193
|
|
|
1184
1194
|
def button_automatic_levels_action(self):
|
|
1185
|
-
VISpar.FlagAutoLevels=self.ui.button_automatic_levels.isChecked()
|
|
1195
|
+
self.VISpar.FlagAutoLevels=self.ui.button_automatic_levels.isChecked()
|
|
1186
1196
|
return True
|
|
1187
1197
|
|
|
1188
1198
|
def button_automatic_sizes_action(self):
|
|
1189
|
-
VISpar.FlagAutoSizes=self.ui.button_automatic_sizes.isChecked()
|
|
1199
|
+
self.VISpar.FlagAutoSizes=self.ui.button_automatic_sizes.isChecked()
|
|
1200
|
+
if self.VISpar.FlagAutoSizes is False and self.VISpar.Process==ProcessTypes.piv:
|
|
1201
|
+
type2=0 if self.VISpar.type==1 else 1
|
|
1202
|
+
if self.VISpar.unit[self.VISpar.type]!=self.VISpar.unit[type2]:
|
|
1203
|
+
xres,yres=self.getXYRes(type=self.VISpar.unit[self.VISpar.type])
|
|
1204
|
+
else: xres=yres=1.0
|
|
1205
|
+
if (type2==0 and self.VISpar.unit[type2]) or (type2==1 and not self.VISpar.unit[type2]):
|
|
1206
|
+
xres2,yres2=self.getXYRes(type=type2)
|
|
1207
|
+
else: xres2=yres2=1.0
|
|
1208
|
+
self.VISpar.size[type2][0:2]=[s*xres/xres2 for s in [self.VISpar.xmin, self.VISpar.xmax]]
|
|
1209
|
+
self.VISpar.size[type2][2:4]=[s*yres/yres2 for s in [self.VISpar.ymin, self.VISpar.ymax]]
|
|
1190
1210
|
return True
|
|
1191
1211
|
|
|
1192
1212
|
def button_restore_action(self):
|
|
@@ -1389,10 +1409,10 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1389
1409
|
self.ui.button_Contourf.setChecked(self.VISpar.FlagContourf)
|
|
1390
1410
|
|
|
1391
1411
|
def button_automatic_levels_set(self):
|
|
1392
|
-
self.ui.button_automatic_levels.setChecked(VISpar.FlagAutoLevels)
|
|
1412
|
+
self.ui.button_automatic_levels.setChecked(self.VISpar.FlagAutoLevels)
|
|
1393
1413
|
|
|
1394
1414
|
def button_automatic_sizes_set(self):
|
|
1395
|
-
self.ui.button_automatic_sizes.setChecked(VISpar.FlagAutoSizes)
|
|
1415
|
+
self.ui.button_automatic_sizes.setChecked(self.VISpar.FlagAutoSizes)
|
|
1396
1416
|
|
|
1397
1417
|
def button_invert_y_set(self):
|
|
1398
1418
|
self.ui.button_invert_y.setChecked(self.VISpar.FlagYInvert[self.VISpar.type])
|
|
@@ -1480,6 +1500,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1480
1500
|
FlagVecField=self.VISpar.isDifferentFrom(self.VISpar_old,fields=fields)
|
|
1481
1501
|
if FlagVecField and self.result:
|
|
1482
1502
|
self.showVecField()
|
|
1503
|
+
elif self.result is None: self.cleanVecField()
|
|
1483
1504
|
FlagDraw=FlagDraw or FlagVecField
|
|
1484
1505
|
|
|
1485
1506
|
if FlagDraw:
|
|
@@ -1520,7 +1541,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1520
1541
|
FlagXLim=True
|
|
1521
1542
|
else:
|
|
1522
1543
|
self.imgshow.set_data(img)
|
|
1523
|
-
extent=self.imgExtent()
|
|
1544
|
+
extent=self.imgExtent(size)
|
|
1524
1545
|
if extent!=self.imgshow.get_extent():
|
|
1525
1546
|
self.imgshow.set_extent(extent)
|
|
1526
1547
|
FlagExtent=True
|
|
@@ -1560,7 +1581,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1560
1581
|
return cmap, levs
|
|
1561
1582
|
|
|
1562
1583
|
def getXYRes(self,type=None):
|
|
1563
|
-
if
|
|
1584
|
+
if type is None: type=self.VISpar.type
|
|
1564
1585
|
xres=yres=1.0
|
|
1565
1586
|
if self.VISpar.Process==ProcessTypes.piv and not self.VISpar.Out.FlagNone:
|
|
1566
1587
|
if type==0: #mm/pixels
|
PaIRS_UniNa/Whatsnew.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from .PaIRS_pypacks import*
|
|
2
2
|
from .ui_Whatsnew import Ui_Whatsnew
|
|
3
|
-
from .__init__ import __version__
|
|
3
|
+
from .__init__ import __version__,__subversion__
|
|
4
4
|
import unicodedata
|
|
5
5
|
|
|
6
6
|
#from TabTools import setupWid,setFontPixelSize,setFontSizeText
|
|
@@ -101,8 +101,9 @@ def whatsNew(self):
|
|
|
101
101
|
splitted_news[k]= f'<br/><span style="font-weight: 600; font-size: {fontPixelSize}px;">{text[1:]}</span><br/>'
|
|
102
102
|
news="".join(splitted_news)
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
subversion_string=f'(.{__subversion__})' if int(__subversion__) else ''
|
|
105
|
+
Message=f'<span style=" font-size: {fontPixelSize+dfontPixelSize}px; font-weight: 600;">'+f"What's new in PaIRS-UniNa {__version__}{subversion_string}"+'</span><br/><br/>'+news+'<br/>Go to the menu "? -> Changes" for further information.'
|
|
106
|
+
self.whatsnew=Whatsnew(self,Message,f'Updates of version {__version__}{subversion_string}',dfontPixelSize)
|
|
106
107
|
#warningDialog(self,Message,pixmap=''+ icons_path +'news.png',title=f'Updates of version {__version__}',flagRichText=True)
|
|
107
108
|
except Exception as inst:
|
|
108
109
|
pri.Error.red(f"There was a problem while launching the What's new dialog box:\n{inst}")
|
PaIRS_UniNa/_PaIRS_PIV.pyd
CHANGED
|
Binary file
|
PaIRS_UniNa/__init__.py
CHANGED