pypsbuilder 2.6.1__tar.gz → 2.6.2__tar.gz

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.
Files changed (112) hide show
  1. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/CHANGELOG.md +5 -1
  2. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/PKG-INFO +15 -16
  3. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/README.md +14 -15
  4. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/__init__.py +1 -1
  5. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/psbuilders.py +1 -1
  6. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/psclasses.py +1 -4
  7. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/psexplorer.py +54 -49
  8. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/.github/dependabot.yml +0 -0
  9. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/.github/workflows/release.yml +0 -0
  10. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/.github/workflows/testing.yml +0 -0
  11. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/.github/workflows/testrelease.yml +0 -0
  12. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/.gitignore +0 -0
  13. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/.pre-commit-config.yaml +0 -0
  14. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/.readthedocs.yaml +0 -0
  15. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/AUTHORS.md +0 -0
  16. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/CONTRIBUTING.md +0 -0
  17. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/LICENSE +0 -0
  18. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/codecov.yml +0 -0
  19. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/_static/theme_overrides.css +0 -0
  20. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psclasses.Dogmin.rst +0 -0
  21. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psclasses.InvPoint.rst +0 -0
  22. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psclasses.PTsection.rst +0 -0
  23. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psclasses.PXsection.rst +0 -0
  24. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psclasses.TCResult.rst +0 -0
  25. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psclasses.TCResultSet.rst +0 -0
  26. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psclasses.TXsection.rst +0 -0
  27. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psclasses.UniLine.rst +0 -0
  28. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psexplorer.PTPS.rst +0 -0
  29. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psexplorer.PXPS.rst +0 -0
  30. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.psexplorer.TXPS.rst +0 -0
  31. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.tcapi.TC34API.rst +0 -0
  32. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api/pypsbuilder.tcapi.TC35API.rst +0 -0
  33. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/api.rst +0 -0
  34. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/authors.rst +0 -0
  35. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/command-line.rst +0 -0
  36. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/conf.py +0 -0
  37. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/create_environment.png +0 -0
  38. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/crossing.png +0 -0
  39. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/delta.png +0 -0
  40. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/install_locally.png +0 -0
  41. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/invsearch.png +0 -0
  42. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/isopleths_1.png +0 -0
  43. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/isopleths_2.png +0 -0
  44. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/modes.png +0 -0
  45. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psbuilder_areas.png +0 -0
  46. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psbuilder_dogmin.png +0 -0
  47. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psbuilder_finished.png +0 -0
  48. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psbuilder_highlight.png +0 -0
  49. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psbuilder_init.png +0 -0
  50. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psbuilder_inv.png +0 -0
  51. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psbuilder_modes.png +0 -0
  52. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psbuilder_uni.png +0 -0
  53. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psiso_alm.png +0 -0
  54. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psiso_labelkey.png +0 -0
  55. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psiso_mode.png +0 -0
  56. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psiso_other.png +0 -0
  57. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/psshow_out.png +0 -0
  58. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/ptpath.png +0 -0
  59. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/show_data.png +0 -0
  60. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/show_grid.png +0 -0
  61. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/show_label.png +0 -0
  62. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/show_out.png +0 -0
  63. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/show_plain.png +0 -0
  64. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/images/status.png +0 -0
  65. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/index.rst +0 -0
  66. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/psbuilders-tutorial.rst +0 -0
  67. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/psexplorer-tutorial.rst +0 -0
  68. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/docs/readme.rst +0 -0
  69. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/environment.yml +0 -0
  70. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/avgpelite/tc-avgpelite.txt +0 -0
  71. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/avgpelite/tc-ds62.txt +0 -0
  72. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/avgpelite/tc-mp50MnNCKFMASHTO.txt +0 -0
  73. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/avgpelite/tc-prefs.txt +0 -0
  74. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/avgpelite_34/tc-6axmn.txt +0 -0
  75. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/avgpelite_34/tc-avgpelite.txt +0 -0
  76. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/avgpelite_34/tc-ds62.txt +0 -0
  77. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/avgpelite_34/tc-prefs.txt +0 -0
  78. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/inv1-ic.txt +0 -0
  79. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/inv1-log.txt +0 -0
  80. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/inv2-ic.txt +0 -0
  81. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/inv2-log.txt +0 -0
  82. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/inv3-ic.txt +0 -0
  83. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/inv3-log.txt +0 -0
  84. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/uni1-ic.txt +0 -0
  85. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/uni1-log.txt +0 -0
  86. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/uni2-ic.txt +0 -0
  87. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/uni2-log.txt +0 -0
  88. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/uni3-ic.txt +0 -0
  89. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/examples/outputs/uni3-log.txt +0 -0
  90. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/notebooks/pypsbuilder.ipynb +0 -0
  91. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pyproject.toml +0 -0
  92. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/images/ptbuilder.png +0 -0
  93. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/images/pxbuilder.png +0 -0
  94. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/images/pypsbuilder.png +0 -0
  95. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/images/txbuilder.png +0 -0
  96. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/tcapi.py +0 -0
  97. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/tcinit.py +0 -0
  98. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/tests/__init__.py +0 -0
  99. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/tests/test_pclasses.py +0 -0
  100. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui/addinv.ui +0 -0
  101. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui/adduni.ui +0 -0
  102. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui/compile_ui.sh +0 -0
  103. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui/ptbuilder.ui +0 -0
  104. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui/pxbuilder.ui +0 -0
  105. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui/txbuilder.ui +0 -0
  106. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui/uniguess.ui +0 -0
  107. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui_addinv.py +0 -0
  108. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui_adduni.py +0 -0
  109. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui_ptbuilder.py +0 -0
  110. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui_pxbuilder.py +0 -0
  111. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui_txbuilder.py +0 -0
  112. {pypsbuilder-2.6.1 → pypsbuilder-2.6.2}/pypsbuilder/ui_uniguess.py +0 -0
@@ -1,7 +1,11 @@
1
1
  # Changelog
2
2
  All notable pypsbuilder changes.
3
3
 
4
- ## [2.6.1] - master
4
+ ## [2.6.2] - 2025-02-11
5
+ ### Fixed
6
+ - f-string py3.10 bugfix
7
+
8
+ ## [2.6.1] - 2025-01-24
5
9
  ### Added
6
10
  - Both PyQt5 and PyQt6 are supported and need to be specified as
7
11
  extra option during installation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypsbuilder
3
- Version: 2.6.1
3
+ Version: 2.6.2
4
4
  Summary: THERMOCALC front-end for constructing and analyzing PT pseudosections
5
5
  Project-URL: Homepage, https://github.com/ondrolexa/pypsbuilder
6
6
  Project-URL: Documentation, https://pypsbuilder.readthedocs.io
@@ -87,26 +87,26 @@ Not that simplistic THERMOCALC front-end for constructing and visualizations of
87
87
  It is strongly suggested to install **pypsbuilder** into separate environment. You can create
88
88
  Python virtual environment. For Linux and macOS use:
89
89
 
90
- python -m venv pyps
91
- source pyps/bin/activate
90
+ python -m venv .venv
91
+ source .venv/bin/activate
92
92
 
93
- for Windows use PowerShell:
93
+ for Windows use Command Prompt or PowerShell:
94
94
 
95
- py -m venv pyps
96
- pyps\Scripts\activate
95
+ python -m venv .venv
96
+ .venv\Scripts\activate
97
97
 
98
98
  > [!NOTE]
99
- > On Microsoft Windows, it may be required to enable the activate script by setting the execution policy for the user.
99
+ > On Microsoft Windows, it may be required to set the execution policy in PowerShell for the user.
100
100
  > You can do this by issuing the following PowerShell command:
101
101
  > ```
102
- > PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
102
+ > Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
103
103
  > ```
104
104
 
105
- and install **pypsbuilder** using pip within the environment:
105
+ and install **pypsbuilder** using pip within the environment. **You should choose the UI framework using option** `pyqt5` **or** `pyqt6`:
106
106
 
107
107
  pip install pypsbuilder[pyqt6]
108
108
 
109
- Providing jupyter option, JupyterLab will be also installed:
109
+ JupyterLab could also be installed providing the `jupyter` option:
110
110
 
111
111
  pip install pypsbuilder[pyqt6,jupyter]
112
112
 
@@ -114,11 +114,11 @@ Providing jupyter option, JupyterLab will be also installed:
114
114
 
115
115
  If you have already have conda or mamba installed, you can create environment with:
116
116
 
117
- conda create -n pyps numpy matplotlib scipy networkx shapely pyqt tqdm jupyterlab
117
+ conda create -n pyps python=3.12.8 matplotlib shapely pyqt tqdm scikit-image qtpy jupyterlab
118
118
 
119
119
  or
120
120
 
121
- mamba create -n pyps numpy matplotlib scipy networkx shapely pyqt tqdm jupyterlab
121
+ mamba create -n pyps python=3.12.8 matplotlib shapely pyqt tqdm scikit-image qtpy jupyterlab
122
122
 
123
123
  Then activate the new environment:
124
124
 
@@ -128,15 +128,14 @@ or
128
128
 
129
129
  mamba activate pyps
130
130
 
131
- and install with pip. Note that PyQt6 is not yet available in conda repositories,
132
- so we need to use the pyqt5 version:
131
+ and install with pip. As PyQt is already installed with mamba/conda, we will install **pypsbuilder** without UI framework:
133
132
 
134
- pip install pypsbuilder[pyqt5]
133
+ pip install pypsbuilder
135
134
 
136
135
  > [!NOTE]
137
136
  > If you encounter errors during install, try to install without upgrading dependencies:
138
137
  > ```
139
- > pip install --no-deps pypsbuilder[pyqt5]
138
+ > pip install --no-deps pypsbuilder
140
139
  > ```
141
140
 
142
141
  #### Upgrade existing installation
@@ -11,26 +11,26 @@ Not that simplistic THERMOCALC front-end for constructing and visualizations of
11
11
  It is strongly suggested to install **pypsbuilder** into separate environment. You can create
12
12
  Python virtual environment. For Linux and macOS use:
13
13
 
14
- python -m venv pyps
15
- source pyps/bin/activate
14
+ python -m venv .venv
15
+ source .venv/bin/activate
16
16
 
17
- for Windows use PowerShell:
17
+ for Windows use Command Prompt or PowerShell:
18
18
 
19
- py -m venv pyps
20
- pyps\Scripts\activate
19
+ python -m venv .venv
20
+ .venv\Scripts\activate
21
21
 
22
22
  > [!NOTE]
23
- > On Microsoft Windows, it may be required to enable the activate script by setting the execution policy for the user.
23
+ > On Microsoft Windows, it may be required to set the execution policy in PowerShell for the user.
24
24
  > You can do this by issuing the following PowerShell command:
25
25
  > ```
26
- > PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
26
+ > Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
27
27
  > ```
28
28
 
29
- and install **pypsbuilder** using pip within the environment:
29
+ and install **pypsbuilder** using pip within the environment. **You should choose the UI framework using option** `pyqt5` **or** `pyqt6`:
30
30
 
31
31
  pip install pypsbuilder[pyqt6]
32
32
 
33
- Providing jupyter option, JupyterLab will be also installed:
33
+ JupyterLab could also be installed providing the `jupyter` option:
34
34
 
35
35
  pip install pypsbuilder[pyqt6,jupyter]
36
36
 
@@ -38,11 +38,11 @@ Providing jupyter option, JupyterLab will be also installed:
38
38
 
39
39
  If you have already have conda or mamba installed, you can create environment with:
40
40
 
41
- conda create -n pyps numpy matplotlib scipy networkx shapely pyqt tqdm jupyterlab
41
+ conda create -n pyps python=3.12.8 matplotlib shapely pyqt tqdm scikit-image qtpy jupyterlab
42
42
 
43
43
  or
44
44
 
45
- mamba create -n pyps numpy matplotlib scipy networkx shapely pyqt tqdm jupyterlab
45
+ mamba create -n pyps python=3.12.8 matplotlib shapely pyqt tqdm scikit-image qtpy jupyterlab
46
46
 
47
47
  Then activate the new environment:
48
48
 
@@ -52,15 +52,14 @@ or
52
52
 
53
53
  mamba activate pyps
54
54
 
55
- and install with pip. Note that PyQt6 is not yet available in conda repositories,
56
- so we need to use the pyqt5 version:
55
+ and install with pip. As PyQt is already installed with mamba/conda, we will install **pypsbuilder** without UI framework:
57
56
 
58
- pip install pypsbuilder[pyqt5]
57
+ pip install pypsbuilder
59
58
 
60
59
  > [!NOTE]
61
60
  > If you encounter errors during install, try to install without upgrading dependencies:
62
61
  > ```
63
- > pip install --no-deps pypsbuilder[pyqt5]
62
+ > pip install --no-deps pypsbuilder
64
63
  > ```
65
64
 
66
65
  #### Upgrade existing installation
@@ -22,7 +22,7 @@ __all__ = (
22
22
  "get_tcapi",
23
23
  )
24
24
 
25
- __version__ = "2.6.1"
25
+ __version__ = "2.6.2"
26
26
  __author__ = "Ondrej Lexa"
27
27
  __copyright__ = "© Ondrej Lexa 2016-2025"
28
28
  __email__ = "lexa.ondrej@gmail.com"
@@ -1951,7 +1951,7 @@ class PTBuilder(BuildersBase, Ui_PTBuilder):
1951
1951
 
1952
1952
  def app_settings(self, write=False):
1953
1953
  # Applicatiom settings
1954
- builder_settings = QtCore.QSettings("LX", f"ptbuilder {QTPY_API}{QT_VERSION.split(".")[0]}")
1954
+ builder_settings = QtCore.QSettings("LX", f"ptbuilder {QTPY_API}{QT_VERSION.split('.')[0]}")
1955
1955
  if write:
1956
1956
  builder_settings.setValue("steps", self.spinSteps.value())
1957
1957
  builder_settings.setValue("precision", self.spinPrec.value())
@@ -8,10 +8,7 @@ outputs and storage of calculated invariant points and univariant lines.
8
8
  # author: Ondrej Lexa
9
9
  # website: https://github.com/ondrolexa/pypsbuilder
10
10
 
11
- try:
12
- import cPickle as pickle
13
- except ImportError:
14
- import pickle
11
+ import pickle
15
12
  import gzip
16
13
  import numpy as np
17
14
  import matplotlib.pyplot as plt
@@ -1220,55 +1220,6 @@ class PS:
1220
1220
  f'{ix + 1}: {" ".join(sorted([self.abbr.get(sa, sa) for sa in self.identify(x, y)]))}'
1221
1221
  )
1222
1222
 
1223
- def pointcalc(self, label=False, skiplabels=0, labelfs=6):
1224
- fig, ax = plt.subplots()
1225
- ax.autoscale_view()
1226
- self.add_overlay(ax, label=label, skiplabels=skiplabels, fontsize=labelfs)
1227
- ax.set_xlim(self.xrange)
1228
- ax.set_ylim(self.yrange)
1229
- ax.format_coord = self.format_coord
1230
- x, y = plt.ginput(1)[0]
1231
- plt.close(fig)
1232
- k = self.identify(x, y)
1233
- if k is not None:
1234
- last_inv = 0
1235
- for ix, ps in self.sections.items():
1236
- # update guesses from closest inv point
1237
- dst = sys.float_info.max
1238
- for id_inv, inv in ps.invpoints.items():
1239
- d2 = (inv._x - x) ** 2 + (inv._y - y) ** 2
1240
- if d2 < dst:
1241
- dst = d2
1242
- id_close = id_inv
1243
- if id_close != last_inv and not ps.invpoints[id_close].manual:
1244
- self.tc.update_scriptfile(guesses=ps.invpoints[id_close].ptguess())
1245
- last_inv = id_close
1246
- tcout, ans = self.tc.calc_assemblage(k.difference(self.tc.excess), y, x)
1247
- status, res, output = self.tc.parse_logfile()
1248
- if res is None:
1249
- for ix, ps in self.sections.items():
1250
- # update guesses from closest uni line point
1251
- dst = sys.float_info.max
1252
- for id_uni in self.unilists[ix][k]:
1253
- uni = ps.unilines[id_uni]
1254
- if not uni.manual:
1255
- for vix in list(range(len(uni._x))[uni.used]):
1256
- d2 = (uni._x[vix] - x) ** 2 + (uni._y[vix] - y) ** 2
1257
- if d2 < dst:
1258
- dst = d2
1259
- id_close = id_uni
1260
- vix_close = vix
1261
- self.tc.update_scriptfile(
1262
- guesses=ps.unilines[id_close].ptguess(idx=vix_close)
1263
- )
1264
- tcout, ans = self.tc.calc_assemblage(k.difference(self.tc.excess), y, x)
1265
- status, res, output = self.tc.parse_logfile()
1266
- if res is None:
1267
- print("Calculation failed")
1268
- else:
1269
- print(output)
1270
- return res[0]
1271
-
1272
1223
  def remove_grid_data(self, key, phase, expr):
1273
1224
  """Remove calculated data from grid and mark as failed
1274
1225
 
@@ -2769,6 +2720,60 @@ class PTPS(PS):
2769
2720
  )
2770
2721
  plt.show()
2771
2722
 
2723
+ def pointcalc(self, t=None, p=None, label=False, skiplabels=0, labelfs=6, show_output=False):
2724
+ if t is None or p is None:
2725
+ fig, ax = plt.subplots()
2726
+ ax.autoscale_view()
2727
+ self.add_overlay(ax, label=label, skiplabels=skiplabels, fontsize=labelfs)
2728
+ ax.set_xlim(self.xrange)
2729
+ ax.set_ylim(self.yrange)
2730
+ ax.format_coord = self.format_coord
2731
+ t, p = plt.ginput(1)[0]
2732
+ plt.close(fig)
2733
+ k = self.identify(t, p)
2734
+ if k is not None:
2735
+ last_inv = 0
2736
+ id_close = 0
2737
+ for ix, ps in self.sections.items():
2738
+ # update guesses from closest inv point
2739
+ dst = sys.float_info.max
2740
+ for id_inv, inv in ps.invpoints.items():
2741
+ d2 = (inv._x - t) ** 2 + (inv._y - p) ** 2
2742
+ if d2 < dst:
2743
+ dst = d2
2744
+ id_close = id_inv
2745
+ if id_close != last_inv and not ps.invpoints[id_close].manual:
2746
+ self.tc.update_scriptfile(guesses=ps.invpoints[id_close].ptguess())
2747
+ last_inv = id_close
2748
+ tcout, ans = self.tc.calc_assemblage(k.difference(self.tc.excess), p, t)
2749
+ status, res, output = self.tc.parse_logfile()
2750
+ if res is None:
2751
+ for ix, ps in self.sections.items():
2752
+ # update guesses from closest uni line point
2753
+ dst = sys.float_info.max
2754
+ for id_uni in self.unilists[ix][k]:
2755
+ uni = ps.unilines[id_uni]
2756
+ if not uni.manual:
2757
+ for vix in list(range(len(uni._x))[uni.used]):
2758
+ d2 = (uni._x[vix] - t) ** 2 + (uni._y[vix] - p) ** 2
2759
+ if d2 < dst:
2760
+ dst = d2
2761
+ id_close = id_uni
2762
+ vix_close = vix
2763
+ self.tc.update_scriptfile(
2764
+ guesses=ps.unilines[id_close].ptguess(idx=vix_close)
2765
+ )
2766
+ tcout, ans = self.tc.calc_assemblage(k.difference(self.tc.excess), p, t)
2767
+ status, res, output = self.tc.parse_logfile()
2768
+ if res is None:
2769
+ print("Calculation failed")
2770
+ else:
2771
+ if show_output:
2772
+ print(output)
2773
+ return res[0]
2774
+ else:
2775
+ print(f"No assembplage found at T={t}, p-{p}")
2776
+
2772
2777
 
2773
2778
  class TXPS(PS):
2774
2779
  """Class to postprocess txbuilder project"""
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes