pypsbuilder 2.4.1__tar.gz → 2.4.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 (57) hide show
  1. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/CHANGELOG.md +3 -2
  2. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/PKG-INFO +4 -3
  3. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/conf.py +1 -1
  4. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/__init__.py +1 -1
  5. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/psclasses.py +15 -14
  6. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/psexplorer.py +35 -11
  7. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder.egg-info/PKG-INFO +4 -3
  8. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/setup.cfg +1 -1
  9. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/setup.py +1 -1
  10. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/AUTHORS.md +0 -0
  11. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/CONTRIBUTING.md +0 -0
  12. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/LICENSE +0 -0
  13. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/MANIFEST.in +0 -0
  14. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/README.md +0 -0
  15. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/Makefile +0 -0
  16. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psclasses.Dogmin.rst +0 -0
  17. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psclasses.InvPoint.rst +0 -0
  18. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psclasses.PTsection.rst +0 -0
  19. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psclasses.PXsection.rst +0 -0
  20. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psclasses.TCResult.rst +0 -0
  21. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psclasses.TCResultSet.rst +0 -0
  22. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psclasses.TXsection.rst +0 -0
  23. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psclasses.UniLine.rst +0 -0
  24. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psexplorer.PTPS.rst +0 -0
  25. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psexplorer.PXPS.rst +0 -0
  26. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.psexplorer.TXPS.rst +0 -0
  27. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.tcapi.TC34API.rst +0 -0
  28. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api/pypsbuilder.tcapi.TC35API.rst +0 -0
  29. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/api.rst +0 -0
  30. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/authors.rst +0 -0
  31. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/command-line.rst +0 -0
  32. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/index.rst +0 -0
  33. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/installation.rst +0 -0
  34. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/psbuilders-tutorial.rst +0 -0
  35. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/docs/psexplorer-tutorial.rst +0 -0
  36. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/images/__init__.py +0 -0
  37. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/images/ptbuilder.png +0 -0
  38. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/images/pxbuilder.png +0 -0
  39. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/images/pypsbuilder.png +0 -0
  40. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/images/txbuilder.png +0 -0
  41. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/psbuilders.py +0 -0
  42. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/tcapi.py +0 -0
  43. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/tcinit.py +0 -0
  44. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/tests/__init__.py +0 -0
  45. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/tests/test_pclasses.py +0 -0
  46. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/ui_addinv.py +0 -0
  47. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/ui_adduni.py +0 -0
  48. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/ui_ptbuilder.py +0 -0
  49. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/ui_pxbuilder.py +0 -0
  50. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/ui_txbuilder.py +0 -0
  51. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder/ui_uniguess.py +0 -0
  52. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder.egg-info/SOURCES.txt +0 -0
  53. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder.egg-info/dependency_links.txt +0 -0
  54. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder.egg-info/entry_points.txt +0 -0
  55. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder.egg-info/not-zip-safe +0 -0
  56. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder.egg-info/requires.txt +0 -0
  57. {pypsbuilder-2.4.1 → pypsbuilder-2.4.2}/pypsbuilder.egg-info/top_level.txt +0 -0
@@ -1,8 +1,9 @@
1
1
  # Changelog
2
2
  All notable pypsbuilder changes.
3
3
 
4
- ## master
5
-
4
+ ## [2.4.2] - 2024-04-23
5
+ ### Fixed
6
+ - another fix of and-ky-sill triple point linking
6
7
  ## [2.4.1] - 2024-03-07
7
8
  ### Fixed
8
9
  - fixed and-ky-sill triple point uniline suggestions
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypsbuilder
3
- Version: 2.4.1
3
+ Version: 2.4.2
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
@@ -88,8 +88,9 @@ 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
- ## master
92
-
91
+ ## [2.4.2] - 2024-04-23
92
+ ### Fixed
93
+ - another fix of and-ky-sill triple point linking
93
94
  ## [2.4.1] - 2024-03-07
94
95
  ### Fixed
95
96
  - fixed and-ky-sill triple point uniline suggestions
@@ -77,7 +77,7 @@ author = "Ondrej Lexa"
77
77
  # The short X.Y version.
78
78
  version = "2.4"
79
79
  # The full version, including alpha/beta/rc tags.
80
- release = "2.4.1"
80
+ release = "2.4.2"
81
81
 
82
82
  # The language for content autogenerated by Sphinx. Refer to documentation
83
83
  # for a list of supported languages.
@@ -22,7 +22,7 @@ __all__ = (
22
22
  "get_tcapi",
23
23
  )
24
24
 
25
- __version__ = "2.4.1"
25
+ __version__ = "2.4.2"
26
26
  __author__ = "Ondrej Lexa"
27
27
  __copyright__ = "© Ondrej Lexa 2024"
28
28
  __email__ = "lexa.ondrej@gmail.com"
@@ -282,8 +282,8 @@ class UniLine(PseudoBase):
282
282
  return candidate
283
283
 
284
284
  # Check for polymorphs
285
- fixi, fixu = False, False
286
285
  for poly in polymorphs:
286
+ fixi, fixu = False, False
287
287
  if (
288
288
  poly.issubset(ip.phases)
289
289
  and (poly != ip.out)
@@ -292,20 +292,21 @@ class UniLine(PseudoBase):
292
292
  fixi = True
293
293
  if poly.issubset(self.phases) and not self.out.isdisjoint(poly):
294
294
  fixu = True
295
+ # check invs
296
+ candidate = checkme(self.phases, self.out, ip.phases, ip.out)
297
+ if fixi and not candidate:
298
+ candidate = checkme(
299
+ self.phases,
300
+ self.out,
301
+ ip.phases,
302
+ ip.out.difference(poly).union(poly.difference(ip.out)),
303
+ )
304
+ if fixu and not candidate:
305
+ candidate = checkme(
306
+ self.phases, poly.difference(self.out), ip.phases, ip.out
307
+ )
308
+ if candidate:
295
309
  break
296
- # check invs
297
- candidate = checkme(self.phases, self.out, ip.phases, ip.out)
298
- if fixi and not candidate:
299
- candidate = checkme(
300
- self.phases,
301
- self.out,
302
- ip.phases,
303
- ip.out.difference(poly).union(poly.difference(ip.out)),
304
- )
305
- if fixu and not candidate:
306
- candidate = checkme(
307
- self.phases, poly.difference(self.out), ip.phases, ip.out
308
- )
309
310
  return candidate
310
311
 
311
312
  def get_label_point(self):
@@ -999,6 +999,8 @@ class PS:
999
999
  isopleths=False,
1000
1000
  which=7,
1001
1001
  smooth=0,
1002
+ alpha=0.5,
1003
+ lw=2,
1002
1004
  ):
1003
1005
  """Function to plot root squared error of calculated and estimated values.
1004
1006
 
@@ -1020,7 +1022,7 @@ class PS:
1020
1022
  fig (Figure): If not None, axes are added to fig and returned.
1021
1023
  Default None
1022
1024
  fig_kw: dict passed to subplots method.
1023
- isopleths (bool): When True, searched isoplots are shown.Default False
1025
+ isopleths (bool): When True, searched isopleths are shown. Default False
1024
1026
  which (int): Bitopt defining from where data are collected. 0 bit -
1025
1027
  invariant points, 1 bit - uniariant lines and 2 bit - GridData
1026
1028
  points
@@ -1036,6 +1038,7 @@ class PS:
1036
1038
  if len(args) % 3 == 0:
1037
1039
  if self.gridded:
1038
1040
  err = []
1041
+ prop_cycle = plt.rcParams["axes.prop_cycle"]
1039
1042
  for phase, expr, val in zip(args[::3], args[1::3], args[2::3]):
1040
1043
  if self.check_phase_expr(phase, expr):
1041
1044
  err.append(
@@ -1068,13 +1071,19 @@ class PS:
1068
1071
  interpolation=interpolation,
1069
1072
  aspect="auto",
1070
1073
  origin="lower",
1074
+ alpha=alpha,
1071
1075
  )
1072
1076
  ax.contour(self.xspace, self.yspace, err, colors="w")
1073
1077
  if isopleths:
1074
- for phase, expr, val in zip(args[::3], args[1::3], args[2::3]):
1078
+ for phase, expr, val, cc in zip(
1079
+ args[::3],
1080
+ args[1::3],
1081
+ args[2::3],
1082
+ prop_cycle.by_key()["color"],
1083
+ ):
1075
1084
  if self.check_phase_expr(phase, expr):
1076
1085
  ax = self.isopleths_vector(
1077
- phase, expr, levels=[val], ax=ax
1086
+ phase, expr, levels=[val], ax=ax, lw=lw, color=cc
1078
1087
  )
1079
1088
  ax.plot(T, p, "r*", ms=20)
1080
1089
  self.add_overlay(
@@ -1714,10 +1723,10 @@ class PS:
1714
1723
  table(ax=ax, cellText=[val1, val2], colLabels=ox, loc="top")
1715
1724
  else:
1716
1725
  if only is None:
1717
- if show is None or show is True:
1718
- ax.set_xlim(self.xrange)
1719
- ax.set_ylim(self.yrange)
1720
- ax.set_title("{}({})".format(phase, expr))
1726
+ # if show is None or show is True:
1727
+ ax.set_xlim(self.xrange)
1728
+ ax.set_ylim(self.yrange)
1729
+ ax.set_title("{}({})".format(phase, expr))
1721
1730
  else:
1722
1731
  ax.set_title("{} - {}({})".format(" ".join(only), phase, expr))
1723
1732
  # coords
@@ -1746,6 +1755,10 @@ class PS:
1746
1755
  fig (Figure): If not None, axes are added to fig and returned.
1747
1756
  Default None
1748
1757
  fig_kw: dict passed to subplots method.
1758
+ filename: If not None, figure is saved to file
1759
+ save_kw: dict passed to savefig method.
1760
+ show (bool): When False, Axes are returned, otherwise plot is shown.
1761
+ Default True
1749
1762
 
1750
1763
  Example:
1751
1764
  >>> pt.overlap_isopleths(
@@ -1858,16 +1871,17 @@ class PS:
1858
1871
  overlay (bool): Whether to show assemblage fields. Default True
1859
1872
  high (frozenset or list): Highlight divariant fields identified
1860
1873
  by key(s).
1861
- cmap (str): matplotlib colormap used to divariant fields coloring.
1862
- Colors are based on variance. Default 'viridis'.
1874
+ cmap (str): matplotlib colormap used isopleths coloring. Default 'viridis'.
1863
1875
  bulk (bool): Whether to show bulk composition on top of diagram.
1864
1876
  Default False.
1865
1877
  fig (Figure): If not None, axes are added to fig and returned.
1866
1878
  Default None
1867
1879
  fig_kw: dict passed to subplots method.
1880
+ lw (float): Linewidth of isopleths. Default 1.0
1868
1881
  ax (Axes): Axes to be used. Default None
1869
1882
  filename: If not None, figure is saved to file
1870
1883
  save_kw: dict passed to savefig method.
1884
+ color: matplotlib color for isopleths. If None cmap is used. Default None.
1871
1885
  show (bool): When False, Axes are returned, otherwise plot is shown.
1872
1886
  Default True
1873
1887
  """
@@ -1893,9 +1907,11 @@ class PS:
1893
1907
  method = kwargs.get("method", "rbf")
1894
1908
  rbf_func = kwargs.get("rbf_func", "thin_plate")
1895
1909
  cmap = kwargs.get("cmap", "viridis")
1910
+ color = kwargs.get("color", None)
1896
1911
  colorbar = kwargs.get("colorbar", True)
1897
1912
  fig = kwargs.get("fig", None)
1898
1913
  fig_kw = kwargs.get("fig_kw", {})
1914
+ lw = kwargs.get("lw", 1.0)
1899
1915
  ax = kwargs.get("ax", None)
1900
1916
  filename = kwargs.get("filename", None)
1901
1917
  save_kw = kwargs.get("save_kw", {})
@@ -2085,11 +2101,19 @@ class PS:
2085
2101
  for lnp in ln.geoms:
2086
2102
  lnp = lnp.simplify(tolerance=0.01)
2087
2103
  x, y = np.array(lnp.coords).T
2088
- ax.plot(x, y, color=mapper.to_rgba(v))
2104
+ if color is None:
2105
+ ax.plot(
2106
+ x, y, color=mapper.to_rgba(v), lw=lw
2107
+ )
2108
+ else:
2109
+ ax.plot(x, y, color=color, lw=lw)
2089
2110
  else:
2090
2111
  ln = ln.simplify(tolerance=0.01)
2091
2112
  x, y = np.array(ln.coords).T
2092
- ax.plot(x, y, color=mapper.to_rgba(v))
2113
+ if color is None:
2114
+ ax.plot(x, y, color=mapper.to_rgba(v), lw=lw)
2115
+ else:
2116
+ ax.plot(x, y, color=color, lw=lw)
2093
2117
  if only is None:
2094
2118
  if overlay:
2095
2119
  self.add_overlay(ax)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypsbuilder
3
- Version: 2.4.1
3
+ Version: 2.4.2
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
@@ -88,8 +88,9 @@ 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
- ## master
92
-
91
+ ## [2.4.2] - 2024-04-23
92
+ ### Fixed
93
+ - another fix of and-ky-sill triple point linking
93
94
  ## [2.4.1] - 2024-03-07
94
95
  ### Fixed
95
96
  - fixed and-ky-sill triple point uniline suggestions
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 2.4.1
2
+ current_version = 2.4.2
3
3
  commit = True
4
4
  tag = True
5
5
  tag_name = {new_version}
@@ -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.1",
18
+ version="2.4.2",
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",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes