Skip to content

Commit

Permalink
Pydv 260 unset variable bug (#261)
Browse files Browse the repository at this point in the history
* Cleaned up get sub range

* low and high are always provided in get sub range, so making them args instead of kwargs

* Sometimes the low and high can be passed to get sub range but they are None

* Updated release notes

* Updated version number and author info
  • Loading branch information
rusu24edward authored Apr 19, 2022
1 parent f6c3159 commit 6dcbe32
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: pydv-3.0.6
release_name: PyDV 3.0.6
tag_name: pydv-3.0.7
release_name: PyDV 3.0.7
draft: false
prerelease: false
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Copyright (c) 2011-2020, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin
e-mail: griffin28@llnl.gov
Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin, Edward Rusu
e-mail: rusu1@llnl.gov
LLNL-CODE-507071
All rights reserved.

Expand Down
4 changes: 2 additions & 2 deletions pydv/curve.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2011-2020, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin
# e-mail: griffin28@llnl.gov
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin, Edward Rusu
# e-mail: rusu1@llnl.gov
# LLNL-CODE-507071
# All rights reserved.

Expand Down
9 changes: 4 additions & 5 deletions pydv/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
#sys.path.insert(1, '/Users/griffin28/Documents/WCI/ASQ/PDV/pydv3')

# -- General configuration ------------------------------------------------

Expand Down Expand Up @@ -51,8 +50,8 @@

# General information about the project.
project = u'PyDV'
copyright = u'2015-2020, Kevin Griffin, Mason Kwiat, Douglas Miller, Rachael Brooks'
author = u'Kevin Griffin, Mason Kwiat, Douglas Miller, Rachael Brooks'
copyright = u'2015-2020, Edward Rusu, Kevin Griffin, Mason Kwiat, Douglas Miller, Rachael Brooks'
author = u'Edward Rusu, Kevin Griffin, Mason Kwiat, Douglas Miller, Rachael Brooks'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -61,7 +60,7 @@
# The short X.Y version.
version = u'3.0'
# The full version, including alpha/beta/rc tags.
release = u'3.0.6'
release = u'3.0.7'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -229,7 +228,7 @@
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'PyDV.tex', u'PyDV Documentation',
u'Kevin Griffin, Mason Kwiat, Douglas Miller, Rachael Brooks', 'manual'),
u'Edward Rusu, Kevin Griffin, Mason Kwiat, Douglas Miller, Rachael Brooks', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down
6 changes: 6 additions & 0 deletions pydv/docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
Release Notes
=============

3.0.7
-----
* Fixed a bug in PyDV internal when using min and max over a range.



3.0.6
-----
* Fixed functions that did not work with curve lists, which were: dupx, del,
Expand Down
6 changes: 3 additions & 3 deletions pydv/pdv.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2011-2020, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin
# e-mail: griffin28@llnl.gov
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin, Edward Rusu
# e-mail: rusu1@llnl.gov
# LLNL-CODE-507071
# All rights reserved.

Expand Down Expand Up @@ -6678,7 +6678,7 @@ def tickFormat(self, axis, logscale, ticks, tickformat):

def console_run(self):
while True:
self.cmdloop('\n\tPython Data Visualizer 3.0.6 - 12.01.2021\n\tType "help" for more information.\n\n')
self.cmdloop('\n\tPython Data Visualizer 3.0.7 - 04.19.2022\n\tType "help" for more information.\n\n')
print('\n Starting Python Console...\n Ctrl-D to return to PyDV\n')
console = code.InteractiveConsole(locals())
console.interact()
Expand Down
4 changes: 2 additions & 2 deletions pydv/pdvnavbar.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2011-2020, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin
# e-mail: griffin28@llnl.gov
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin, Edward Rusu
# e-mail: rusu1@llnl.gov
# LLNL-CODE-507071
# All rights reserved.

Expand Down
16 changes: 8 additions & 8 deletions pydv/pdvplot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2011-2020, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin
# e-mail: griffin28@llnl.gov
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin, Edward Rusu
# e-mail: rusu1@llnl.gov
# LLNL-CODE-507071
# All rights reserved.

Expand Down Expand Up @@ -114,7 +114,7 @@ def __init__(self, pydvcmd):
here = path.abspath(path.dirname(__file__))

# Setup Application
self.setWindowTitle('Python Data Visualizer 3.0.6')
self.setWindowTitle('Python Data Visualizer 3.0.7')
self.setWindowIcon(QIcon(path.join(here, 'img/app_icon3.png')))
self._pydvcmd = pydvcmd

Expand Down Expand Up @@ -431,8 +431,8 @@ def showMenuDialog(self):
def __viewCopyright(self):
msg = self.tr('<b><p style="font-family:verdana;">Copyright &copy; 2011-2020, Lawrence Livermore National Security, LLC. \
Produced at the Lawrence Livermore National Laboratory</p> \
<p style="font-family:verdana;">Written by Kevin Griffin, Mason Kwiat, and Douglas S. Miller</p> \
<p style="font-family:verdana;">e-mail: [email protected] or dougmiller@llnl.gov</p> \
<p style="font-family:verdana;">Written by Edward Rusu, Kevin Griffin, Mason Kwiat, and Douglas S. Miller</p> \
<p style="font-family:verdana;">e-mail: rusu1@llnl.gov</p> \
<p style="font-family:verdana;">LLNL-CODE-507071</p> \
<p style="font-family:verdana;">All rights reserved.</p></b> \
<p style="font-family:courier; font-size:80%;">This file is part of PyDV. For details, see <URL describing code and \
Expand Down Expand Up @@ -519,11 +519,11 @@ def __aboutQt(self):

def __aboutPyDV(self):
QMessageBox.about(self, self.tr('About PyDV'), self.tr('<h2>About PyDV</h2>'
'<p style="font-family:courier; font-size:40%;">version 3.0.6</p>'
'<p style="font-family:courier; font-size:40%;">version 3.0.7</p>'
'<p style="font-family:verdana;"><a href="https://pydv.readthedocs.io/en/latest/">PyDV</a> is a 1D graphics tool, heavily based on the ULTRA plotting tool.</p>'
'<p style="font-family:courier; font-size:-1;">Copyright &copy; 2011-2020, Lawrence Livermore National Security, LLC.</p>'
'<p style="font-family:veranda; font-size:80%;">Written by: Kevin Griffi, Mason Kwiat, and Douglas S. Miller</p>'
'<p style="font-family:veranda; font-size:80%;">email: griffin28@llnl.gov</p>'
'<p style="font-family:veranda; font-size:80%;">Written by: Edward Rusu, Kevin Griffin, Mason Kwiat, and Douglas S. Miller</p>'
'<p style="font-family:veranda; font-size:80%;">email: rusu1@llnl.gov</p>'
'<p style="font-family:veranda; font-size:60%;"><i>LLNL-CODE-507071, All rights reserved.</i></p>'))


Expand Down
4 changes: 2 additions & 2 deletions pydv/pdvutil.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2011-2020, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin
# e-mail: griffin28@llnl.gov
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin, Edward Rusu
# e-mail: rusu1@llnl.gov
# LLNL-CODE-507071
# All rights reserved.

Expand Down
41 changes: 12 additions & 29 deletions pydv/pydvpy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2011-2020, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin
# e-mail: griffin28@llnl.gov
# Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin, Edward Rusu
# e-mail: rusu1@llnl.gov
# LLNL-CODE-507071
# All rights reserved.

Expand Down Expand Up @@ -64,7 +64,7 @@
A python interface for PyDV functionality.
.. module: pydvpy
.. moduleauthor:: Kevin Griffin <griffin28@llnl.gov>
.. moduleauthor:: Edward Rusu <rusu1@llnl.gov>
>>> import pydvpy as pydvif
"""
Expand Down Expand Up @@ -3923,42 +3923,25 @@ def __complex_times(ra, ia, rb, ib):
return sa, sb


def __get_sub_range(x, low=None, high=None):
def __get_sub_range(x, low, high):
"""
Returns a tuple with the index of the first x value greater than low and the index of
the first x value less than high.
Returns a tuple with the index of the first value in x greater than low and
the index of the first value in x less than high.
:param x: The array of x-values
:type x: array
:param low: The lower definite integral interval value
:type low: float
:param high: The upper definite integral interval value
:type high: float
:return: tuple -- a tuple with the indices of the first value in x that is greater than low and the first value in
x less than high
:return: tuple -- a tuple with the indices of the first value in x that is
greater than low and the first value in x less than high.
If low or high is not specified, the corresponding return
will be None.
"""
if low is not None:
min_idx = np.where(x >= low)[0][0]

if high is not None:
max_idx = np.where(x <= high)[0][-1]

min_idx = np.where(x >= low)[0][0] if low is not None else None
max_idx = np.where(x <= high)[0][-1] if high is not None else None
return min_idx, max_idx
# min_idx = len(x) - 1
# min = x[-1]
# max_idx = 0
# max = x[0]
#
# for i in range(0, len(x)):
# if min > x[i] >= low:
# min = x[i]
# min_idx = i
#
# if high >= x[i] > max:
# max = x[i]
# max_idx = i
#
# return min_idx, max_idx


def __toCurveString(c):
Expand Down
2 changes: 1 addition & 1 deletion pydv/scripts/date.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.01.2021
04.19.2022
2 changes: 1 addition & 1 deletion pydv/scripts/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.6
3.0.7
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

setup(
name='PyDV',
version='3.0.6',
version='3.0.7',
description='PyDV: Python Data Visualizer',
long_description=long_description,
author='Kevin Griffin',
author_email='griffin28@llnl.gov',
author='Edward Rusu',
author_email='rusu1@llnl.gov',
license='BSD',
url='https://github.com/LLNL/PyDV',
packages=find_packages(),
Expand Down

0 comments on commit 6dcbe32

Please sign in to comment.