Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Prodanovic committed Apr 20, 2018
1 parent 2fa9c44 commit 9c89cb8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion computeQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Purpose: Script takes in a *.slf file (2d for now), and computes the
# discharge through sections (which have to be re-sampled and be
# provided in PPUTILS line format). The cross sections have to be
# defined such that they are parallel to the flow. If the sections
# defined such that they are perpedicular to the flow. If the sections
# are not perpedicular to the flow, garbage results may be reported.
#
# Uses: Python 2 or 3, Numpy
Expand Down
12 changes: 8 additions & 4 deletions sel2png.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
# Revised: Apr 4, 2018
# Fixed the erroneous input argument that caused output filenames to be wonky.
#
# Revised: Apr 20, 2018
# Fixed a bug that plotted white when field values were outside specified
# limits.
#
#
# Using: Python 2 or 3, Matplotlib, Numpy
#
Expand Down Expand Up @@ -261,14 +265,14 @@
cbar_min = cbar_min_global
cbar_max = cbar_max_global

'''

# adjust the plot_array for limits of levels (before plotting)
# added on 2018.04.20
for i in range(len(plot_array)):
if (plot_array[i] < cbar_min):
plot_array[i] = cbar_min
plot_array[i] = cbar_min + cbar_min*0.01
if (plot_array[i] > cbar_max):
plot_array[i] = cbar_max
'''
plot_array[i] = cbar_max - cbar_max*0.01

# adjust the levels
levels = np.linspace(cbar_min, cbar_max, 16)
Expand Down

0 comments on commit 9c89cb8

Please sign in to comment.