PaIRS-UniNa 0.2.7__cp312-cp312-macosx_11_0_universal2.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 +331 -0
- PaIRS_UniNa/Changes.txt +135 -0
- PaIRS_UniNa/Custom_Top.py +303 -0
- PaIRS_UniNa/Explorer.py +3086 -0
- PaIRS_UniNa/FolderLoop.py +372 -0
- PaIRS_UniNa/Input_Tab.py +722 -0
- PaIRS_UniNa/Input_Tab_CalVi.py +788 -0
- PaIRS_UniNa/Input_Tab_tools.py +3024 -0
- PaIRS_UniNa/Log_Tab.py +110 -0
- PaIRS_UniNa/Output_Tab.py +924 -0
- PaIRS_UniNa/PaIRS.py +18 -0
- PaIRS_UniNa/PaIRS_PIV.py +873 -0
- PaIRS_UniNa/PaIRS_pypacks.py +1376 -0
- PaIRS_UniNa/Process_Tab.py +1757 -0
- PaIRS_UniNa/Process_Tab_CalVi.py +313 -0
- PaIRS_UniNa/Process_Tab_Disp.py +163 -0
- PaIRS_UniNa/Process_Tab_Min.py +120 -0
- PaIRS_UniNa/ResizePopup.py +55 -0
- PaIRS_UniNa/Saving_tools.py +296 -0
- PaIRS_UniNa/TabTools.py +1254 -0
- PaIRS_UniNa/Vis_Tab.py +2148 -0
- PaIRS_UniNa/Vis_Tab_CalVi.py +983 -0
- PaIRS_UniNa/Whatsnew.py +129 -0
- PaIRS_UniNa/_PaIRS_PIV.so +0 -0
- PaIRS_UniNa/__init__.py +6 -0
- PaIRS_UniNa/__main__.py +45 -0
- PaIRS_UniNa/addwidgets_ps.py +1133 -0
- PaIRS_UniNa/calib.py +1488 -0
- PaIRS_UniNa/calibView.py +833 -0
- PaIRS_UniNa/gPaIRS.py +3856 -0
- PaIRS_UniNa/gPalette.py +189 -0
- PaIRS_UniNa/icons/abort.png +0 -0
- PaIRS_UniNa/icons/about.png +0 -0
- PaIRS_UniNa/icons/align_all.png +0 -0
- PaIRS_UniNa/icons/announcement.png +0 -0
- PaIRS_UniNa/icons/automatic_levels_off.png +0 -0
- PaIRS_UniNa/icons/automatic_levels_on.png +0 -0
- PaIRS_UniNa/icons/automatic_off.png +0 -0
- PaIRS_UniNa/icons/automatic_on.png +0 -0
- PaIRS_UniNa/icons/automatic_size_off.png +0 -0
- PaIRS_UniNa/icons/automatic_size_on.png +0 -0
- PaIRS_UniNa/icons/axes.png +0 -0
- PaIRS_UniNa/icons/background.png +0 -0
- PaIRS_UniNa/icons/background_vectors.png +0 -0
- PaIRS_UniNa/icons/bin_off.png +0 -0
- PaIRS_UniNa/icons/bin_on.png +0 -0
- PaIRS_UniNa/icons/browse_file_c.png +0 -0
- PaIRS_UniNa/icons/browse_folder_c.png +0 -0
- PaIRS_UniNa/icons/brush_cursor.png +0 -0
- PaIRS_UniNa/icons/bugfix.png +0 -0
- PaIRS_UniNa/icons/cal_proc.png +0 -0
- PaIRS_UniNa/icons/cal_proc_off.png +0 -0
- PaIRS_UniNa/icons/cal_step.png +0 -0
- PaIRS_UniNa/icons/cal_step_off.png +0 -0
- PaIRS_UniNa/icons/calibrate.png +0 -0
- PaIRS_UniNa/icons/calibration_logo.png +0 -0
- PaIRS_UniNa/icons/change_folder.png +0 -0
- PaIRS_UniNa/icons/change_folder_off.png +0 -0
- PaIRS_UniNa/icons/checklist.png +0 -0
- PaIRS_UniNa/icons/clean.png +0 -0
- PaIRS_UniNa/icons/clean_run.png +0 -0
- PaIRS_UniNa/icons/close.png +0 -0
- PaIRS_UniNa/icons/close_all.png +0 -0
- PaIRS_UniNa/icons/close_project.png +0 -0
- PaIRS_UniNa/icons/close_workspace.png +0 -0
- PaIRS_UniNa/icons/colormap.png +0 -0
- PaIRS_UniNa/icons/colormaps/Accent.png +0 -0
- PaIRS_UniNa/icons/colormaps/BrBG.png +0 -0
- PaIRS_UniNa/icons/colormaps/Dark2.png +0 -0
- PaIRS_UniNa/icons/colormaps/PRGn.png +0 -0
- PaIRS_UniNa/icons/colormaps/Paired.png +0 -0
- PaIRS_UniNa/icons/colormaps/Pastel1.png +0 -0
- PaIRS_UniNa/icons/colormaps/Pastel2.png +0 -0
- PaIRS_UniNa/icons/colormaps/PiYG.png +0 -0
- PaIRS_UniNa/icons/colormaps/PuOr.png +0 -0
- PaIRS_UniNa/icons/colormaps/RdBu.png +0 -0
- PaIRS_UniNa/icons/colormaps/RdGy.png +0 -0
- PaIRS_UniNa/icons/colormaps/RdYlBu.png +0 -0
- PaIRS_UniNa/icons/colormaps/RdYlGn.png +0 -0
- PaIRS_UniNa/icons/colormaps/Set1.png +0 -0
- PaIRS_UniNa/icons/colormaps/Set2.png +0 -0
- PaIRS_UniNa/icons/colormaps/Set3.png +0 -0
- PaIRS_UniNa/icons/colormaps/Spectral.png +0 -0
- PaIRS_UniNa/icons/colormaps/Wistia.png +0 -0
- PaIRS_UniNa/icons/colormaps/afmhot.png +0 -0
- PaIRS_UniNa/icons/colormaps/autumn.png +0 -0
- PaIRS_UniNa/icons/colormaps/binary.png +0 -0
- PaIRS_UniNa/icons/colormaps/blackVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/blueVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/bone.png +0 -0
- PaIRS_UniNa/icons/colormaps/brg.png +0 -0
- PaIRS_UniNa/icons/colormaps/bwr.png +0 -0
- PaIRS_UniNa/icons/colormaps/cividis.png +0 -0
- PaIRS_UniNa/icons/colormaps/cool.png +0 -0
- PaIRS_UniNa/icons/colormaps/coolwarm.png +0 -0
- PaIRS_UniNa/icons/colormaps/copper.png +0 -0
- PaIRS_UniNa/icons/colormaps/cubehelix.png +0 -0
- PaIRS_UniNa/icons/colormaps/cyanVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/flag.png +0 -0
- PaIRS_UniNa/icons/colormaps/gist_heat.png +0 -0
- PaIRS_UniNa/icons/colormaps/gray.png +0 -0
- PaIRS_UniNa/icons/colormaps/greenVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/hot.png +0 -0
- PaIRS_UniNa/icons/colormaps/hsv.png +0 -0
- PaIRS_UniNa/icons/colormaps/inferno.png +0 -0
- PaIRS_UniNa/icons/colormaps/jet.png +0 -0
- PaIRS_UniNa/icons/colormaps/magentaVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/magma.png +0 -0
- PaIRS_UniNa/icons/colormaps/ocean.png +0 -0
- PaIRS_UniNa/icons/colormaps/pink.png +0 -0
- PaIRS_UniNa/icons/colormaps/plasma.png +0 -0
- PaIRS_UniNa/icons/colormaps/prism.png +0 -0
- PaIRS_UniNa/icons/colormaps/rainbow.png +0 -0
- PaIRS_UniNa/icons/colormaps/redVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/seismic.png +0 -0
- PaIRS_UniNa/icons/colormaps/spring.png +0 -0
- PaIRS_UniNa/icons/colormaps/summer.png +0 -0
- PaIRS_UniNa/icons/colormaps/tab10.png +0 -0
- PaIRS_UniNa/icons/colormaps/tab20.png +0 -0
- PaIRS_UniNa/icons/colormaps/tab20b.png +0 -0
- PaIRS_UniNa/icons/colormaps/tab20c.png +0 -0
- PaIRS_UniNa/icons/colormaps/terrain.png +0 -0
- PaIRS_UniNa/icons/colormaps/twilight.png +0 -0
- PaIRS_UniNa/icons/colormaps/viridis.png +0 -0
- PaIRS_UniNa/icons/colormaps/whiteVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/winter.png +0 -0
- PaIRS_UniNa/icons/colormaps/yellowVector.png +0 -0
- PaIRS_UniNa/icons/common_region.png +0 -0
- PaIRS_UniNa/icons/common_region_off.png +0 -0
- PaIRS_UniNa/icons/completed.png +0 -0
- PaIRS_UniNa/icons/contourf_off.png +0 -0
- PaIRS_UniNa/icons/contourf_on.png +0 -0
- PaIRS_UniNa/icons/copy.png +0 -0
- PaIRS_UniNa/icons/copy_process.png +0 -0
- PaIRS_UniNa/icons/copy_process_off.png +0 -0
- PaIRS_UniNa/icons/copygrid.png +0 -0
- PaIRS_UniNa/icons/cursor_lamp.png +0 -0
- PaIRS_UniNa/icons/cut.png +0 -0
- PaIRS_UniNa/icons/cut_warnings.png +0 -0
- PaIRS_UniNa/icons/darkmode.png +0 -0
- PaIRS_UniNa/icons/debug_run.png +0 -0
- PaIRS_UniNa/icons/delete.png +0 -0
- PaIRS_UniNa/icons/deleteErr.png +0 -0
- PaIRS_UniNa/icons/disp_step.png +0 -0
- PaIRS_UniNa/icons/disp_step_off.png +0 -0
- PaIRS_UniNa/icons/down.png +0 -0
- PaIRS_UniNa/icons/edit_list.png +0 -0
- PaIRS_UniNa/icons/editing.png +0 -0
- PaIRS_UniNa/icons/example_list.png +0 -0
- PaIRS_UniNa/icons/find_all_planes.png +0 -0
- PaIRS_UniNa/icons/find_plane.png +0 -0
- PaIRS_UniNa/icons/flaticon_PaIRS.png +0 -0
- PaIRS_UniNa/icons/flaticon_PaIRS_beta.png +0 -0
- PaIRS_UniNa/icons/flaticon_PaIRS_download.png +0 -0
- PaIRS_UniNa/icons/flaticon_PaIRS_download_warning.png +0 -0
- PaIRS_UniNa/icons/flip_y_off.png +0 -0
- PaIRS_UniNa/icons/flip_y_on.png +0 -0
- PaIRS_UniNa/icons/focusErrr.png +0 -0
- PaIRS_UniNa/icons/gear.gif +0 -0
- PaIRS_UniNa/icons/gear.png +0 -0
- PaIRS_UniNa/icons/ger.png +0 -0
- PaIRS_UniNa/icons/greenv.png +0 -0
- PaIRS_UniNa/icons/guide.png +0 -0
- PaIRS_UniNa/icons/icon_CalVi.png +0 -0
- PaIRS_UniNa/icons/icon_PaIRS.png +0 -0
- PaIRS_UniNa/icons/import.png +0 -0
- PaIRS_UniNa/icons/import_set.png +0 -0
- PaIRS_UniNa/icons/information.png +0 -0
- PaIRS_UniNa/icons/input_logo.png +0 -0
- PaIRS_UniNa/icons/issue.png +0 -0
- PaIRS_UniNa/icons/laser_NTR.png +0 -0
- PaIRS_UniNa/icons/laser_TR_double.png +0 -0
- PaIRS_UniNa/icons/laser_TR_single.png +0 -0
- PaIRS_UniNa/icons/link.png +0 -0
- PaIRS_UniNa/icons/linked.png +0 -0
- PaIRS_UniNa/icons/loaded.png +0 -0
- PaIRS_UniNa/icons/loading_2.gif +0 -0
- PaIRS_UniNa/icons/log_logo.png +0 -0
- PaIRS_UniNa/icons/logo_CalVi.png +0 -0
- PaIRS_UniNa/icons/logo_CalVi_completo.png +0 -0
- PaIRS_UniNa/icons/logo_CalVi_party.png +0 -0
- PaIRS_UniNa/icons/logo_PaIRS.png +0 -0
- PaIRS_UniNa/icons/logo_PaIRS_completo.png +0 -0
- PaIRS_UniNa/icons/logo_PaIRS_download.png +0 -0
- PaIRS_UniNa/icons/logo_PaIRS_party_rect.png +0 -0
- PaIRS_UniNa/icons/logo_PaIRS_rect.png +0 -0
- PaIRS_UniNa/icons/logo_opaco.png +0 -0
- PaIRS_UniNa/icons/mask.png +0 -0
- PaIRS_UniNa/icons/measure.png +0 -0
- PaIRS_UniNa/icons/measure_off.png +0 -0
- PaIRS_UniNa/icons/min_proc.png +0 -0
- PaIRS_UniNa/icons/min_proc_off.png +0 -0
- PaIRS_UniNa/icons/min_step.png +0 -0
- PaIRS_UniNa/icons/min_step_off.png +0 -0
- PaIRS_UniNa/icons/minus.png +0 -0
- PaIRS_UniNa/icons/mirror_u.png +0 -0
- PaIRS_UniNa/icons/mirror_v.png +0 -0
- PaIRS_UniNa/icons/mirror_x.png +0 -0
- PaIRS_UniNa/icons/mirror_y.png +0 -0
- PaIRS_UniNa/icons/mtplt.png +0 -0
- PaIRS_UniNa/icons/new.png +0 -0
- PaIRS_UniNa/icons/new_workspace.png +0 -0
- PaIRS_UniNa/icons/news.png +0 -0
- PaIRS_UniNa/icons/normal_run.png +0 -0
- PaIRS_UniNa/icons/open.png +0 -0
- PaIRS_UniNa/icons/open_image.png +0 -0
- PaIRS_UniNa/icons/open_new_window.png +0 -0
- PaIRS_UniNa/icons/open_result.png +0 -0
- PaIRS_UniNa/icons/open_workspace.png +0 -0
- PaIRS_UniNa/icons/output_logo.png +0 -0
- PaIRS_UniNa/icons/paste_above.png +0 -0
- PaIRS_UniNa/icons/paste_below.png +0 -0
- PaIRS_UniNa/icons/pause.png +0 -0
- PaIRS_UniNa/icons/paused.png +0 -0
- PaIRS_UniNa/icons/pencil_bw.png +0 -0
- PaIRS_UniNa/icons/piv_proc.png +0 -0
- PaIRS_UniNa/icons/piv_proc_off.png +0 -0
- PaIRS_UniNa/icons/piv_step.png +0 -0
- PaIRS_UniNa/icons/piv_step_off.png +0 -0
- PaIRS_UniNa/icons/plane.png +0 -0
- PaIRS_UniNa/icons/play.png +0 -0
- PaIRS_UniNa/icons/plus.png +0 -0
- PaIRS_UniNa/icons/process_logo.png +0 -0
- PaIRS_UniNa/icons/process_loop.png +0 -0
- PaIRS_UniNa/icons/project.png +0 -0
- PaIRS_UniNa/icons/pylog.png +0 -0
- PaIRS_UniNa/icons/python_warning.png +0 -0
- PaIRS_UniNa/icons/queue.png +0 -0
- PaIRS_UniNa/icons/quit.png +0 -0
- PaIRS_UniNa/icons/read.png +0 -0
- PaIRS_UniNa/icons/read_list.png +0 -0
- PaIRS_UniNa/icons/redo.png +0 -0
- PaIRS_UniNa/icons/redx.png +0 -0
- PaIRS_UniNa/icons/reset.png +0 -0
- PaIRS_UniNa/icons/reset_levels.png +0 -0
- PaIRS_UniNa/icons/resize_icon.png +0 -0
- PaIRS_UniNa/icons/restore.png +0 -0
- PaIRS_UniNa/icons/restore_undo.png +0 -0
- PaIRS_UniNa/icons/rotate_clock.png +0 -0
- PaIRS_UniNa/icons/rotate_counter.png +0 -0
- PaIRS_UniNa/icons/rotate_v_clock.png +0 -0
- PaIRS_UniNa/icons/rotate_v_counter.png +0 -0
- PaIRS_UniNa/icons/running.gif +0 -0
- PaIRS_UniNa/icons/running.png +0 -0
- PaIRS_UniNa/icons/running_warn.png +0 -0
- PaIRS_UniNa/icons/sandglass.png +0 -0
- PaIRS_UniNa/icons/save.png +0 -0
- PaIRS_UniNa/icons/save_and_stop.png +0 -0
- PaIRS_UniNa/icons/save_cfg.png +0 -0
- PaIRS_UniNa/icons/saveas.png +0 -0
- PaIRS_UniNa/icons/saveas_workspace.png +0 -0
- PaIRS_UniNa/icons/scale_all.png +0 -0
- PaIRS_UniNa/icons/scale_down.png +0 -0
- PaIRS_UniNa/icons/scale_up.png +0 -0
- PaIRS_UniNa/icons/scan_list.png +0 -0
- PaIRS_UniNa/icons/scan_path.png +0 -0
- PaIRS_UniNa/icons/search.png +0 -0
- PaIRS_UniNa/icons/showIW_off.png +0 -0
- PaIRS_UniNa/icons/showIW_on.png +0 -0
- PaIRS_UniNa/icons/show_all.png +0 -0
- PaIRS_UniNa/icons/sort.png +0 -0
- PaIRS_UniNa/icons/sort_reversed.png +0 -0
- PaIRS_UniNa/icons/spiv_proc.png +0 -0
- PaIRS_UniNa/icons/spiv_proc_off.png +0 -0
- PaIRS_UniNa/icons/star.png +0 -0
- PaIRS_UniNa/icons/step_inheritance.png +0 -0
- PaIRS_UniNa/icons/subMIN_off.png +0 -0
- PaIRS_UniNa/icons/subMIN_on.png +0 -0
- PaIRS_UniNa/icons/tom.png +0 -0
- PaIRS_UniNa/icons/trash.png +0 -0
- PaIRS_UniNa/icons/undo.png +0 -0
- PaIRS_UniNa/icons/unedited.png +0 -0
- PaIRS_UniNa/icons/unina_dii.png +0 -0
- PaIRS_UniNa/icons/uninitialized.png +0 -0
- PaIRS_UniNa/icons/unlink.png +0 -0
- PaIRS_UniNa/icons/unwrap_items.png +0 -0
- PaIRS_UniNa/icons/up.png +0 -0
- PaIRS_UniNa/icons/updating_import.gif +0 -0
- PaIRS_UniNa/icons/updating_pairs.gif +0 -0
- PaIRS_UniNa/icons/vectorColor.png +0 -0
- PaIRS_UniNa/icons/vettore.png +0 -0
- PaIRS_UniNa/icons/view.png +0 -0
- PaIRS_UniNa/icons/view_off.png +0 -0
- PaIRS_UniNa/icons/vis_logo.png +0 -0
- PaIRS_UniNa/icons/waiting_circle.png +0 -0
- PaIRS_UniNa/icons/warning.png +0 -0
- PaIRS_UniNa/icons/warning_circle.png +0 -0
- PaIRS_UniNa/icons/window.png +0 -0
- PaIRS_UniNa/icons/workspace.png +0 -0
- PaIRS_UniNa/icons/wrap_items.png +0 -0
- PaIRS_UniNa/icons/write_list.png +0 -0
- PaIRS_UniNa/listLib.py +303 -0
- PaIRS_UniNa/mtfPIV.py +256 -0
- PaIRS_UniNa/parForMulti.py +435 -0
- PaIRS_UniNa/parForWorkers.py +593 -0
- PaIRS_UniNa/pivParFor.py +235 -0
- PaIRS_UniNa/plt_util.py +141 -0
- PaIRS_UniNa/preProcParFor.py +155 -0
- PaIRS_UniNa/procTools.py +1394 -0
- PaIRS_UniNa/readcfg.py +52 -0
- PaIRS_UniNa/rqrdpckgs.txt +9 -0
- PaIRS_UniNa/stereoPivParFor.py +227 -0
- PaIRS_UniNa/tAVarie.py +215 -0
- PaIRS_UniNa/tabSplitter.py +612 -0
- PaIRS_UniNa/ui_Calibration_Tab.py +545 -0
- PaIRS_UniNa/ui_Custom_Top.py +296 -0
- PaIRS_UniNa/ui_Input_Tab.py +1101 -0
- PaIRS_UniNa/ui_Input_Tab_CalVi.py +1283 -0
- PaIRS_UniNa/ui_Log_Tab.py +263 -0
- PaIRS_UniNa/ui_Output_Tab.py +2362 -0
- PaIRS_UniNa/ui_Process_Tab.py +3810 -0
- PaIRS_UniNa/ui_Process_Tab_CalVi.py +1549 -0
- PaIRS_UniNa/ui_Process_Tab_Disp.py +1141 -0
- PaIRS_UniNa/ui_Process_Tab_Min.py +437 -0
- PaIRS_UniNa/ui_ResizePopup.py +204 -0
- PaIRS_UniNa/ui_Vis_Tab.py +1628 -0
- PaIRS_UniNa/ui_Vis_Tab_CalVi.py +1251 -0
- PaIRS_UniNa/ui_Whatsnew.py +132 -0
- PaIRS_UniNa/ui_gPairs.py +877 -0
- PaIRS_UniNa/ui_infoPaIRS.py +551 -0
- PaIRS_UniNa/whatsnew.txt +5 -0
- pairs_unina-0.2.7.dist-info/METADATA +160 -0
- pairs_unina-0.2.7.dist-info/RECORD +325 -0
- pairs_unina-0.2.7.dist-info/WHEEL +5 -0
- pairs_unina-0.2.7.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
FLAG_SERIALIZED=True
|
|
2
|
+
|
|
3
|
+
import os, json, pickle, traceback
|
|
4
|
+
from .PaIRS_pypacks import pri
|
|
5
|
+
|
|
6
|
+
from .TabTools import TABpar
|
|
7
|
+
from .procTools import dataTreePar, CompMin, MediaPIV
|
|
8
|
+
from .Explorer import TREpar, ITEpar, currentTimeString
|
|
9
|
+
from .Input_Tab import INPpar
|
|
10
|
+
globals()['ImportPar'] = INPpar.ImportPar
|
|
11
|
+
from .Input_Tab_tools import ImageSet
|
|
12
|
+
from .Output_Tab import OUTpar
|
|
13
|
+
from .Process_Tab import PROpar
|
|
14
|
+
from .Log_Tab import LOGpar
|
|
15
|
+
from .Vis_Tab import VISpar, NamesPIV
|
|
16
|
+
globals()['OUT'] = VISpar.OUT
|
|
17
|
+
globals()['PRO'] = VISpar.PRO
|
|
18
|
+
from .Process_Tab_Min import PROpar_Min
|
|
19
|
+
from .Process_Tab_Disp import PROpar_Disp
|
|
20
|
+
from .Calibration_Tab import CALpar
|
|
21
|
+
from .Input_Tab_CalVi import INPpar_CalVi
|
|
22
|
+
from .Process_Tab_CalVi import PROpar_CalVi
|
|
23
|
+
from .Vis_Tab_CalVi import VISpar_CalVi
|
|
24
|
+
from .tabSplitter import SPLpar
|
|
25
|
+
from .PaIRS_pypacks import identifierName, fontPixelSize, printTypes
|
|
26
|
+
from .__init__ import __version__,__subversion__,__year__,__mail__,__website__
|
|
27
|
+
|
|
28
|
+
class GPApar(TABpar):
|
|
29
|
+
def __init__(self):
|
|
30
|
+
self.setup()
|
|
31
|
+
super().__init__(self.name,'gPaIRS')
|
|
32
|
+
self.unchecked_fields+=[]
|
|
33
|
+
|
|
34
|
+
def setup(self):
|
|
35
|
+
self.name_work, self.username, self.version = identifierName(typeObject='wksp')
|
|
36
|
+
self.outName = ''
|
|
37
|
+
self.createdDate = currentTimeString()
|
|
38
|
+
self.modifiedDate = self.createdDate
|
|
39
|
+
self.savedDate = ''
|
|
40
|
+
self.FlagSaved = False
|
|
41
|
+
self.FlagQueue = True
|
|
42
|
+
self.FlagRunnable = True
|
|
43
|
+
|
|
44
|
+
self.name = 'Workspace'
|
|
45
|
+
self.date = f'Created: {self.createdDate}'
|
|
46
|
+
self.icon = 'workspace.png'
|
|
47
|
+
|
|
48
|
+
self.infoFields=[f for f,_ in self.__dict__.items()]
|
|
49
|
+
|
|
50
|
+
self.Geometry = None
|
|
51
|
+
self.WindowState = None
|
|
52
|
+
self.SplitterSizes = {}
|
|
53
|
+
self.ScrollAreaValues = {}
|
|
54
|
+
|
|
55
|
+
#legacy
|
|
56
|
+
self.FloatGeometry = []
|
|
57
|
+
self.FloatVisible = []
|
|
58
|
+
|
|
59
|
+
self.paletteType = 2 #-1,2=standard, 0=light, 1=dark
|
|
60
|
+
self.fontPixelSize = fontPixelSize
|
|
61
|
+
self.FlagOutDated = 0
|
|
62
|
+
self.currentVersion = __version__
|
|
63
|
+
self.latestVersion = ''
|
|
64
|
+
|
|
65
|
+
self.printTypes = printTypes
|
|
66
|
+
self.NumCores = 0
|
|
67
|
+
|
|
68
|
+
self.stateFields=[f for f,_ in self.__dict__.items() if f not in self.infoFields]
|
|
69
|
+
|
|
70
|
+
def saveBullet(self):
|
|
71
|
+
return '' if self.FlagSaved else '<span style="color: #7A8B8B;"><sup>●</sup></span>'
|
|
72
|
+
|
|
73
|
+
def InfoMessage(self):
|
|
74
|
+
InfoMessage=f'{self.name}'
|
|
75
|
+
if self.FlagSaved:
|
|
76
|
+
InfoMessage+=f'\nFile location: {self.outName}'
|
|
77
|
+
else:
|
|
78
|
+
if self.savedDate:
|
|
79
|
+
InfoMessage+=' (unsaved)'
|
|
80
|
+
else:
|
|
81
|
+
InfoMessage+=' (never saved)'
|
|
82
|
+
InfoMessage+=f'\n\nCreated : {self.createdDate}'
|
|
83
|
+
InfoMessage+=f'\nModified: {self.modifiedDate}'
|
|
84
|
+
if self.savedDate: InfoMessage+=f'\nSaved : {self.savedDate}'
|
|
85
|
+
InfoMessage+=f'\n\nUser: {self.username}'
|
|
86
|
+
InfoMessage+=f'\nPaIRS version: {self.version}'
|
|
87
|
+
return InfoMessage
|
|
88
|
+
|
|
89
|
+
def save_list_to_file_serialized(l, filename, flagJSON=False):
|
|
90
|
+
basename = os.path.splitext(filename)[0]
|
|
91
|
+
pickle_data = {}
|
|
92
|
+
pickle_counter = 0
|
|
93
|
+
info_pickle =[]
|
|
94
|
+
|
|
95
|
+
def serialize_element(elem:TABpar, idx_path):
|
|
96
|
+
nonlocal pickle_counter
|
|
97
|
+
if elem is None:
|
|
98
|
+
return None
|
|
99
|
+
data = {}
|
|
100
|
+
for field in elem.fields:
|
|
101
|
+
value = getattr(elem, field)
|
|
102
|
+
if isinstance(value, TABpar):
|
|
103
|
+
data[field] = serialize_element(value, idx_path + [field])
|
|
104
|
+
elif isinstance(value, CompMin) or isinstance(value, MediaPIV):
|
|
105
|
+
data[field] = {'__file_ref__': value.outName,
|
|
106
|
+
'varClass': value.__class__.__name__}
|
|
107
|
+
if isinstance(value, MediaPIV):
|
|
108
|
+
data[field]['stepType']=value.stepType
|
|
109
|
+
try:
|
|
110
|
+
if value.outName:
|
|
111
|
+
with open(value.outName, 'wb') as file:
|
|
112
|
+
pickle.dump(value, file)
|
|
113
|
+
except Exception as e:
|
|
114
|
+
print(f'Error while saving the file {filename}!\n{e}\n')
|
|
115
|
+
elif is_non_json_serializable(value):
|
|
116
|
+
info=f'Element: {elem.__class__.__name__} --> field: {field} --> value type: {type(value)}'
|
|
117
|
+
info_pickle.append(info)
|
|
118
|
+
key = f"ref_{pickle_counter}"
|
|
119
|
+
pickle_data[key] = value
|
|
120
|
+
data[field] = {'__file_ref__': key}
|
|
121
|
+
pickle_counter += 1
|
|
122
|
+
else:
|
|
123
|
+
data[field] = value
|
|
124
|
+
data['parClass'] = elem.__class__.__name__
|
|
125
|
+
return data
|
|
126
|
+
|
|
127
|
+
def serialize_list(lst, idx_path=[]):
|
|
128
|
+
if isinstance(lst, list):
|
|
129
|
+
return [serialize_list(item, idx_path + [i]) for i, item in enumerate(lst)]
|
|
130
|
+
else:
|
|
131
|
+
return serialize_element(lst, idx_path)
|
|
132
|
+
|
|
133
|
+
serialized_list = serialize_list(l)
|
|
134
|
+
|
|
135
|
+
try:
|
|
136
|
+
if flagJSON:
|
|
137
|
+
with open(filename, 'w') as file:
|
|
138
|
+
json.dump(serialized_list, file, indent=2)
|
|
139
|
+
else:
|
|
140
|
+
with open(filename, 'wb') as file:
|
|
141
|
+
pickle.dump(serialized_list, file)
|
|
142
|
+
except Exception as e:
|
|
143
|
+
print(f'Error while saving the file {filename}!\n{e}\n')
|
|
144
|
+
|
|
145
|
+
if pickle_counter:
|
|
146
|
+
pri.IOError.yellow(f'The following non-json serializable items were found in {filename}:\n'+"\n".join(info_pickle))
|
|
147
|
+
pickle_filename = basename+'.pairs_data'
|
|
148
|
+
try:
|
|
149
|
+
with open(pickle_filename, 'wb') as file:
|
|
150
|
+
pickle.dump(pickle_data, file)
|
|
151
|
+
except Exception as e:
|
|
152
|
+
print(f'Error while saving the file {pickle_filename}!\n{e}\n')
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def load_list_from_file_serialized(filename):
|
|
156
|
+
basename = os.path.basename(filename)
|
|
157
|
+
pickle_filename = basename+'.pairs_data'
|
|
158
|
+
|
|
159
|
+
serialized_list=None
|
|
160
|
+
error=''
|
|
161
|
+
try:
|
|
162
|
+
with open(filename, 'rb') as file:
|
|
163
|
+
first_byte = file.read(1)
|
|
164
|
+
if first_byte in [b'{', b'[']:
|
|
165
|
+
file.seek(0)
|
|
166
|
+
try:
|
|
167
|
+
serialized_list=json.load(file)
|
|
168
|
+
except Exception as e:
|
|
169
|
+
error=e
|
|
170
|
+
else:
|
|
171
|
+
file.seek(0)
|
|
172
|
+
try:
|
|
173
|
+
import numpy
|
|
174
|
+
serialized_list=pickle.load(file)
|
|
175
|
+
except Exception as e:
|
|
176
|
+
error=e
|
|
177
|
+
except Exception as e:
|
|
178
|
+
error=e
|
|
179
|
+
if error:
|
|
180
|
+
pri.IOError.red(f'Error while loading the file {filename}!\n{error}\n')
|
|
181
|
+
return serialized_list, str(error)
|
|
182
|
+
|
|
183
|
+
error=''
|
|
184
|
+
pickle_data = None
|
|
185
|
+
if os.path.exists(pickle_filename):
|
|
186
|
+
try:
|
|
187
|
+
with open(pickle_filename, 'rb') as file:
|
|
188
|
+
pickle_data = pickle.load(file)
|
|
189
|
+
except Exception as e:
|
|
190
|
+
pri.IOError.red(f'Error while loading the file {pickle_filename}!\n{e}\n')
|
|
191
|
+
error+=str(e)
|
|
192
|
+
|
|
193
|
+
info_pickle=[]
|
|
194
|
+
|
|
195
|
+
def deserialize_element(data):
|
|
196
|
+
if data is None:
|
|
197
|
+
return None
|
|
198
|
+
try:
|
|
199
|
+
cls_name = data.pop('parClass')
|
|
200
|
+
except:
|
|
201
|
+
pass
|
|
202
|
+
cls = globals()[cls_name]
|
|
203
|
+
if cls_name=='dataTreePar':
|
|
204
|
+
pass
|
|
205
|
+
instance:TABpar = cls()
|
|
206
|
+
fields = {}
|
|
207
|
+
for key, value in data.items():
|
|
208
|
+
if isinstance(value, dict) and 'parClass' in value:
|
|
209
|
+
fields[key] = deserialize_element(value)
|
|
210
|
+
elif isinstance(value, dict) and 'varClass' in value:
|
|
211
|
+
filename = value['__file_ref__']
|
|
212
|
+
field_cls_name = value['varClass']
|
|
213
|
+
field_cls = globals()[field_cls_name]
|
|
214
|
+
if field_cls==MediaPIV:
|
|
215
|
+
new_instance:MediaPIV=field_cls(value['stepType'])
|
|
216
|
+
else:
|
|
217
|
+
new_instance:CompMin=field_cls()
|
|
218
|
+
if filename:
|
|
219
|
+
try:
|
|
220
|
+
if os.path.exists(filename):
|
|
221
|
+
with open(filename, 'rb') as file:
|
|
222
|
+
loaded_instance:CompMin=pickle.load(file)
|
|
223
|
+
for f in loaded_instance.fields:
|
|
224
|
+
v_loaded=getattr(loaded_instance,f)
|
|
225
|
+
if isinstance(v_loaded,TABpar):
|
|
226
|
+
v_new:TABpar=getattr(new_instance,f)
|
|
227
|
+
v_new.copyfrom(v_loaded)
|
|
228
|
+
else:
|
|
229
|
+
setattr(new_instance,f,v_loaded)
|
|
230
|
+
except Exception as e:
|
|
231
|
+
pri.IOError.red(f'Error while reading the file {filename} (setting "{key}" field of {cls_name} item)\n{traceback.format_exc()}\n')
|
|
232
|
+
fields[key] = new_instance
|
|
233
|
+
elif isinstance(value, dict) and '__file_ref__' in value:
|
|
234
|
+
ref_key = value['__file_ref__']
|
|
235
|
+
if pickle_data:
|
|
236
|
+
fields[key] = pickle_data[ref_key]
|
|
237
|
+
else:
|
|
238
|
+
fields[key] = None
|
|
239
|
+
info=f'Element: {cls_name} --> field: {key} --> value type: {type(value)}'
|
|
240
|
+
info_pickle.append(info)
|
|
241
|
+
None
|
|
242
|
+
else:
|
|
243
|
+
fields[key] = value
|
|
244
|
+
for f,v in fields.items():
|
|
245
|
+
if f in instance.fields: setattr(instance,f,v)
|
|
246
|
+
#instance.copyfromdiz(fields)
|
|
247
|
+
return instance
|
|
248
|
+
|
|
249
|
+
def deserialize_list(lst):
|
|
250
|
+
if isinstance(lst, list):
|
|
251
|
+
return [deserialize_list(item) for item in lst]
|
|
252
|
+
else:
|
|
253
|
+
return deserialize_element(lst)
|
|
254
|
+
|
|
255
|
+
if info_pickle:
|
|
256
|
+
pri.IOError.red(f'The following non-json serializable items were not found in {filename}:\n'+"\n".join(info_pickle))
|
|
257
|
+
l=None
|
|
258
|
+
try:
|
|
259
|
+
l=deserialize_list(serialized_list)
|
|
260
|
+
except Exception as e:
|
|
261
|
+
pri.IOError.red(f'Error while loading the file {filename}!\n{e}\n{traceback.format_exc()}\n')
|
|
262
|
+
error+=str(e)
|
|
263
|
+
return l, error
|
|
264
|
+
|
|
265
|
+
def is_non_json_serializable(value):
|
|
266
|
+
try:
|
|
267
|
+
json.dumps(value)
|
|
268
|
+
return False
|
|
269
|
+
except (TypeError, OverflowError):
|
|
270
|
+
return True
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def save_list_to_file(l,filename):
|
|
274
|
+
try:
|
|
275
|
+
with open(filename, 'wb') as file:
|
|
276
|
+
pickle.dump(l, file)
|
|
277
|
+
except Exception as e:
|
|
278
|
+
print(f'Error while saving the file {filename}!\n{e}\n')
|
|
279
|
+
|
|
280
|
+
def load_list_from_file(filename):
|
|
281
|
+
l=None
|
|
282
|
+
errorMessage=''
|
|
283
|
+
try:
|
|
284
|
+
with open(filename, 'rb') as file:
|
|
285
|
+
l=pickle.load(file)
|
|
286
|
+
except Exception as e:
|
|
287
|
+
errorMessage=f'Error while loading the file {filename}!\n{e}\n'
|
|
288
|
+
pri.IOError.red(errorMessage)
|
|
289
|
+
return l, errorMessage
|
|
290
|
+
|
|
291
|
+
if FLAG_SERIALIZED:
|
|
292
|
+
saveList=save_list_to_file_serialized
|
|
293
|
+
loadList=load_list_from_file_serialized
|
|
294
|
+
else:
|
|
295
|
+
saveList=save_list_to_file
|
|
296
|
+
loadList=load_list_from_file
|