PaIRS-UniNa 0.2.5__cp313-cp313-win_amd64.whl → 0.2.6__cp313-cp313-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.
Potentially problematic release.
This version of PaIRS-UniNa might be problematic. Click here for more details.
- PaIRS_UniNa/Changes.txt +14 -2
- PaIRS_UniNa/Explorer.py +10 -6
- PaIRS_UniNa/Input_Tab.py +5 -2
- PaIRS_UniNa/Input_Tab_CalVi.py +4 -4
- PaIRS_UniNa/Input_Tab_tools.py +4 -3
- PaIRS_UniNa/PaIRS_pypacks.py +182 -56
- PaIRS_UniNa/Process_Tab.py +2 -2
- PaIRS_UniNa/Process_Tab_Disp.py +1 -1
- PaIRS_UniNa/Saving_tools.py +7 -7
- PaIRS_UniNa/TabTools.py +7 -4
- PaIRS_UniNa/Vis_Tab.py +57 -38
- PaIRS_UniNa/Whatsnew.py +11 -0
- PaIRS_UniNa/_PaIRS_PIV.pyd +0 -0
- PaIRS_UniNa/__init__.py +3 -3
- PaIRS_UniNa/gPaIRS.py +111 -31
- PaIRS_UniNa/icons/flaticon_PaIRS_download_warning.png +0 -0
- PaIRS_UniNa/icons/pencil_bw.png +0 -0
- PaIRS_UniNa/pivParFor.py +1 -1
- PaIRS_UniNa/rqrdpckgs.txt +6 -5
- PaIRS_UniNa/stereoPivParFor.py +1 -1
- PaIRS_UniNa/ui_gPairs.py +9 -3
- PaIRS_UniNa/whatsnew.txt +3 -4
- {pairs_unina-0.2.5.dist-info → pairs_unina-0.2.6.dist-info}/METADATA +24 -19
- {pairs_unina-0.2.5.dist-info → pairs_unina-0.2.6.dist-info}/RECORD +26 -24
- {pairs_unina-0.2.5.dist-info → pairs_unina-0.2.6.dist-info}/WHEEL +0 -0
- {pairs_unina-0.2.5.dist-info → pairs_unina-0.2.6.dist-info}/top_level.txt +0 -0
PaIRS_UniNa/Saving_tools.py
CHANGED
|
@@ -143,7 +143,7 @@ def save_list_to_file_serialized(l, filename, flagJSON=False):
|
|
|
143
143
|
print(f'Error while saving the file {filename}!\n{e}\n')
|
|
144
144
|
|
|
145
145
|
if pickle_counter:
|
|
146
|
-
pri.
|
|
146
|
+
pri.IOError.yellow(f'The following non-json serializable items were found in {filename}:\n'+"\n".join(info_pickle))
|
|
147
147
|
pickle_filename = basename+'.pairs_data'
|
|
148
148
|
try:
|
|
149
149
|
with open(pickle_filename, 'wb') as file:
|
|
@@ -177,7 +177,7 @@ def load_list_from_file_serialized(filename):
|
|
|
177
177
|
except Exception as e:
|
|
178
178
|
error=e
|
|
179
179
|
if error:
|
|
180
|
-
|
|
180
|
+
pri.IOError.red(f'Error while loading the file {filename}!\n{error}\n')
|
|
181
181
|
return serialized_list, str(error)
|
|
182
182
|
|
|
183
183
|
error=''
|
|
@@ -187,7 +187,7 @@ def load_list_from_file_serialized(filename):
|
|
|
187
187
|
with open(pickle_filename, 'rb') as file:
|
|
188
188
|
pickle_data = pickle.load(file)
|
|
189
189
|
except Exception as e:
|
|
190
|
-
|
|
190
|
+
pri.IOError.red(f'Error while loading the file {pickle_filename}!\n{e}\n')
|
|
191
191
|
error+=str(e)
|
|
192
192
|
|
|
193
193
|
info_pickle=[]
|
|
@@ -228,7 +228,7 @@ def load_list_from_file_serialized(filename):
|
|
|
228
228
|
else:
|
|
229
229
|
setattr(new_instance,f,v_loaded)
|
|
230
230
|
except Exception as e:
|
|
231
|
-
pri.
|
|
231
|
+
pri.IOError.red(f'Error while reading the file {filename} (setting "{key}" field of {cls_name} item)\n{traceback.format_exc()}\n')
|
|
232
232
|
fields[key] = new_instance
|
|
233
233
|
elif isinstance(value, dict) and '__file_ref__' in value:
|
|
234
234
|
ref_key = value['__file_ref__']
|
|
@@ -253,12 +253,12 @@ def load_list_from_file_serialized(filename):
|
|
|
253
253
|
return deserialize_element(lst)
|
|
254
254
|
|
|
255
255
|
if info_pickle:
|
|
256
|
-
pri.
|
|
256
|
+
pri.IOError.red(f'The following non-json serializable items were not found in {filename}:\n'+"\n".join(info_pickle))
|
|
257
257
|
l=None
|
|
258
258
|
try:
|
|
259
259
|
l=deserialize_list(serialized_list)
|
|
260
260
|
except Exception as e:
|
|
261
|
-
|
|
261
|
+
pri.IOError.red(f'Error while loading the file {filename}!\n{e}\n{traceback.format_exc()}\n')
|
|
262
262
|
error+=str(e)
|
|
263
263
|
return l, error
|
|
264
264
|
|
|
@@ -285,7 +285,7 @@ def load_list_from_file(filename):
|
|
|
285
285
|
l=pickle.load(file)
|
|
286
286
|
except Exception as e:
|
|
287
287
|
errorMessage=f'Error while loading the file {filename}!\n{e}\n'
|
|
288
|
-
|
|
288
|
+
pri.IOError.red(errorMessage)
|
|
289
289
|
return l, errorMessage
|
|
290
290
|
|
|
291
291
|
if FLAG_SERIALIZED:
|
PaIRS_UniNa/TabTools.py
CHANGED
|
@@ -877,7 +877,10 @@ class gPaIRS_Tab(QWidget):
|
|
|
877
877
|
self.button_link_step.setStatusTip(self.button_link_step.toolTip())
|
|
878
878
|
self.button_link_step.setChecked(len(self.TABpar.link)!=0)
|
|
879
879
|
|
|
880
|
-
|
|
880
|
+
if self.gui.ui.Explorer.TREpar.step is None:
|
|
881
|
+
FlagProcessTree=False
|
|
882
|
+
else:
|
|
883
|
+
FlagProcessTree=self.gui.ui.Explorer.currentTree==self.gui.ui.Explorer.processTree and self.gui.ui.Explorer.TREpar.step>0
|
|
881
884
|
FlagLabel=(self.TABpar.flagRun!=0 and len(self.TABpar.link)==0) or len(self.TABpar.link)>0
|
|
882
885
|
FlagReset=self.TABpar.flagRun!=0 and len(self.TABpar.link)==0
|
|
883
886
|
FlagInherit=self.TABpar.flagRun==0 and len(self.TABpar.link)==0 and len(self.gui.IOVheritableSteps())>0
|
|
@@ -1129,11 +1132,11 @@ def setFontPixelSize(self,fPixSize):
|
|
|
1129
1132
|
|
|
1130
1133
|
def setFontSizeText(lab:QLabel,fPixSizes):
|
|
1131
1134
|
text=lab.text()
|
|
1132
|
-
text=re.sub("font-size:\d+pt",f"font-size:{fPixSizes[0]}px",text)
|
|
1133
|
-
text=re.sub("font-size:\d+px",f"font-size:{fPixSizes[0]}px",text)
|
|
1135
|
+
text=re.sub(r"font-size:\d+pt",f"font-size:{fPixSizes[0]}px",text)
|
|
1136
|
+
text=re.sub(r"font-size:\d+px",f"font-size:{fPixSizes[0]}px",text)
|
|
1134
1137
|
if len(fPixSizes)>1:
|
|
1135
1138
|
for k in range(len(fPixSizes)-1,0,-1):
|
|
1136
|
-
text=re.sub("font-size:\d+px",f"font-size:{fPixSizes[k]}px",text,k)
|
|
1139
|
+
text=re.sub(r"font-size:\d+px",f"font-size:{fPixSizes[k]}px",text,k)
|
|
1137
1140
|
lab.setText(text)
|
|
1138
1141
|
font=lab.font()
|
|
1139
1142
|
font.setPixelSize(fPixSizes[0])
|
PaIRS_UniNa/Vis_Tab.py
CHANGED
|
@@ -420,6 +420,9 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
420
420
|
#------------------------------------- Graphical interface: miscellanea
|
|
421
421
|
self.brush_cursor= QCursor(QPixmap(icons_path+"brush_cursor.png").scaled(24,24,mode=Qt.TransformationMode.SmoothTransformation))
|
|
422
422
|
self.FlagNormalCursor=True
|
|
423
|
+
self.CursorTimer = QTimer(self)
|
|
424
|
+
self.CursorTimer.setSingleShot(True)
|
|
425
|
+
self.CursorTimer.timeout.connect(self.forceRestoreArrowCursor)
|
|
423
426
|
|
|
424
427
|
self.img=None
|
|
425
428
|
self.imgshow=None
|
|
@@ -676,7 +679,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
676
679
|
if self.VISpar.img>0:
|
|
677
680
|
self.VISpar.image_file=self.VISpar.path+self.VISpar.imList[self.VISpar.cam-1][self.VISpar.frame-1][self.VISpar.img-1] if len(self.VISpar.imList[self.VISpar.cam-1][self.VISpar.frame-1]) else ''
|
|
678
681
|
elif self.VISpar.img==0:
|
|
679
|
-
self.VISpar.image_file=self.VISpar.image_file_Current if self.VISpar.flagRun==-2 else self.VISpar.image_file_Disp if self.VISpar.variableKey==self.namesPIV.dispMap else self.VISpar.image_file_Min
|
|
682
|
+
self.VISpar.image_file=self.VISpar.image_file_Current if self.VISpar.flagRun==-2 and self.VISpar.variableKey!=self.namesPIV.dispMap else self.VISpar.image_file_Disp if self.VISpar.variableKey==self.namesPIV.dispMap else self.VISpar.image_file_Min
|
|
680
683
|
else:
|
|
681
684
|
self.VISpar.image_file=self.image_file_Load
|
|
682
685
|
|
|
@@ -717,7 +720,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
717
720
|
self.image_file=self.VISpar.image_file
|
|
718
721
|
if self.VISpar.img==0:
|
|
719
722
|
if self.VISpar.flagRun==-2:
|
|
720
|
-
self.image_raw=self.image_Current_raw[self.VISpar.frame] if self.image_Current_raw else None
|
|
723
|
+
self.image_raw=self.image_Disp_raw if self.VISpar.variableKey==self.namesPIV.dispMap else self.image_Current_raw[self.VISpar.frame] if self.image_Current_raw else None
|
|
721
724
|
else:
|
|
722
725
|
self.image_raw=self.image_Disp_raw if self.VISpar.variableKey==self.namesPIV.dispMap else self.image_Min_raw
|
|
723
726
|
else:
|
|
@@ -871,7 +874,10 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
871
874
|
self.ui.image_levels.setCurrentIndex(i)
|
|
872
875
|
self.ui.label_title.setText(f"Settings ({i+1}/{c+1})")
|
|
873
876
|
|
|
874
|
-
|
|
877
|
+
if self.VISpar.variableKey in self.VISpar.vLim:
|
|
878
|
+
Lim=self.VISpar.vLim[self.VISpar.variableKey]
|
|
879
|
+
else:
|
|
880
|
+
Lim=1.0
|
|
875
881
|
step=Lim/nStepsSlider
|
|
876
882
|
FlagLim= self.VISpar.type or FlagDispMap
|
|
877
883
|
self.ui.spin_min.setMinimum(-Lim if FlagLim else 0)
|
|
@@ -929,8 +935,10 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
929
935
|
self.ui.name_var.setToolTip(f'{dataType} file: {dataName}')
|
|
930
936
|
self.ui.name_var.setStatusTip(self.ui.name_var.toolTip())
|
|
931
937
|
|
|
932
|
-
self.VISpar.
|
|
933
|
-
|
|
938
|
+
if self.VISpar.variableKey in self.VISpar.vcolorMap:
|
|
939
|
+
self.VISpar.colorMap=self.VISpar.vcolorMap[self.VISpar.variableKey]
|
|
940
|
+
if self.VISpar.variableKey in self.VISpar.vvectorColor:
|
|
941
|
+
self.VISpar.vectorColor=self.VISpar.vvectorColor[self.VISpar.variableKey]
|
|
934
942
|
|
|
935
943
|
self.ui.button_cmap.setIcon(QIcon(icons_path+'colormaps/'+self.VISpar.colorMap+'.png'))
|
|
936
944
|
self.ui.button_cvec.setIcon(QIcon(icons_path+'colormaps/'+self.VISpar.vectorColor+'Vector.png'))
|
|
@@ -950,17 +958,19 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
950
958
|
return
|
|
951
959
|
|
|
952
960
|
def setLevels(self):
|
|
953
|
-
self.VISpar.
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
961
|
+
if self.VISpar.variableKey in self.VISpar.vmin:
|
|
962
|
+
self.VISpar.min=self.VISpar.vmin[self.VISpar.variableKey]
|
|
963
|
+
self.VISpar.max=self.VISpar.vmax[self.VISpar.variableKey]
|
|
964
|
+
self.VISpar.mean=self.VISpar.vmean[self.VISpar.variableKey]
|
|
965
|
+
self.VISpar.range=self.VISpar.vrange[self.VISpar.variableKey]
|
|
957
966
|
|
|
958
967
|
def resetLevels(self):
|
|
959
|
-
self.VISpar.
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
968
|
+
if self.VISpar.variableKey in self.VISpar.vmin_default:
|
|
969
|
+
self.VISpar.vmin[self.VISpar.variableKey]=self.VISpar.vmin_default[self.VISpar.variableKey]
|
|
970
|
+
self.VISpar.vmax[self.VISpar.variableKey]=self.VISpar.vmax_default[self.VISpar.variableKey]
|
|
971
|
+
self.VISpar.vmean[self.VISpar.variableKey]=self.VISpar.vmean_default[self.VISpar.variableKey]
|
|
972
|
+
self.VISpar.vrange[self.VISpar.variableKey]=self.VISpar.vrange_default[self.VISpar.variableKey]
|
|
973
|
+
#self.setLevels()
|
|
964
974
|
|
|
965
975
|
def resetAllLevels(self, ind=None):
|
|
966
976
|
if ind is None: VIS:VISpar=self.VISpar
|
|
@@ -1007,6 +1017,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1007
1017
|
def getImageInfo(self,image=None,ind=None):
|
|
1008
1018
|
if image is None: I=self.image
|
|
1009
1019
|
else: I=image
|
|
1020
|
+
if I is None: return
|
|
1010
1021
|
if ind is None: VIS:VISpar=self.VISpar
|
|
1011
1022
|
else: VIS:VISpar=self.TABpar_at(ind)
|
|
1012
1023
|
variableKey=self.VISpar.variableKey
|
|
@@ -1082,6 +1093,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1082
1093
|
def getResultInfo(self,result=None,ind=None):
|
|
1083
1094
|
if result is None: res=self.result
|
|
1084
1095
|
else: res=result
|
|
1096
|
+
if res is None: return
|
|
1085
1097
|
if ind is None: VIS:VISpar=self.VISpar
|
|
1086
1098
|
else: VIS:VISpar=self.TABpar_at(ind)
|
|
1087
1099
|
for i in list(VIS.vmin_default):
|
|
@@ -1141,7 +1153,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1141
1153
|
|
|
1142
1154
|
def button_ShowIW_action(self):
|
|
1143
1155
|
self.VISpar.FlagShowIW=self.ui.button_ShowIW.isChecked()
|
|
1144
|
-
self.resetXYLims()
|
|
1156
|
+
#if self.VISpar.FlagShowIW: self.resetXYLims()
|
|
1145
1157
|
|
|
1146
1158
|
def button_SubMIN_action(self):
|
|
1147
1159
|
self.VISpar.FlagSubMIN=self.ui.button_SubMIN.isChecked()
|
|
@@ -1384,14 +1396,18 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1384
1396
|
self.VISpar.size[self.VISpar.type][:2]=[xmin/self.xres,xmax/self.xres]
|
|
1385
1397
|
self.VISpar.size[self.VISpar.type][2:4]=[ymin/self.yres,ymax/self.yres]
|
|
1386
1398
|
|
|
1399
|
+
def forceRestoreArrowCursor(self):
|
|
1400
|
+
if self.CursorTimer.isActive():
|
|
1401
|
+
self.CursorTimer.stop()
|
|
1402
|
+
while QApplication.overrideCursor() is not None:
|
|
1403
|
+
QApplication.restoreOverrideCursor()
|
|
1404
|
+
self.FlagNormalCursor = True
|
|
1405
|
+
|
|
1387
1406
|
def brushCursor(self):
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
QApplication.restoreOverrideCursor()
|
|
1393
|
-
self.FlagNormalCursor=True
|
|
1394
|
-
QTimer.singleShot(250,lambda: restoreCursor())
|
|
1407
|
+
self.forceRestoreArrowCursor()
|
|
1408
|
+
self.FlagNormalCursor=False
|
|
1409
|
+
QApplication.setOverrideCursor(self.brush_cursor)
|
|
1410
|
+
self.CursorTimer.start(250)
|
|
1395
1411
|
|
|
1396
1412
|
def setMapVar(self):
|
|
1397
1413
|
pri.PlotTime.magenta(f'{"/"*25} Plotting image - start')
|
|
@@ -1417,12 +1433,13 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1417
1433
|
if self.orect: self.cleanRect()
|
|
1418
1434
|
self.cleanCommonRegion()
|
|
1419
1435
|
fields=['result_file','variable','unit','min','max','nclev','FlagContourf','colorMap']
|
|
1436
|
+
if self.VISpar.variableKey not in self.result: raise('Variable not found in result structure!')
|
|
1420
1437
|
V=self.result[self.VISpar.variableKey]
|
|
1421
1438
|
if not self.VISpar.FlagContourf:
|
|
1422
1439
|
self.img,Ximg,Yimg,FlagInterp,size=self.calcMap(V,size_pixels=[np.size(V,0), np.size(V,1)])
|
|
1423
1440
|
FlagDraw=self.showImg(fields,size)
|
|
1424
1441
|
else:
|
|
1425
|
-
self.img,Ximg,Yimg,FlagInterp,size=self.calcMap(
|
|
1442
|
+
self.img,Ximg,Yimg,FlagInterp,size=self.calcMap(V)
|
|
1426
1443
|
if FlagInterp:
|
|
1427
1444
|
FlagDraw=self.showImg(fields,size)
|
|
1428
1445
|
else:
|
|
@@ -1564,6 +1581,7 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1564
1581
|
else: xres=yres=1.0
|
|
1565
1582
|
X=result[self.namesPIV.x]*xres
|
|
1566
1583
|
Y=result[self.namesPIV.y]*yres
|
|
1584
|
+
if self.VISpar.variableKey not in self.result: raise('Variable not found in result structure!')
|
|
1567
1585
|
V=result[self.VISpar.variableKey]
|
|
1568
1586
|
self.map=[X,Y,V]
|
|
1569
1587
|
|
|
@@ -1836,21 +1854,22 @@ class Vis_Tab(gPaIRS_Tab):
|
|
|
1836
1854
|
else:
|
|
1837
1855
|
yin0=0
|
|
1838
1856
|
xin0=xmax
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1857
|
+
if self.VISpar.FlagShowIW and self.VISpar.isDifferentFrom(self.VISpar_old,fields=['FlagShowIW']):
|
|
1858
|
+
xlim=self.ui.plot.axes.get_xlim()
|
|
1859
|
+
xlim_min=min([xlim[0],xlim_min])
|
|
1860
|
+
xlim_max=max([xlim[1],xlim_max])
|
|
1861
|
+
self.ui.plot.axes.set_xlim(xlim_min,xlim_max)
|
|
1862
|
+
if self.VISpar.FlagYInvert[self.VISpar.type]:
|
|
1863
|
+
ylim=self.ui.plot.axes.get_ylim()
|
|
1864
|
+
ylim_max=min([ylim[1],ylim_min])
|
|
1865
|
+
ylim_min=max([ylim[0],ylim_max])
|
|
1866
|
+
else:
|
|
1867
|
+
ylim=self.ui.plot.axes.get_ylim()
|
|
1868
|
+
ylim_min=min([ylim[0],ylim_min])
|
|
1869
|
+
ylim_max=max([ylim[1],ylim_max])
|
|
1870
|
+
self.ui.plot.axes.set_ylim(ylim_min,ylim_max)
|
|
1871
|
+
self.VISpar.xmin,self.VISpar.xmax=list(self.ui.plot.axes.get_xlim())
|
|
1872
|
+
self.VISpar.ymin,self.VISpar.ymax=list(self.ui.plot.axes.get_ylim())
|
|
1854
1873
|
|
|
1855
1874
|
def cleanCommonRegion(self):
|
|
1856
1875
|
if self.CR:
|
PaIRS_UniNa/Whatsnew.py
CHANGED
|
@@ -50,8 +50,10 @@ class Whatsnew(QMainWindow):
|
|
|
50
50
|
self.ui.button_Ok.clicked.connect(self.close)
|
|
51
51
|
|
|
52
52
|
def whatsNew(self):
|
|
53
|
+
FlagCheckWhatWasNew=False
|
|
53
54
|
if os.path.exists(fileWhatsNew[0]):
|
|
54
55
|
filename=fileWhatsNew[0]
|
|
56
|
+
FlagCheckWhatWasNew=True
|
|
55
57
|
elif os.path.exists(fileWhatsNew[1]):
|
|
56
58
|
filename=fileWhatsNew[1]
|
|
57
59
|
else:
|
|
@@ -72,6 +74,15 @@ def whatsNew(self):
|
|
|
72
74
|
news=content.replace('\r','').replace('\n','').replace('$',warn).replace('*',star)
|
|
73
75
|
news=news.replace('<br/><br/>','',1)
|
|
74
76
|
"""
|
|
77
|
+
if FlagCheckWhatWasNew and os.path.exists(fileWhatsNew[1]):
|
|
78
|
+
file_old = open(fileWhatsNew[1], "rb")
|
|
79
|
+
content_old = file_old.read().decode("utf-8")
|
|
80
|
+
file_old.close()
|
|
81
|
+
if content_old==content:
|
|
82
|
+
os.remove(fileWhatsNew[1])
|
|
83
|
+
os.rename(fileWhatsNew[0],fileWhatsNew[1])
|
|
84
|
+
return
|
|
85
|
+
|
|
75
86
|
splitted_news=content.splitlines()
|
|
76
87
|
for k, text in enumerate(splitted_news):
|
|
77
88
|
if not text: continue
|
PaIRS_UniNa/_PaIRS_PIV.pyd
CHANGED
|
Binary file
|
PaIRS_UniNa/__init__.py
CHANGED
PaIRS_UniNa/gPaIRS.py
CHANGED
|
@@ -131,8 +131,14 @@ class infoPaIRS(QMainWindow):
|
|
|
131
131
|
websiteString=f'<a href="{website}"><span style=" text-decoration: underline; color:#0000ff; font-size:11pt">{website}</a>'
|
|
132
132
|
infotext=infotext.replace('wwww',websiteString)
|
|
133
133
|
self.ui.info.setText(infotext)
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
if Flag_ISEXE:
|
|
135
|
+
#self.ui.tabWidget.removeTab(3)
|
|
136
|
+
self.ui.tabWidget.setTabText(3,'Packages')
|
|
137
|
+
self.ui.req.setText(self.distPackages())
|
|
138
|
+
else:
|
|
139
|
+
self.ui.tabWidget.setTabText(3,'Requirements')
|
|
140
|
+
self.ui.req.setText(self.requirements())
|
|
141
|
+
|
|
136
142
|
self.fontPixelSize=gui.GPApar.fontPixelSize
|
|
137
143
|
self.setFontSizeText()
|
|
138
144
|
|
|
@@ -158,6 +164,59 @@ class infoPaIRS(QMainWindow):
|
|
|
158
164
|
setFontSizeText(self.ui.tom_cv,[fPixSize+1])
|
|
159
165
|
setFontSizeText(self.ui.list_ref,[fPixSize+1])
|
|
160
166
|
|
|
167
|
+
def distPackages(self):
|
|
168
|
+
# Read the contents of the file and split by lines
|
|
169
|
+
with open(rqrdpckgs_filename, 'r') as file:
|
|
170
|
+
lines = file.readlines()
|
|
171
|
+
|
|
172
|
+
# Introductory sentence
|
|
173
|
+
intro_text = """
|
|
174
|
+
<p style="font-size: 12pt; font-weight: normal; text-align: justify;">
|
|
175
|
+
Python packages included in the current executable:
|
|
176
|
+
</p>
|
|
177
|
+
<p>
|
|
178
|
+
|
|
179
|
+
</p>
|
|
180
|
+
"""
|
|
181
|
+
|
|
182
|
+
# Start the HTML table with improved styling
|
|
183
|
+
html_table = intro_text + """
|
|
184
|
+
<table border="1" style="width: 100%; align-items: center;">
|
|
185
|
+
<thead>
|
|
186
|
+
<tr>
|
|
187
|
+
<th style="padding: 10px; font-size: 11pt; font-weight: bold;">Package</th>
|
|
188
|
+
<th style="padding: 10px; font-size: 11pt; font-weight: bold;">Version</th>
|
|
189
|
+
</tr>
|
|
190
|
+
</thead>
|
|
191
|
+
<tbody>
|
|
192
|
+
"""
|
|
193
|
+
|
|
194
|
+
# Iterate over each line in the file
|
|
195
|
+
for line in lines:
|
|
196
|
+
# Split each line into package name, min vers11pt max version, and other info
|
|
197
|
+
package_info = line.strip().split()
|
|
198
|
+
|
|
199
|
+
# Ensure the line has the expected format
|
|
200
|
+
if len(package_info) >= 3:
|
|
201
|
+
package_name = package_info[0]
|
|
202
|
+
if package_name[0]=='#': continue
|
|
203
|
+
max_version = package_info[2]
|
|
204
|
+
|
|
205
|
+
# Append a row to the HTML table
|
|
206
|
+
html_table += f"""
|
|
207
|
+
<tr>
|
|
208
|
+
<td style="padding: 10px; font-size: 11pt">{package_name}</td>
|
|
209
|
+
<td style="padding: 10px; font-size: 11pt">{max_version}</td>
|
|
210
|
+
</tr>
|
|
211
|
+
"""
|
|
212
|
+
|
|
213
|
+
# Close the table tags
|
|
214
|
+
html_table += """
|
|
215
|
+
</tbody>
|
|
216
|
+
</table>
|
|
217
|
+
"""
|
|
218
|
+
return html_table
|
|
219
|
+
|
|
161
220
|
def requirements(self):
|
|
162
221
|
# Read the contents of the file and split by lines
|
|
163
222
|
with open(rqrdpckgs_filename, 'r') as file:
|
|
@@ -166,7 +225,7 @@ class infoPaIRS(QMainWindow):
|
|
|
166
225
|
# Introductory sentence
|
|
167
226
|
intro_text = """
|
|
168
227
|
<p style="font-size: 12pt; font-weight: normal; text-align: justify;">
|
|
169
|
-
Required packages
|
|
228
|
+
Required Python packages with their minimum and maximum supported versions:
|
|
170
229
|
</p>
|
|
171
230
|
<p>
|
|
172
231
|
|
|
@@ -195,6 +254,7 @@ class infoPaIRS(QMainWindow):
|
|
|
195
254
|
# Ensure the line has the expected format
|
|
196
255
|
if len(package_info) >= 3:
|
|
197
256
|
package_name = package_info[0]
|
|
257
|
+
if package_name[0]=='#': continue
|
|
198
258
|
min_version = package_info[1]
|
|
199
259
|
max_version = package_info[2]
|
|
200
260
|
curr_version = package_info[3]
|
|
@@ -277,7 +337,7 @@ class gPaIRS(QMainWindow):
|
|
|
277
337
|
self.save_last_workspace()
|
|
278
338
|
self.closeAll()
|
|
279
339
|
if self.GPApar.FlagOutDated:
|
|
280
|
-
warningLatestVersion(self,self.app,flagExit=1,flagWarning=
|
|
340
|
+
warningLatestVersion(self,self.app,flagExit=1,flagWarning=self.GPApar.FlagOutDated in (-1,1,-1000))
|
|
281
341
|
self.close()
|
|
282
342
|
self.app.processEvents()
|
|
283
343
|
self.app.SecondaryThreads=self.SecondaryThreads
|
|
@@ -414,6 +474,8 @@ class gPaIRS(QMainWindow):
|
|
|
414
474
|
#------------------------------------- Graphical interface: miscellanea
|
|
415
475
|
self.flaticon_PaIRS_download=QIcon()
|
|
416
476
|
self.flaticon_PaIRS_download.addFile(icons_path+'flaticon_PaIRS_download.png')
|
|
477
|
+
self.flaticon_PaIRS_download_warning=QIcon()
|
|
478
|
+
self.flaticon_PaIRS_download_warning.addFile(icons_path+'flaticon_PaIRS_download_warning.png')
|
|
417
479
|
self.flaticon_PaIRS_beta=QIcon()
|
|
418
480
|
self.flaticon_PaIRS_beta.addFile(icons_path+'flaticon_PaIRS_beta.png')
|
|
419
481
|
|
|
@@ -837,6 +899,10 @@ class gPaIRS(QMainWindow):
|
|
|
837
899
|
self.showChanges=lambda: changes(self,Log_Tab,fileChanges)
|
|
838
900
|
self.ui.actionChanges.triggered.connect(self.showChanges)
|
|
839
901
|
self.ui.actionGuide.triggered.connect(self.guide)
|
|
902
|
+
self.ui.actionDownload.setVisible(not Flag_ISEXE)
|
|
903
|
+
if not Flag_ISEXE:
|
|
904
|
+
self.ui.menuHelp.insertSeparator(self.ui.actionDownload)
|
|
905
|
+
self.ui.actionDownload.triggered.connect(self.downloadApp)
|
|
840
906
|
self.ui.actionAbout.triggered.connect(self.about)
|
|
841
907
|
|
|
842
908
|
self.ui.button_PaIRS_download.clicked.connect(lambda: button_download_PaIRS_action(self,self.app))
|
|
@@ -1408,6 +1474,7 @@ class gPaIRS(QMainWindow):
|
|
|
1408
1474
|
self.checkProcesses(FlagInit=False,ind=ind_child)
|
|
1409
1475
|
ITE_ind:ITEpar = self.ui.Explorer.ITEfromInd(ind_child)
|
|
1410
1476
|
self.ui.Explorer.setITElayout(ITE_ind)
|
|
1477
|
+
self.inheritance(ind_child)
|
|
1411
1478
|
|
|
1412
1479
|
def IOVcopy(self,ind_slave,ind_master):
|
|
1413
1480
|
ITE:ITEpar = self.ui.Explorer.ITEfromInd(ind_master) #self.ui.Explorer.ITEfromTRE(self.TREpar)
|
|
@@ -2444,7 +2511,8 @@ class gPaIRS(QMainWindow):
|
|
|
2444
2511
|
if self.procdata:
|
|
2445
2512
|
pri.Time.red(f'stopProcs self.contProc={self.contProc}/{self.nProc} self.numCallBackTotOk={self.numCallBackTotOk} numFinalized={self.procdata.numFinalized} {self.FlagRun}')
|
|
2446
2513
|
|
|
2447
|
-
|
|
2514
|
+
FlagEnd = self.contProc==self.indProc+1 if self.FlagRun==2 else self.contProc==self.nProc
|
|
2515
|
+
if FlagEnd:
|
|
2448
2516
|
self.ui.Explorer.updateSwitchMovies(self.currind,FlagStart=False)
|
|
2449
2517
|
self.setSwitchEnabled(True)
|
|
2450
2518
|
self.disableDropping(False)
|
|
@@ -3102,7 +3170,7 @@ class gPaIRS(QMainWindow):
|
|
|
3102
3170
|
cfgString=f': {self.GPApar.outName}' if self.GPApar.outName and self.GPApar.outName!=lastcfgname else ''
|
|
3103
3171
|
if not self.GPApar.FlagSaved: cfgString+='*'
|
|
3104
3172
|
if Flag_DEBUG:#TA per non incasinarmi
|
|
3105
|
-
windowTitle=f'PaIRS (v{version}.{__subversion__} - {__date__}) -- cfg v{uicfg_version} -- PIV {self.PIVvers} -- {platform.system()}'
|
|
3173
|
+
windowTitle=f'PaIRS (v{version}.{__subversion__} - {__date__}) -- cfg v{uicfg_version} -- PIV {self.PIVvers} -- {platform.system()} -- Python {platform.python_version()}'
|
|
3106
3174
|
else:
|
|
3107
3175
|
windowTitle=f'PaIRS (v{version})'
|
|
3108
3176
|
windowTitle+=cfgString
|
|
@@ -3187,7 +3255,7 @@ class gPaIRS(QMainWindow):
|
|
|
3187
3255
|
#dir=self.w_Input.INPpar.path,\
|
|
3188
3256
|
options=optionNativeDialog)
|
|
3189
3257
|
if not filename: return
|
|
3190
|
-
waitingWindow=warningDialog(self,'Please, wait while retrieving previous workspace!\
|
|
3258
|
+
waitingWindow=warningDialog(self,'Please, wait while retrieving previous workspace!\n(If this action takes too much time, please consider to close the workspace before quitting PaIRS next time.)',pixmap=''+ icons_path +'sandglass.png',flagNoButtons=True,flagScreenCenter=True)
|
|
3191
3259
|
self.app.processEvents()
|
|
3192
3260
|
errorString=''
|
|
3193
3261
|
try:
|
|
@@ -3302,6 +3370,11 @@ class gPaIRS(QMainWindow):
|
|
|
3302
3370
|
url = QUrl("https://www.pairs.unina.it/web/PaIRS-UniNa-v020-Guide.pdf")
|
|
3303
3371
|
QDesktopServices.openUrl(url)
|
|
3304
3372
|
|
|
3373
|
+
def downloadApp(self):
|
|
3374
|
+
#url = QUrl("http://wpage.unina.it/etfd/PaIRS/PaIRS-UniNa-Guide.pdf")
|
|
3375
|
+
url = QUrl(EXEurl)
|
|
3376
|
+
QDesktopServices.openUrl(url)
|
|
3377
|
+
|
|
3305
3378
|
def about(self):
|
|
3306
3379
|
if self.aboutDialog:
|
|
3307
3380
|
self.aboutDialog.hide()
|
|
@@ -3475,27 +3548,28 @@ class gPaIRS(QMainWindow):
|
|
|
3475
3548
|
self.aCheckConnections=aFocusWid
|
|
3476
3549
|
self.ui.aFocusWid.triggered.connect(aFocusWid)
|
|
3477
3550
|
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3551
|
+
if not Flag_ISEXE:
|
|
3552
|
+
self.menuDebug.addSeparator()
|
|
3553
|
+
self.ui.aResetRequiredPackagesFile = self.menuDebug.addAction("Reset rqrdpckgs.txt file")
|
|
3554
|
+
def aResetRequiredPackagesFile():
|
|
3555
|
+
resetRequiredPackagesFile()
|
|
3556
|
+
self.ui.aResetRequiredPackagesFile.triggered.connect(aResetRequiredPackagesFile)
|
|
3557
|
+
|
|
3558
|
+
self.ui.aCheckRequiredPackages = self.menuDebug.addAction("Requirements' version check")
|
|
3559
|
+
def aCheckRequiredPackages():
|
|
3560
|
+
checkRequiredPackages(self,FlagDisplay=True)
|
|
3561
|
+
self.ui.aCheckRequiredPackages.triggered.connect(aCheckRequiredPackages)
|
|
3562
|
+
|
|
3563
|
+
self.ui.aShowPackIssue = self.menuDebug.addAction("Show/hide version check button")
|
|
3564
|
+
def aShowPackIssue():
|
|
3565
|
+
self.FlagPackIssue=not self.FlagPackIssue
|
|
3566
|
+
self.ui.button_packissue.setVisible(self.FlagPackIssue)
|
|
3567
|
+
self.ui.aShowPackIssue.triggered.connect(aShowPackIssue)
|
|
3568
|
+
|
|
3569
|
+
self.ui.aTryCheckRequiredPackages = self.menuDebug.addAction("Try requirements' version check")
|
|
3570
|
+
def aTryCheckRequiredPackages():
|
|
3571
|
+
checkRequiredPackages(self,FlagDisplay=True,FlagForcePrint=True)
|
|
3572
|
+
self.ui.aTryCheckRequiredPackages.triggered.connect(aTryCheckRequiredPackages)
|
|
3499
3573
|
|
|
3500
3574
|
#--------------------------- graphics
|
|
3501
3575
|
if Flag_fullDEBUG:
|
|
@@ -3579,10 +3653,13 @@ class gPaIRS(QMainWindow):
|
|
|
3579
3653
|
self.menuDebug.menuAction().setVisible(Flag)
|
|
3580
3654
|
|
|
3581
3655
|
def setButtonDownload(self,):
|
|
3582
|
-
self.ui.button_PaIRS_download.setVisible(self.GPApar.FlagOutDated
|
|
3656
|
+
self.ui.button_PaIRS_download.setVisible(self.GPApar.FlagOutDated!=0)
|
|
3583
3657
|
if self.GPApar.FlagOutDated>0:
|
|
3584
3658
|
self.ui.button_PaIRS_download.setIcon(self.flaticon_PaIRS_download)
|
|
3585
|
-
self.ui.button_PaIRS_download.setToolTip("Download the latest version of PaIRS-UniNa")
|
|
3659
|
+
self.ui.button_PaIRS_download.setToolTip("Download the latest version of PaIRS-UniNa.")
|
|
3660
|
+
elif self.GPApar.FlagOutDated==-1000:
|
|
3661
|
+
self.ui.button_PaIRS_download.setIcon(self.flaticon_PaIRS_download_warning)
|
|
3662
|
+
self.ui.button_PaIRS_download.setToolTip("Issue with verifying the latest release!")
|
|
3586
3663
|
else:
|
|
3587
3664
|
self.ui.button_PaIRS_download.setIcon(self.flaticon_PaIRS_beta)
|
|
3588
3665
|
self.ui.button_PaIRS_download.setToolTip("A beta version is currently used!")
|
|
@@ -3724,7 +3801,10 @@ def launchPaIRS(flagDebug=False,flagInputDebug=False):
|
|
|
3724
3801
|
splashAnimation(splash,gui.ui.logo)
|
|
3725
3802
|
#QTimer.singleShot(time_showSplashOnTop,splash.hide)
|
|
3726
3803
|
print('\nWelcome to PaIRS!\nEnjoy it!')
|
|
3727
|
-
|
|
3804
|
+
if not getattr(sys, 'frozen', False): #made by pyInstaller
|
|
3805
|
+
checkRequiredPackages(gui)
|
|
3806
|
+
else:
|
|
3807
|
+
gui.FlagPackIssue=False
|
|
3728
3808
|
gui.ui.button_packissue.setVisible(gui.FlagPackIssue)
|
|
3729
3809
|
if os.path.exists(fileWhatsNew[0]): gui.whatsNew()
|
|
3730
3810
|
app.exec()
|
|
Binary file
|
|
Binary file
|
PaIRS_UniNa/pivParFor.py
CHANGED
|
@@ -78,7 +78,7 @@ def procPIV(i,procId ,PIV,data:dataTreePar,numUsedProcs,*args,**kwargs):
|
|
|
78
78
|
where FLAG_FINALIZED_OR_ERR = [ p|e for (p,e) in zip(FLAG_FINALIZED,FLAG_READ_ERR)]
|
|
79
79
|
numProcOrErrTot=sum(1 if (f&FLAG_FINALIZED_OR_ERR[0])or(not f&FLAG_PROC[0]) else 0 for f in flagOut)
|
|
80
80
|
to delete images
|
|
81
|
-
pa='C
|
|
81
|
+
pa='C:\\desk\\dl\\apairs\\jetcross\\'
|
|
82
82
|
no='zR2jet0_0004a'
|
|
83
83
|
I =imread([pa no '.png']);
|
|
84
84
|
I=I*0+1;
|
PaIRS_UniNa/rqrdpckgs.txt
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
scipy 1.14.0 1.16.
|
|
2
|
-
matplotlib 3.9.0 3.10.
|
|
1
|
+
scipy 1.14.0 1.16.1 0
|
|
2
|
+
matplotlib 3.9.0 3.10.6 0
|
|
3
3
|
pillow 10.4.0 11.3.0 0
|
|
4
|
-
numpy 2.0.0 2.3.
|
|
5
|
-
pyside6 6.7.0 6.9.
|
|
4
|
+
numpy 2.0.0 2.3.2 0
|
|
5
|
+
pyside6 6.7.0 6.9.2 0
|
|
6
6
|
unidecode 1.3.0 1.4.0 0
|
|
7
7
|
psutil 6.0.0 7.0.0 0
|
|
8
|
-
debugpy 1.6.6 1.8.
|
|
8
|
+
debugpy 1.6.6 1.8.16 0
|
|
9
|
+
certifi 2025.7.14 2025.8.3 0
|
PaIRS_UniNa/stereoPivParFor.py
CHANGED
|
@@ -67,7 +67,7 @@ def procStereoPIV(i,procId ,StereoPIV,data:dataTreePar,numUsedProcs,*args,**kwar
|
|
|
67
67
|
where FLAG_FINALIZED_OR_ERR = [ p|e for (p,e) in zip(FLAG_FINALIZED,FLAG_READ_ERR)]
|
|
68
68
|
numProcOrErrTot=sum(1 if (f&FLAG_FINALIZED_OR_ERR[0])or(not f&FLAG_PROC[0]) else 0 for f in flagOut)
|
|
69
69
|
to delete images
|
|
70
|
-
pa='C
|
|
70
|
+
pa='C:\\desk\\dl\\apairs\\jetcross\\'
|
|
71
71
|
no='zR2jet0_0004a'
|
|
72
72
|
I =imread([pa no '.png']);
|
|
73
73
|
I=I*0+1;
|
PaIRS_UniNa/ui_gPairs.py
CHANGED
|
@@ -2,7 +2,7 @@ from .addwidgets_ps import icons_path
|
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
3
|
|
|
4
4
|
################################################################################
|
|
5
|
-
## Form generated from reading UI file '
|
|
5
|
+
## Form generated from reading UI file 'gPairsBWkUdB.ui'
|
|
6
6
|
##
|
|
7
7
|
## Created by: Qt User Interface Compiler version 6.7.2
|
|
8
8
|
##
|
|
@@ -120,6 +120,11 @@ class Ui_gPairs(object):
|
|
|
120
120
|
icon12 = QIcon()
|
|
121
121
|
icon12.addFile(u""+ icons_path +"news.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
|
122
122
|
self.actionChanges.setIcon(icon12)
|
|
123
|
+
self.actionDownload = QAction(gPairs)
|
|
124
|
+
self.actionDownload.setObjectName(u"actionDownload")
|
|
125
|
+
icon13 = QIcon()
|
|
126
|
+
icon13.addFile(u""+ icons_path +"flaticon_PaIRS_download.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
|
127
|
+
self.actionDownload.setIcon(icon13)
|
|
123
128
|
self.centralwidget = QWidget(gPairs)
|
|
124
129
|
self.centralwidget.setObjectName(u"centralwidget")
|
|
125
130
|
self.centralwidget.setMinimumSize(QSize(0, 0))
|
|
@@ -181,8 +186,6 @@ class Ui_gPairs(object):
|
|
|
181
186
|
font1.setPointSize(16)
|
|
182
187
|
self.button_PaIRS_download.setFont(font1)
|
|
183
188
|
self.button_PaIRS_download.setStyleSheet(u"QToolButton#button_PaIRS_download{border: none}")
|
|
184
|
-
icon13 = QIcon()
|
|
185
|
-
icon13.addFile(u""+ icons_path +"flaticon_PaIRS_download.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
|
186
189
|
self.button_PaIRS_download.setIcon(icon13)
|
|
187
190
|
self.button_PaIRS_download.setIconSize(QSize(24, 24))
|
|
188
191
|
self.button_PaIRS_download.setCheckable(False)
|
|
@@ -736,6 +739,8 @@ class Ui_gPairs(object):
|
|
|
736
739
|
self.menuHelp.addAction(self.actionChanges)
|
|
737
740
|
self.menuHelp.addAction(self.actionGuide)
|
|
738
741
|
self.menuHelp.addSeparator()
|
|
742
|
+
self.menuHelp.addAction(self.actionDownload)
|
|
743
|
+
self.menuHelp.addSeparator()
|
|
739
744
|
self.menuHelp.addAction(self.actionAbout)
|
|
740
745
|
self.menu.addAction(self.menuPaIRS.menuAction())
|
|
741
746
|
self.menuPaIRS.addAction(self.actionPaIRS_Run)
|
|
@@ -774,6 +779,7 @@ class Ui_gPairs(object):
|
|
|
774
779
|
self.actionCalVi_Clean_run.setText(QCoreApplication.translate("gPairs", u"Clean run", None))
|
|
775
780
|
self.actionCalVi_Debug_run.setText(QCoreApplication.translate("gPairs", u"Debug run", None))
|
|
776
781
|
self.actionChanges.setText(QCoreApplication.translate("gPairs", u"Changes", None))
|
|
782
|
+
self.actionDownload.setText(QCoreApplication.translate("gPairs", u"Download app", None))
|
|
777
783
|
#if QT_CONFIG(tooltip)
|
|
778
784
|
self.logo.setToolTip(QCoreApplication.translate("gPairs", u"PaIRS - Particle Image Reconstruction Software", None))
|
|
779
785
|
#endif // QT_CONFIG(tooltip)
|