pypsbuilder 2.4.2__tar.gz → 2.5.0__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 (58) hide show
  1. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/CHANGELOG.md +6 -1
  2. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/PKG-INFO +8 -3
  3. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/conf.py +2 -2
  4. pypsbuilder-2.5.0/pyproject.toml +50 -0
  5. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/__init__.py +2 -2
  6. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/psbuilders.py +3 -3
  7. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/psclasses.py +18 -6
  8. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/psexplorer.py +39 -24
  9. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder.egg-info/PKG-INFO +8 -3
  10. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder.egg-info/SOURCES.txt +1 -0
  11. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/setup.cfg +3 -1
  12. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/setup.py +2 -2
  13. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/AUTHORS.md +0 -0
  14. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/CONTRIBUTING.md +0 -0
  15. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/LICENSE +0 -0
  16. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/MANIFEST.in +0 -0
  17. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/README.md +0 -0
  18. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/Makefile +0 -0
  19. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psclasses.Dogmin.rst +0 -0
  20. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psclasses.InvPoint.rst +0 -0
  21. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psclasses.PTsection.rst +0 -0
  22. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psclasses.PXsection.rst +0 -0
  23. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psclasses.TCResult.rst +0 -0
  24. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psclasses.TCResultSet.rst +0 -0
  25. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psclasses.TXsection.rst +0 -0
  26. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psclasses.UniLine.rst +0 -0
  27. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psexplorer.PTPS.rst +0 -0
  28. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psexplorer.PXPS.rst +0 -0
  29. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.psexplorer.TXPS.rst +0 -0
  30. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.tcapi.TC34API.rst +0 -0
  31. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api/pypsbuilder.tcapi.TC35API.rst +0 -0
  32. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/api.rst +0 -0
  33. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/authors.rst +0 -0
  34. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/command-line.rst +0 -0
  35. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/index.rst +0 -0
  36. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/installation.rst +0 -0
  37. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/psbuilders-tutorial.rst +0 -0
  38. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/docs/psexplorer-tutorial.rst +0 -0
  39. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/images/__init__.py +0 -0
  40. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/images/ptbuilder.png +0 -0
  41. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/images/pxbuilder.png +0 -0
  42. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/images/pypsbuilder.png +0 -0
  43. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/images/txbuilder.png +0 -0
  44. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/tcapi.py +0 -0
  45. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/tcinit.py +0 -0
  46. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/tests/__init__.py +0 -0
  47. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/tests/test_pclasses.py +0 -0
  48. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/ui_addinv.py +0 -0
  49. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/ui_adduni.py +0 -0
  50. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/ui_ptbuilder.py +0 -0
  51. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/ui_pxbuilder.py +0 -0
  52. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/ui_txbuilder.py +0 -0
  53. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder/ui_uniguess.py +0 -0
  54. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder.egg-info/dependency_links.txt +0 -0
  55. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder.egg-info/entry_points.txt +0 -0
  56. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder.egg-info/not-zip-safe +0 -0
  57. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder.egg-info/requires.txt +0 -0
  58. {pypsbuilder-2.4.2 → pypsbuilder-2.5.0}/pypsbuilder.egg-info/top_level.txt +0 -0
@@ -1,9 +1,14 @@
1
1
  # Changelog
2
2
  All notable pypsbuilder changes.
3
3
 
4
+ ## [2.5.0] - 2024-12-13
5
+ ### Fixed
6
+ - fix for coe-q
7
+
4
8
  ## [2.4.2] - 2024-04-23
5
9
  ### Fixed
6
10
  - another fix of and-ky-sill triple point linking
11
+
7
12
  ## [2.4.1] - 2024-03-07
8
13
  ### Fixed
9
14
  - fixed and-ky-sill triple point uniline suggestions
@@ -59,7 +64,7 @@ All notable pypsbuilder changes.
59
64
  - latest THERMOCALC 3.50 compatibility
60
65
 
61
66
  ### Added
62
- - isopleths quadratic surface fit method added
67
+ - isopleths quadratic surface fit method added
63
68
  - isopleths figure and savefig options added
64
69
 
65
70
  ## [2.2.2] - 2021-01-25
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypsbuilder
3
- Version: 2.4.2
3
+ Version: 2.5.0
4
4
  Summary: THERMOCALC front-end for constructing and analyzing PT pseudosections
5
5
  Home-page: https://github.com/ondrolexa/pypsbuilder
6
6
  Author: Ondrej Lexa
@@ -13,7 +13,7 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
13
13
  Classifier: Programming Language :: Python :: 3 :: Only
14
14
  Classifier: Topic :: Scientific/Engineering
15
15
  Classifier: Topic :: Utilities
16
- Requires-Python: >=3.8
16
+ Requires-Python: >=3.9
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  License-File: AUTHORS.md
@@ -88,9 +88,14 @@ pypsbuilder is free software: you can redistribute it and/or modify it under the
88
88
  # Changelog
89
89
  All notable pypsbuilder changes.
90
90
 
91
+ ## [2.5.0] - 2024-12-13
92
+ ### Fixed
93
+ - fix for coe-q
94
+
91
95
  ## [2.4.2] - 2024-04-23
92
96
  ### Fixed
93
97
  - another fix of and-ky-sill triple point linking
98
+
94
99
  ## [2.4.1] - 2024-03-07
95
100
  ### Fixed
96
101
  - fixed and-ky-sill triple point uniline suggestions
@@ -146,7 +151,7 @@ All notable pypsbuilder changes.
146
151
  - latest THERMOCALC 3.50 compatibility
147
152
 
148
153
  ### Added
149
- - isopleths quadratic surface fit method added
154
+ - isopleths quadratic surface fit method added
150
155
  - isopleths figure and savefig options added
151
156
 
152
157
  ## [2.2.2] - 2021-01-25
@@ -75,9 +75,9 @@ author = "Ondrej Lexa"
75
75
  # built documents.
76
76
  #
77
77
  # The short X.Y version.
78
- version = "2.4"
78
+ version = "2.5"
79
79
  # The full version, including alpha/beta/rc tags.
80
- release = "2.4.2"
80
+ release = "2.5.0"
81
81
 
82
82
  # The language for content autogenerated by Sphinx. Refer to documentation
83
83
  # for a list of supported languages.
@@ -0,0 +1,50 @@
1
+ [tool.poetry]
2
+ name = "pypsbuilder"
3
+ version = "2.5.0"
4
+ description = "THERMOCALC front-end for constructing and analyzing PT pseudosections"
5
+ authors = ["Ondrej Lexa <lexa.ondrej@gmail.com>"]
6
+ readme = "README.md"
7
+
8
+ [tool.poetry.dependencies]
9
+ python = "^3.9"
10
+ numpy = "^1.20"
11
+ matplotlib = "^3.6"
12
+ pyqt5 = "^5.15"
13
+ scipy = "^1.10"
14
+ networkx = "^3.2"
15
+ shapely = "^2.0"
16
+ tqdm = "^4.0"
17
+
18
+ [tool.poetry.group.test.dependencies]
19
+ pytest = "^7.4"
20
+ black = "^24"
21
+
22
+ [tool.poetry.scripts]
23
+ ptbuilder = "pypsbuilder.psbuilders:ptbuilder"
24
+ txbuilder = "pypsbuilder.psbuilders:txbuilder"
25
+ pxbuilder = "pypsbuilder.psbuilders:pxbuilder"
26
+ psshow = "pypsbuilder.psexplorer:ps_show"
27
+ psiso = "pypsbuilder.psexplorer:ps_iso"
28
+ psgrid = "pypsbuilder.psexplorer:ps_grid"
29
+ psdrawpd = "pypsbuilder.psexplorer:ps_drawpd"
30
+ tcinit = "pypsbuilder.tcinit:tcprojinit"
31
+
32
+ [build-system]
33
+ requires = ["poetry-core"]
34
+ build-backend = "poetry.core.masonry.api"
35
+
36
+ [tool.black]
37
+ line-length = 88
38
+ include = '\.pyi?$'
39
+ exclude = '''
40
+ /(
41
+ \.toml
42
+ |\.sh
43
+ |\.git
44
+ |\.ini
45
+ )/
46
+ '''
47
+
48
+ [[tool.poetry.source]]
49
+ name = "pypi-public"
50
+ url = "https://pypi.org/simple/"
@@ -22,7 +22,7 @@ __all__ = (
22
22
  "get_tcapi",
23
23
  )
24
24
 
25
- __version__ = "2.4.2"
25
+ __version__ = "2.5.0"
26
26
  __author__ = "Ondrej Lexa"
27
- __copyright__ = "© Ondrej Lexa 2024"
27
+ __copyright__ = "© Ondrej Lexa 2016-2024"
28
28
  __email__ = "lexa.ondrej@gmail.com"
@@ -14,7 +14,7 @@ from pathlib import Path
14
14
  from datetime import datetime
15
15
  import itertools
16
16
 
17
- from pkg_resources import resource_filename
17
+ import importlib.resources as ires
18
18
  from PyQt5 import QtCore, QtGui, QtWidgets
19
19
  from PyQt5.QtCore import QT_VERSION_STR
20
20
  from PyQt5.Qt import PYQT_VERSION_STR
@@ -94,7 +94,7 @@ class BuildersBase(QtWidgets.QMainWindow):
94
94
  res = QtWidgets.QDesktopWidget().screenGeometry()
95
95
  self.resize(min(1280, res.width() - 10), min(720, res.height() - 10))
96
96
  self.setWindowTitle(self.builder_name)
97
- window_icon = resource_filename("pypsbuilder", app_icons[self.builder_name])
97
+ window_icon = str(ires.files("pypsbuilder").joinpath(app_icons[self.builder_name]))
98
98
  self.setWindowIcon(QtGui.QIcon(window_icon))
99
99
  self.__changed = False
100
100
  self.about_dialog = AboutDialog(self.builder_name, __version__, __copyright__)
@@ -5097,7 +5097,7 @@ class TopologyGraph(QtWidgets.QDialog):
5097
5097
  def __init__(self, ps, parent=None):
5098
5098
  super(TopologyGraph, self).__init__(parent)
5099
5099
  self.setWindowTitle("Topology graph")
5100
- window_icon = resource_filename("pypsbuilder", "images/pypsbuilder.png")
5100
+ window_icon = str(ires.files("pypsbuilder").joinpath("images/pypsbuilder.png"))
5101
5101
  self.setWindowIcon(QtGui.QIcon(window_icon))
5102
5102
  self.setWindowFlags(
5103
5103
  QtCore.Qt.WindowMinMaxButtonsHint | QtCore.Qt.WindowCloseButtonHint
@@ -4,6 +4,7 @@ This module contains classes and tools providing API to THERMOCALC, parsing of
4
4
  outputs and storage of calculated invariant points and univariant lines.
5
5
 
6
6
  """
7
+
7
8
  # author: Ondrej Lexa
8
9
  # website: https://github.com/ondrolexa/pypsbuilder
9
10
 
@@ -473,9 +474,11 @@ class TCResult:
473
474
  phases = head.split()[1:]
474
475
  # fixed width parsing !!!
475
476
  valsf = [
476
- float(vals[6:][12 * i : 12 * (i + 1)].strip())
477
- if vals[6:][12 * i : 12 * (i + 1)].strip() != ""
478
- else 0.0
477
+ (
478
+ float(vals[6:][12 * i : 12 * (i + 1)].strip())
479
+ if vals[6:][12 * i : 12 * (i + 1)].strip() != ""
480
+ else 0.0
481
+ )
479
482
  for i in range(len(phases))
480
483
  ]
481
484
  for phase, val in zip(phases, valsf):
@@ -484,9 +487,11 @@ class TCResult:
484
487
  head, vals = factor.split("\n")
485
488
  phases = head.split()[1:]
486
489
  valsf = [
487
- float(vals[6:][12 * i : 12 * (i + 1)].strip())
488
- if vals[6:][12 * i : 12 * (i + 1)].strip() != ""
489
- else 0.0
490
+ (
491
+ float(vals[6:][12 * i : 12 * (i + 1)].strip())
492
+ if vals[6:][12 * i : 12 * (i + 1)].strip() != ""
493
+ else 0.0
494
+ )
490
495
  for i in range(len(phases))
491
496
  ]
492
497
  for phase, val in zip(phases, valsf):
@@ -934,6 +939,13 @@ class SectionBase:
934
939
  phases = self.unilines[unilist[0]].phases.difference(
935
940
  self.unilines[unilist[0]].out
936
941
  )
942
+ if frozenset(phases) in shapes: # switch polymorph
943
+ for pp in polymorphs:
944
+ if self.unilines[unilist[0]].out.issubset(pp):
945
+ phases = self.unilines[unilist[0]].phases.difference(
946
+ pp.difference(self.unilines[unilist[0]].out)
947
+ )
948
+ break
937
949
  shapes[frozenset(phases)] = poly
938
950
  unilists[frozenset(phases)] = unilist
939
951
  elif frozenset(phases) in shapes:
@@ -636,12 +636,13 @@ class PS:
636
636
  mn, mx = sys.float_info.max, -sys.float_info.max
637
637
  recs = OrderedDict()
638
638
  for key in self:
639
- d = self.collect_data(key, phase, expr, which=which)
640
- z = d["data"]
641
- if z:
642
- recs[key] = d
643
- mn = min(mn, min(z))
644
- mx = max(mx, max(z))
639
+ if phase.split('(')[0] in key:
640
+ d = self.collect_data(key, phase, expr, which=which)
641
+ z = d["data"]
642
+ if z:
643
+ recs[key] = d
644
+ mn = min(mn, min(z))
645
+ mx = max(mx, max(z))
645
646
  # res = self.grid.gridcalcs[self.grid.masks[key]]
646
647
  # if len(res) > 0:
647
648
  # if phase in res[0]['data']:
@@ -948,7 +949,7 @@ class PS:
948
949
  cgd = {}
949
950
  mn, mx = sys.float_info.max, -sys.float_info.max
950
951
  for ix, grid in self.grids.items():
951
- gd = np.empty(grid.xg.shape)
952
+ gd = np.empty(grid.xg.shape, dtype=float)
952
953
  gd[:] = np.nan
953
954
  for key in grid.masks:
954
955
  results = grid.gridcalcs[grid.masks[key] & (grid.status == 1)]
@@ -989,9 +990,12 @@ class PS:
989
990
  self,
990
991
  *args,
991
992
  interpolation=None,
993
+ colors=None,
992
994
  label=False,
993
995
  skiplabels=0,
994
996
  labelfs=6,
997
+ logerr=True,
998
+ maxerr=10,
995
999
  geterror=False,
996
1000
  getpt=False,
997
1001
  fig=None,
@@ -1001,6 +1005,8 @@ class PS:
1001
1005
  smooth=0,
1002
1006
  alpha=0.5,
1003
1007
  lw=2,
1008
+ filename=None,
1009
+ save_kw={},
1004
1010
  ):
1005
1011
  """Function to plot root squared error of calculated and estimated values.
1006
1012
 
@@ -1013,6 +1019,7 @@ class PS:
1013
1019
  interpolation (str): matplotlib imshow interpolation method.
1014
1020
  Default None.
1015
1021
  label (bool): Whether to label divariant fields. Default False.
1022
+ logerr (bool): When True, plot logarithms of error. Default True
1016
1023
  geterror (bool): When True, calculated RMSE array is returned. Otherwise
1017
1024
  error is plotted. Deafult False
1018
1025
  getpt (bool): When True return tuple of (p, T, err) where error is minimal.
@@ -1022,6 +1029,8 @@ class PS:
1022
1029
  fig (Figure): If not None, axes are added to fig and returned.
1023
1030
  Default None
1024
1031
  fig_kw: dict passed to subplots method.
1032
+ filename: If not None, figure is saved to file
1033
+ save_kw: dict passed to savefig method.
1025
1034
  isopleths (bool): When True, searched isopleths are shown. Default False
1026
1035
  which (int): Bitopt defining from where data are collected. 0 bit -
1027
1036
  invariant points, 1 bit - uniariant lines and 2 bit - GridData
@@ -1038,7 +1047,8 @@ class PS:
1038
1047
  if len(args) % 3 == 0:
1039
1048
  if self.gridded:
1040
1049
  err = []
1041
- prop_cycle = plt.rcParams["axes.prop_cycle"]
1050
+ if colors is None:
1051
+ colors = list(mcolors.TABLEAU_COLORS.keys())[: len(args) // 3]
1042
1052
  for phase, expr, val in zip(args[::3], args[1::3], args[2::3]):
1043
1053
  if self.check_phase_expr(phase, expr):
1044
1054
  err.append(
@@ -1052,6 +1062,7 @@ class PS:
1052
1062
  )
1053
1063
 
1054
1064
  err = np.sqrt(sum(err)) / len(err)
1065
+ err[err > maxerr] = np.nan
1055
1066
  r, c = np.unravel_index(np.nanargmin(err), err.shape)
1056
1067
  p = self.yspace[r]
1057
1068
  T = self.xspace[c]
@@ -1073,13 +1084,16 @@ class PS:
1073
1084
  origin="lower",
1074
1085
  alpha=alpha,
1075
1086
  )
1076
- ax.contour(self.xspace, self.yspace, err, colors="w")
1087
+ if logerr:
1088
+ ax.contour(self.xspace, self.yspace, np.log(err), colors="w")
1089
+ else:
1090
+ ax.contour(self.xspace, self.yspace, err, colors="w")
1077
1091
  if isopleths:
1078
1092
  for phase, expr, val, cc in zip(
1079
1093
  args[::3],
1080
1094
  args[1::3],
1081
1095
  args[2::3],
1082
- prop_cycle.by_key()["color"],
1096
+ colors,
1083
1097
  ):
1084
1098
  if self.check_phase_expr(phase, expr):
1085
1099
  ax = self.isopleths_vector(
@@ -1093,9 +1107,14 @@ class PS:
1093
1107
  ax.set_ylim(self.yrange)
1094
1108
  fig.colorbar(im)
1095
1109
 
1096
- ax.set_title(f"RMSE - MinErr={minerr:g} at {T} {p}")
1110
+ ax.set_title(f"RMSE - MinErr={minerr:g} at {T:g} {p:g}")
1097
1111
  fig.tight_layout()
1098
- plt.show()
1112
+
1113
+ if filename is not None:
1114
+ plt.savefig(filename, **save_kw)
1115
+ plt.close(fig)
1116
+ else:
1117
+ plt.show()
1099
1118
  else:
1100
1119
  print("Not yet gridded...")
1101
1120
  else:
@@ -1762,10 +1781,10 @@ class PS:
1762
1781
 
1763
1782
  Example:
1764
1783
  >>> pt.overlap_isopleths(
1765
- 'g', 'xMgX', (0.07, 0.13),
1766
1784
  'g', 'xFeX', (0.51, 0.65),
1767
- 'g', 'xCaX', (0.06, 0.15),
1785
+ 'g', 'xMgX', (0.07, 0.13),
1768
1786
  'g', 'xMnX', (0.16, 0.27),
1787
+ 'g', 'xCaX', (0.06, 0.15),
1769
1788
  )
1770
1789
  """
1771
1790
  if len(args) % 3 == 0:
@@ -1779,10 +1798,7 @@ class PS:
1779
1798
  show = kwargs.get("show", None)
1780
1799
  colors = kwargs.get("colors", None)
1781
1800
  if colors is None:
1782
- cc = list(mcolors.TABLEAU_COLORS.keys())
1783
- cixs = np.random.choice(
1784
- range(len(cc)), size=len(args) // 3, replace=False
1785
- )
1801
+ colors = list(mcolors.TABLEAU_COLORS.keys())[: len(args) // 3]
1786
1802
  handles = []
1787
1803
  if fig is None:
1788
1804
  if ax is None:
@@ -1796,7 +1812,7 @@ class PS:
1796
1812
  show = False
1797
1813
  ax = fig.add_subplot()
1798
1814
  for phase, expr, levels, color in zip(
1799
- args[::3], args[1::3], args[2::3], cixs
1815
+ args[::3], args[1::3], args[2::3], colors
1800
1816
  ):
1801
1817
  ax = self.isopleths(
1802
1818
  phase,
@@ -1804,20 +1820,19 @@ class PS:
1804
1820
  levels=levels,
1805
1821
  colorbar=False,
1806
1822
  filled_over=True,
1807
- colors=[cc[color]],
1823
+ colors=[color],
1808
1824
  alpha=alpha,
1809
1825
  show=False,
1810
1826
  ax=ax,
1811
1827
  )
1812
- handles.append(
1813
- mpatches.Patch(color=cc[color], alpha=alpha, label=expr)
1814
- )
1828
+ handles.append(mpatches.Patch(color=color, alpha=alpha, label=expr))
1815
1829
  self.add_overlay(ax)
1816
1830
  ax.legend(handles=handles)
1817
1831
  # coords
1818
1832
  ax.format_coord = self.format_coord
1819
1833
  # connect button press
1820
1834
  # cid = fig.canvas.mpl_connect('button_press_event', self.onclick)
1835
+ ax.set_title(self.name)
1821
1836
  if filename is not None:
1822
1837
  plt.savefig(filename, **save_kw)
1823
1838
  plt.close(fig)
@@ -2381,7 +2396,7 @@ class PS:
2381
2396
  self.common_grid_and_masks()
2382
2397
  # interpolate on common grid
2383
2398
  recs, mn, mx = self.merge_data(phase, expr, which=which)
2384
- gd = np.empty(self.xg.shape)
2399
+ gd = np.empty(self.xg.shape, dtype=float)
2385
2400
  gd[:] = np.nan
2386
2401
  for key in recs:
2387
2402
  xmin, ymin, xmax, ymax = self.shapes[key].bounds
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypsbuilder
3
- Version: 2.4.2
3
+ Version: 2.5.0
4
4
  Summary: THERMOCALC front-end for constructing and analyzing PT pseudosections
5
5
  Home-page: https://github.com/ondrolexa/pypsbuilder
6
6
  Author: Ondrej Lexa
@@ -13,7 +13,7 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
13
13
  Classifier: Programming Language :: Python :: 3 :: Only
14
14
  Classifier: Topic :: Scientific/Engineering
15
15
  Classifier: Topic :: Utilities
16
- Requires-Python: >=3.8
16
+ Requires-Python: >=3.9
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  License-File: AUTHORS.md
@@ -88,9 +88,14 @@ pypsbuilder is free software: you can redistribute it and/or modify it under the
88
88
  # Changelog
89
89
  All notable pypsbuilder changes.
90
90
 
91
+ ## [2.5.0] - 2024-12-13
92
+ ### Fixed
93
+ - fix for coe-q
94
+
91
95
  ## [2.4.2] - 2024-04-23
92
96
  ### Fixed
93
97
  - another fix of and-ky-sill triple point linking
98
+
94
99
  ## [2.4.1] - 2024-03-07
95
100
  ### Fixed
96
101
  - fixed and-ky-sill triple point uniline suggestions
@@ -146,7 +151,7 @@ All notable pypsbuilder changes.
146
151
  - latest THERMOCALC 3.50 compatibility
147
152
 
148
153
  ### Added
149
- - isopleths quadratic surface fit method added
154
+ - isopleths quadratic surface fit method added
150
155
  - isopleths figure and savefig options added
151
156
 
152
157
  ## [2.2.2] - 2021-01-25
@@ -4,6 +4,7 @@ CONTRIBUTING.md
4
4
  LICENSE
5
5
  MANIFEST.in
6
6
  README.md
7
+ pyproject.toml
7
8
  setup.cfg
8
9
  setup.py
9
10
  docs/Makefile
@@ -1,11 +1,13 @@
1
1
  [bumpversion]
2
- current_version = 2.4.2
2
+ current_version = 2.5.0
3
3
  commit = True
4
4
  tag = True
5
5
  tag_name = {new_version}
6
6
 
7
7
  [bumpversion:file:setup.py]
8
8
 
9
+ [bumpversion:file:pyproject.toml]
10
+
9
11
  [bumpversion:file:docs/conf.py]
10
12
 
11
13
  [bumpversion:file:pypsbuilder/__init__.py]
@@ -15,7 +15,7 @@ requirements = ["numpy", "matplotlib>=3", "scipy", "networkx", "shapely>=2", "tq
15
15
 
16
16
  setup(
17
17
  name="pypsbuilder",
18
- version="2.4.2",
18
+ version="2.5.0",
19
19
  description="THERMOCALC front-end for constructing and analyzing PT pseudosections",
20
20
  long_description=readme + "\n\n" + changelog,
21
21
  long_description_content_type="text/markdown",
@@ -23,7 +23,7 @@ setup(
23
23
  author_email="lexa.ondrej@gmail.com",
24
24
  url="https://github.com/ondrolexa/pypsbuilder",
25
25
  license="MIT",
26
- python_requires=">=3.8",
26
+ python_requires=">=3.9",
27
27
  packages=find_packages(),
28
28
  package_data={"pypsbuilder.images": ["*.png"]},
29
29
  entry_points="""
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes