LLNL-PyDV 3.9.0__tar.gz → 3.10.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 (31) hide show
  1. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/LICENSE +11 -11
  2. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0/LLNL_PyDV.egg-info}/PKG-INFO +32 -29
  3. llnl_pydv-3.10.0/LLNL_PyDV.egg-info/SOURCES.txt +23 -0
  4. llnl_pydv-3.10.0/LLNL_PyDV.egg-info/dependency_links.txt +1 -0
  5. llnl_pydv-3.10.0/LLNL_PyDV.egg-info/entry_points.txt +2 -0
  6. llnl_pydv-3.10.0/LLNL_PyDV.egg-info/requires.txt +19 -0
  7. llnl_pydv-3.10.0/LLNL_PyDV.egg-info/top_level.txt +1 -0
  8. llnl_pydv-3.10.0/PKG-INFO +85 -0
  9. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/README.md +1 -1
  10. llnl_pydv-3.10.0/pydv/__init__.py +1 -0
  11. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/curve.py +149 -102
  12. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/pdv.py +1533 -1338
  13. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/pdv_launcher.py +3 -1
  14. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/pdvplot.py +76 -49
  15. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/pdvutil.py +86 -88
  16. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/pydvpy.py +504 -524
  17. llnl_pydv-3.10.0/pyproject.toml +76 -0
  18. llnl_pydv-3.10.0/setup.cfg +4 -0
  19. llnl_pydv-3.10.0/tests/test_pdv.py +313 -0
  20. llnl_pydv-3.10.0/tests/test_pydv_images.py +525 -0
  21. llnl_pydv-3.10.0/tests/test_pydvpy.py +300 -0
  22. llnl_pydv-3.9.0/pydv/__init__.py +0 -1
  23. llnl_pydv-3.9.0/pydv/pdv +0 -22
  24. llnl_pydv-3.9.0/pydv/scripts/date.txt +0 -1
  25. llnl_pydv-3.9.0/pydv/scripts/update_version_and_date.py +0 -64
  26. llnl_pydv-3.9.0/pydv/scripts/version.txt +0 -1
  27. llnl_pydv-3.9.0/pyproject.toml +0 -81
  28. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/img/app_icon3.png +0 -0
  29. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/img/window-code-7.png +0 -0
  30. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/img/window-code-7@2x.png +0 -0
  31. {llnl_pydv-3.9.0 → llnl_pydv-3.10.0}/pydv/pdvnavbar.py +0 -0
@@ -3,15 +3,15 @@ Produced at the Lawrence Livermore National Laboratory
3
3
  Written by Mason Kwiat, Douglas S. Miller, Kevin Griffin, Ephraim Rusu, Rachael Brooks, Sarah El-Jurf, Jorge Moreno
4
4
  e-mail: moreno45@llnl.gov
5
5
  LLNL-CODE-507071
6
- All rights reserved.
7
-
8
- This file is part of PDV. For details, see <https://lc.llnl.gov/confluence/pages/viewpage.action?spaceKey=PYDV&title=PyDV%3A+Python+Data+Visualizer>.
6
+ All rights reserved.
7
+
8
+ This file is part of PDV. For details, see <https://lc.llnl.gov/confluence/pages/viewpage.action?spaceKey=PYDV&title=PyDV%3A+Python+Data+Visualizer>.
9
9
  Please also read "Additional BSD Notice".
10
-
10
+
11
11
  Redistribution and use in source and binary forms, with or without
12
12
  modification, are permitted provided that the following conditions
13
13
  are met:
14
-
14
+
15
15
  Redistributions of source code must retain the above copyright
16
16
  notice, this list of conditions and the disclaimer below.
17
17
  Redistributions in binary form must reproduce the above copyright
@@ -20,7 +20,7 @@ in the documentation and/or other materials provided with the
20
20
  distribution. Neither the name of the LLNS/LLNL nor the names of
21
21
  its contributors may be used to endorse or promote products derived
22
22
  from this software without specific prior written permission.
23
-
23
+
24
24
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25
25
  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26
26
  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -34,21 +34,21 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34
34
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
35
35
  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36
36
  SUCH DAMAGE.
37
-
38
- Additional BSD Notice
39
-
37
+
38
+ Additional BSD Notice
39
+
40
40
  1. This notice is required to be provided under our contract with
41
41
  the U.S. Department of Energy (DOE). This work was produced at
42
42
  Lawrence Livermore National Laboratory under Contract
43
43
  No. DE-AC52-07NA27344 with the DOE.
44
-
44
+
45
45
  2. Neither the United States Government nor Lawrence Livermore
46
46
  National Security, LLC nor any of their employees, makes any
47
47
  warranty, express or implied, or assumes any liability or
48
48
  responsibility for the accuracy, completeness, or usefulness of any
49
49
  information, apparatus, product, or process disclosed, or represents
50
50
  that its use would not infringe privately-owned rights.
51
-
51
+
52
52
  3. Also, reference herein to any specific commercial products,
53
53
  process, or services by trade name, trademark, manufacturer or
54
54
  otherwise does not necessarily constitute or imply its endorsement,
@@ -1,43 +1,47 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: LLNL-PyDV
3
- Version: 3.9.0
3
+ Version: 3.10.0
4
4
  Summary: PyDV: Python Data Visualizer
5
+ Author-email: Jorge Moreno <moreno45@llnl.gov>, Sarah El-Jurf <eljurf1@llnl.gov>, Ephraim Rusu <rusu1@llnl.gov>
6
+ Maintainer-email: Jorge Moreno <moreno45@llnl.gov>
5
7
  License: BSD
6
- License-File: LICENSE
7
- Author: Jorge Moreno
8
- Author-email: moreno45@llnl.gov
9
- Maintainer: Jorge Moreno
10
- Maintainer-email: moreno45@llnl.gov
11
- Requires-Python: >=3.9
8
+ Project-URL: Homepage, https://github.com/LLNL/PyDV
9
+ Project-URL: Documentation, https://pydv.readthedocs.io/en/latest/
10
+ Project-URL: Issues, https://github.com/LLNL/PyDV/issues
11
+ Project-URL: Discussions, https://github.com/LLNL/PyDV/discussions
12
12
  Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: BSD License
14
14
  Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: Intended Audience :: Developers
15
16
  Classifier: Intended Audience :: Science/Research
16
- Classifier: License :: OSI Approved :: BSD License
17
- Classifier: License :: Other/Proprietary License
18
- Classifier: Operating System :: OS Independent
19
- Classifier: Programming Language :: Python :: 3
20
- Classifier: Programming Language :: Python :: 3.9
21
- Classifier: Programming Language :: Python :: 3.10
22
- Classifier: Programming Language :: Python :: 3.11
23
- Classifier: Programming Language :: Python :: 3.12
24
- Classifier: Programming Language :: Python :: 3.13
25
- Classifier: Programming Language :: Python :: 3.14
26
17
  Classifier: Topic :: Scientific/Engineering
27
18
  Classifier: Topic :: Scientific/Engineering :: Mathematics
28
- Requires-Dist: PyQt6
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
29
24
  Requires-Dist: matplotlib
30
25
  Requires-Dist: numpy
31
- Requires-Dist: scikit-image
32
- Requires-Dist: scikit-learn
33
26
  Requires-Dist: scipy
34
- Project-URL: Bug Tracker, https://github.com/LLNL/PyDV/issues
35
- Project-URL: Documentation, https://pydv.readthedocs.io/en/latest/
36
- Project-URL: Discussions, https://github.com/LLNL/PyDV/discussions
37
- Project-URL: Homepage, https://github.com/LLNL/PyDV
38
- Description-Content-Type: text/markdown
39
-
40
- # PyDV
27
+ Requires-Dist: pyside6<=6.9.3
28
+ Requires-Dist: h5py
29
+ Provides-Extra: dev
30
+ Requires-Dist: sphinx_rtd_theme; extra == "dev"
31
+ Requires-Dist: sphinx; extra == "dev"
32
+ Requires-Dist: pytest; extra == "dev"
33
+ Requires-Dist: sphinx-autoapi; extra == "dev"
34
+ Requires-Dist: six; extra == "dev"
35
+ Requires-Dist: scikit-image; extra == "dev"
36
+ Requires-Dist: imageio; extra == "dev"
37
+ Requires-Dist: pre-commit; extra == "dev"
38
+ Requires-Dist: ruff; extra == "dev"
39
+ Requires-Dist: ty; extra == "dev"
40
+ Requires-Dist: coverage; extra == "dev"
41
+ Requires-Dist: pytest-cov; extra == "dev"
42
+ Dynamic: license-file
43
+
44
+ # PyDV
41
45
 
42
46
  A 1D graphics and data analysis tool, heavily based on the ULTRA plotting tool.
43
47
 
@@ -79,4 +83,3 @@ All new contributions must be made under the [BSD-3 License](LICENSE)
79
83
  See [LICENSE](LICENSE) for details.
80
84
 
81
85
  LLNL-CODE-507071
82
-
@@ -0,0 +1,23 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ LLNL_PyDV.egg-info/PKG-INFO
5
+ LLNL_PyDV.egg-info/SOURCES.txt
6
+ LLNL_PyDV.egg-info/dependency_links.txt
7
+ LLNL_PyDV.egg-info/entry_points.txt
8
+ LLNL_PyDV.egg-info/requires.txt
9
+ LLNL_PyDV.egg-info/top_level.txt
10
+ pydv/__init__.py
11
+ pydv/curve.py
12
+ pydv/pdv.py
13
+ pydv/pdv_launcher.py
14
+ pydv/pdvnavbar.py
15
+ pydv/pdvplot.py
16
+ pydv/pdvutil.py
17
+ pydv/pydvpy.py
18
+ pydv/img/app_icon3.png
19
+ pydv/img/window-code-7.png
20
+ pydv/img/window-code-7@2x.png
21
+ tests/test_pdv.py
22
+ tests/test_pydv_images.py
23
+ tests/test_pydvpy.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pdv = pydv.pdv:main
@@ -0,0 +1,19 @@
1
+ matplotlib
2
+ numpy
3
+ scipy
4
+ pyside6<=6.9.3
5
+ h5py
6
+
7
+ [dev]
8
+ sphinx_rtd_theme
9
+ sphinx
10
+ pytest
11
+ sphinx-autoapi
12
+ six
13
+ scikit-image
14
+ imageio
15
+ pre-commit
16
+ ruff
17
+ ty
18
+ coverage
19
+ pytest-cov
@@ -0,0 +1 @@
1
+ pydv
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: LLNL-PyDV
3
+ Version: 3.10.0
4
+ Summary: PyDV: Python Data Visualizer
5
+ Author-email: Jorge Moreno <moreno45@llnl.gov>, Sarah El-Jurf <eljurf1@llnl.gov>, Ephraim Rusu <rusu1@llnl.gov>
6
+ Maintainer-email: Jorge Moreno <moreno45@llnl.gov>
7
+ License: BSD
8
+ Project-URL: Homepage, https://github.com/LLNL/PyDV
9
+ Project-URL: Documentation, https://pydv.readthedocs.io/en/latest/
10
+ Project-URL: Issues, https://github.com/LLNL/PyDV/issues
11
+ Project-URL: Discussions, https://github.com/LLNL/PyDV/discussions
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: License :: OSI Approved :: BSD License
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Topic :: Scientific/Engineering
18
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: matplotlib
25
+ Requires-Dist: numpy
26
+ Requires-Dist: scipy
27
+ Requires-Dist: pyside6<=6.9.3
28
+ Requires-Dist: h5py
29
+ Provides-Extra: dev
30
+ Requires-Dist: sphinx_rtd_theme; extra == "dev"
31
+ Requires-Dist: sphinx; extra == "dev"
32
+ Requires-Dist: pytest; extra == "dev"
33
+ Requires-Dist: sphinx-autoapi; extra == "dev"
34
+ Requires-Dist: six; extra == "dev"
35
+ Requires-Dist: scikit-image; extra == "dev"
36
+ Requires-Dist: imageio; extra == "dev"
37
+ Requires-Dist: pre-commit; extra == "dev"
38
+ Requires-Dist: ruff; extra == "dev"
39
+ Requires-Dist: ty; extra == "dev"
40
+ Requires-Dist: coverage; extra == "dev"
41
+ Requires-Dist: pytest-cov; extra == "dev"
42
+ Dynamic: license-file
43
+
44
+ # PyDV
45
+
46
+ A 1D graphics and data analysis tool, heavily based on the ULTRA plotting tool.
47
+
48
+ ## PyDV Importable Interface Module ###
49
+ You can now call most of PyDV's functionality from within a Python script. Below is an example of how to do this.
50
+
51
+ ### Most Current
52
+
53
+ ```
54
+ import sys
55
+ sys.path.append("/usr/gapps/pydv/current")
56
+ import pydvpy
57
+
58
+ curves = list()
59
+ curves.append(pydvpy.span(1,10,6))
60
+ pydvpy.save('myFile.txt', curves)
61
+ ```
62
+
63
+ ### PyPi or WEAVE Environment
64
+
65
+ ```
66
+ from pydv import pydvpy
67
+
68
+ curves = list()
69
+ curves.append(pydvpy.span(1,10,6))
70
+ pydvpy.save('myFile.txt', curves)
71
+ ```
72
+
73
+ # Documentation
74
+
75
+ [PyDV Users Manual](https://pydv.readthedocs.io/en/latest/) [![Documentation Status](https://readthedocs.org/projects/pydv/badge/?version=latest)](https://pydv.readthedocs.io/en/latest/?badge=latest)
76
+
77
+ # License
78
+
79
+ PyDV is distributed under the terms of the [BSD-3 License](LICENSE)
80
+
81
+ All new contributions must be made under the [BSD-3 License](LICENSE)
82
+
83
+ See [LICENSE](LICENSE) for details.
84
+
85
+ LLNL-CODE-507071
@@ -1,4 +1,4 @@
1
- # PyDV
1
+ # PyDV
2
2
 
3
3
  A 1D graphics and data analysis tool, heavily based on the ULTRA plotting tool.
4
4
 
@@ -0,0 +1 @@
1
+ __all__ = ["curve", "pdv", "pdvnavbar", "pdvplot", "pdvutil", "pydvpy"]
@@ -59,47 +59,49 @@
59
59
  # endorsement purposes.
60
60
 
61
61
  import sys
62
+
62
63
  import numpy as np
63
- from scipy import interpolate, integrate
64
+ from scipy import integrate, interpolate
64
65
 
65
66
 
66
67
  class Curve(object):
67
-
68
- def __init__(self,
69
- x=np.empty(0),
70
- y=np.empty(0),
71
- name='',
72
- filename='',
73
- xlabel='',
74
- ylabel='',
75
- title='',
76
- record_id='',
77
- step=False,
78
- step_original_x=np.empty(0),
79
- step_original_y=np.empty(0),
80
- xticks_labels=None,
81
- plotname='',
82
- color='',
83
- edited=False,
84
- scatter=False,
85
- linespoints=False,
86
- linewidth=None,
87
- linestyle='-',
88
- drawstyle='default',
89
- dashes=None,
90
- hidden=False,
91
- ebar=None, # errorbar
92
- erange=None, # errorrange
93
- marker='.', # Use matplotlib markers when setting directly
94
- markerstyle=None,
95
- markersize=3,
96
- markerfacecolor=None,
97
- markeredgecolor=None,
98
- plotprecedence=0,
99
- legend_show=True,
100
- math_interp_left=None,
101
- math_interp_right=None,
102
- math_interp_period=None):
68
+ def __init__(
69
+ self,
70
+ x=np.empty(0),
71
+ y=np.empty(0),
72
+ name="",
73
+ filename="",
74
+ xlabel="",
75
+ ylabel="",
76
+ title="",
77
+ record_id="",
78
+ step=False,
79
+ step_original_x=np.empty(0),
80
+ step_original_y=np.empty(0),
81
+ xticks_labels=None,
82
+ plotname="",
83
+ color="",
84
+ edited=False,
85
+ scatter=False,
86
+ linespoints=False,
87
+ linewidth=None,
88
+ linestyle="-",
89
+ drawstyle="default",
90
+ dashes=None,
91
+ hidden=False,
92
+ ebar=None, # errorbar
93
+ erange=None, # errorrange
94
+ marker=".", # Use matplotlib markers when setting directly
95
+ markerstyle=None,
96
+ markersize=3,
97
+ markerfacecolor=None,
98
+ markeredgecolor=None,
99
+ plotprecedence=0,
100
+ legend_show=True,
101
+ math_interp_left=None,
102
+ math_interp_right=None,
103
+ math_interp_period=None,
104
+ ):
103
105
  self.x = np.array(x, dtype=float)
104
106
  self.y = np.array(y, dtype=float)
105
107
  self.name = name
@@ -109,8 +111,8 @@ class Curve(object):
109
111
  self.title = title
110
112
  self.record_id = record_id
111
113
  self.step = step
112
- self.step_original_x = step_original_x,
113
- self.step_original_y = step_original_y,
114
+ self.step_original_x = step_original_x
115
+ self.step_original_y = step_original_y
114
116
  self.xticks_labels = xticks_labels
115
117
  self.plotname = plotname
116
118
  self.color = color
@@ -141,10 +143,17 @@ class Curve(object):
141
143
  def __add__(a, b):
142
144
  c = Curve()
143
145
  c.drawstyle = a.drawstyle
144
- c.plotname = str(a.plotname + ' + ' + b.plotname + ' ').strip(' ')
145
- ia, ib = getinterp(a, b,
146
- a.math_interp_left, a.math_interp_right, a.math_interp_period,
147
- b.math_interp_left, b.math_interp_right, b.math_interp_period)
146
+ c.plotname = str(a.plotname + " + " + b.plotname + " ").strip(" ")
147
+ ia, ib = getinterp(
148
+ a,
149
+ b,
150
+ a.math_interp_left,
151
+ a.math_interp_right,
152
+ a.math_interp_period,
153
+ b.math_interp_left,
154
+ b.math_interp_right,
155
+ b.math_interp_period,
156
+ )
148
157
  if ia.x is not None and ib.x is not None:
149
158
  c.x = ia.x
150
159
  c.y = ia.y + ib.y
@@ -155,10 +164,17 @@ class Curve(object):
155
164
  def __sub__(a, b):
156
165
  c = Curve()
157
166
  c.drawstyle = a.drawstyle
158
- c.plotname = str(a.plotname + ' - ' + b.plotname + ' ').strip(' ')
159
- ia, ib = getinterp(a, b,
160
- a.math_interp_left, a.math_interp_right, a.math_interp_period,
161
- b.math_interp_left, b.math_interp_right, b.math_interp_period)
167
+ c.plotname = str(a.plotname + " - " + b.plotname + " ").strip(" ")
168
+ ia, ib = getinterp(
169
+ a,
170
+ b,
171
+ a.math_interp_left,
172
+ a.math_interp_right,
173
+ a.math_interp_period,
174
+ b.math_interp_left,
175
+ b.math_interp_right,
176
+ b.math_interp_period,
177
+ )
162
178
  if ia.x is not None and ib.x is not None:
163
179
  c.x = ia.x
164
180
  c.y = ia.y - ib.y
@@ -169,10 +185,17 @@ class Curve(object):
169
185
  def __mul__(a, b):
170
186
  c = Curve()
171
187
  c.drawstyle = a.drawstyle
172
- c.plotname = str(a.plotname + ' * ' + b.plotname + ' ').strip(' ')
173
- ia, ib = getinterp(a, b,
174
- a.math_interp_left, a.math_interp_right, a.math_interp_period,
175
- b.math_interp_left, b.math_interp_right, b.math_interp_period)
188
+ c.plotname = str(a.plotname + " * " + b.plotname + " ").strip(" ")
189
+ ia, ib = getinterp(
190
+ a,
191
+ b,
192
+ a.math_interp_left,
193
+ a.math_interp_right,
194
+ a.math_interp_period,
195
+ b.math_interp_left,
196
+ b.math_interp_right,
197
+ b.math_interp_period,
198
+ )
176
199
  if ia.x is not None and ib.x is not None:
177
200
  c.x = ia.x
178
201
  c.y = ia.y * ib.y
@@ -183,10 +206,17 @@ class Curve(object):
183
206
  def __div__(a, b):
184
207
  c = Curve()
185
208
  c.drawstyle = a.drawstyle
186
- c.plotname = str(a.plotname + ' / ' + b.plotname + ' ').strip(' ')
187
- ia, ib = getinterp(a, b,
188
- a.math_interp_left, a.math_interp_right, a.math_interp_period,
189
- b.math_interp_left, b.math_interp_right, b.math_interp_period)
209
+ c.plotname = str(a.plotname + " / " + b.plotname + " ").strip(" ")
210
+ ia, ib = getinterp(
211
+ a,
212
+ b,
213
+ a.math_interp_left,
214
+ a.math_interp_right,
215
+ a.math_interp_period,
216
+ b.math_interp_left,
217
+ b.math_interp_right,
218
+ b.math_interp_period,
219
+ )
190
220
  if ia.x is not None and ib.x is not None:
191
221
  c.x = ia.x
192
222
 
@@ -205,10 +235,17 @@ class Curve(object):
205
235
  def __truediv__(a, b):
206
236
  c = Curve()
207
237
  c.drawstyle = a.drawstyle
208
- c.plotname = str(a.plotname + ' / ' + b.plotname + ' ').strip(' ')
209
- ia, ib = getinterp(a, b,
210
- a.math_interp_left, a.math_interp_right, a.math_interp_period,
211
- b.math_interp_left, b.math_interp_right, b.math_interp_period)
238
+ c.plotname = str(a.plotname + " / " + b.plotname + " ").strip(" ")
239
+ ia, ib = getinterp(
240
+ a,
241
+ b,
242
+ a.math_interp_left,
243
+ a.math_interp_right,
244
+ a.math_interp_period,
245
+ b.math_interp_left,
246
+ b.math_interp_right,
247
+ b.math_interp_period,
248
+ )
212
249
  if ia.x is not None and ib.x is not None:
213
250
  c.x = ia.x
214
251
 
@@ -227,7 +264,7 @@ class Curve(object):
227
264
  def __pow__(a, b):
228
265
  c = Curve()
229
266
  c.drawstyle = a.drawstyle
230
- c.plotname = str(a.plotname + '^' + str(b)).strip(' ')
267
+ c.plotname = str(a.plotname + "^" + str(b)).strip(" ")
231
268
  c.x = np.array(a.x)
232
269
  c.y = np.power(a.y, b)
233
270
  nans = np.isnan(c.y) # remove NaNs
@@ -238,7 +275,7 @@ class Curve(object):
238
275
  def __neg__(a):
239
276
  c = Curve()
240
277
  c.drawstyle = a.drawstyle
241
- c.plotname = str('-' + a.plotname)
278
+ c.plotname = str("-" + a.plotname)
242
279
  c.x = np.array(a.x)
243
280
  c.y = np.array(-a.y)
244
281
  return c
@@ -248,40 +285,42 @@ class Curve(object):
248
285
  Return a new copy of the curve object
249
286
  """
250
287
 
251
- c = Curve(x=np.array(self.x, dtype=float),
252
- y=np.array(self.y, dtype=float),
253
- name=self.name,
254
- filename=self.filename,
255
- xlabel=self.xlabel,
256
- ylabel=self.ylabel,
257
- title=self.title,
258
- record_id=self.record_id,
259
- step=self.step,
260
- step_original_x=self.step_original_x,
261
- step_original_y=self.step_original_y,
262
- xticks_labels=self.xticks_labels,
263
- plotname=self.plotname,
264
- color=self.color,
265
- edited=self.edited,
266
- scatter=self.scatter,
267
- linespoints=self.linespoints,
268
- linewidth=self.linewidth,
269
- linestyle=self.linestyle,
270
- drawstyle=self.drawstyle,
271
- dashes=self.dashes,
272
- hidden=self.hidden,
273
- ebar=self.ebar,
274
- erange=self.erange,
275
- marker=self.marker,
276
- markerstyle=self.markerstyle,
277
- markersize=self.markersize,
278
- markerfacecolor=self.markerfacecolor,
279
- markeredgecolor=self.markeredgecolor,
280
- plotprecedence=self.plotprecedence,
281
- legend_show=self.legend_show,
282
- math_interp_left=self.math_interp_left,
283
- math_interp_right=self.math_interp_right,
284
- math_interp_period=self.math_interp_period)
288
+ c = Curve(
289
+ x=np.array(self.x, dtype=float),
290
+ y=np.array(self.y, dtype=float),
291
+ name=self.name,
292
+ filename=self.filename,
293
+ xlabel=self.xlabel,
294
+ ylabel=self.ylabel,
295
+ title=self.title,
296
+ record_id=self.record_id,
297
+ step=self.step,
298
+ step_original_x=self.step_original_x,
299
+ step_original_y=self.step_original_y,
300
+ xticks_labels=self.xticks_labels,
301
+ plotname=self.plotname,
302
+ color=self.color,
303
+ edited=self.edited,
304
+ scatter=self.scatter,
305
+ linespoints=self.linespoints,
306
+ linewidth=self.linewidth,
307
+ linestyle=self.linestyle,
308
+ drawstyle=self.drawstyle,
309
+ dashes=self.dashes,
310
+ hidden=self.hidden,
311
+ ebar=self.ebar,
312
+ erange=self.erange,
313
+ marker=self.marker,
314
+ markerstyle=self.markerstyle,
315
+ markersize=self.markersize,
316
+ markerfacecolor=self.markerfacecolor,
317
+ markeredgecolor=self.markeredgecolor,
318
+ plotprecedence=self.plotprecedence,
319
+ legend_show=self.legend_show,
320
+ math_interp_left=self.math_interp_left,
321
+ math_interp_right=self.math_interp_right,
322
+ math_interp_period=self.math_interp_period,
323
+ )
285
324
 
286
325
  return c
287
326
 
@@ -300,10 +339,18 @@ class Curve(object):
300
339
  return c
301
340
 
302
341
 
303
- def getinterp(a, b,
304
- a_left=None, a_right=None, a_period=None,
305
- b_left=None, b_right=None, b_period=None,
306
- samples=100, match='domain'):
342
+ def getinterp(
343
+ a,
344
+ b,
345
+ a_left=None,
346
+ a_right=None,
347
+ a_period=None,
348
+ b_left=None,
349
+ b_right=None,
350
+ b_period=None,
351
+ samples=100,
352
+ match="domain",
353
+ ):
307
354
  """
308
355
  Gets the interpolated and domain matched versions of the two curves.
309
356
 
@@ -327,7 +374,7 @@ def getinterp(a, b,
327
374
  :type match: str
328
375
  :returns: curve pair -- the interpolated and domain matched versions of a and b
329
376
  """
330
- if match == 'domain':
377
+ if match == "domain":
331
378
  ux = list(set(a.x).union(set(b.x))) # get union of xvals
332
379
  ux.sort()
333
380
 
@@ -340,7 +387,7 @@ def getinterp(a, b,
340
387
  ib.y = np.interp(ux, b.x, b.y, b_left, b_right, b_period) # interpolate y vals
341
388
 
342
389
  return ia, ib
343
- elif match == 'step':
390
+ elif match == "step":
344
391
  ax, step = np.linspace(min(a.x), max(a.x), num=samples, retstep=True)
345
392
 
346
393
  bxsamples = int((max(b.x) - min(b.x)) / step)
@@ -376,7 +423,7 @@ def interp1d(a, num=100, retstep=False):
376
423
  step: float, optional -- only returned if retstep is True. Size of the spacing between samples
377
424
  """
378
425
  num = int(num)
379
- f = interpolate.interp1d(a.x, a.y, kind='linear', bounds_error=False, fill_value=0)
426
+ f = interpolate.interp1d(a.x, a.y, kind="linear", bounds_error=False, fill_value=0)
380
427
 
381
428
  ia = a.copy()
382
429