Skip to content

Commit

Permalink
update plot ppi min_max
Browse files Browse the repository at this point in the history
  • Loading branch information
YvZheng committed Oct 31, 2021
1 parent 5602741 commit 8013dd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pycwr/draw/RadarPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ def plot_ppi(self, ax, sweep_num, field_name, cmap=None, min_max=None, cmap_bins
:return:
"""
assert isinstance(ax, matplotlib.axes._axes.Axes), "axes should be matplotlib axes not cartopy axes!"
if field_name == "V":
if min_max is not None:
vmin, vmax = min_max
elif field_name == "V":
vmax = self.Radar.scan_info.nyquist_velocity[sweep_num].values
vmin = -1 * vmax
elif min_max is not None:
vmin, vmax = min_max
elif CINRAD_field_normvar[CINRAD_field_mapping[field_name]] == -1:
vmax = np.nanmax(self.Radar.fields[sweep_num][field_name])
vmin = np.nanmin(self.Radar.fields[sweep_num][field_name])
Expand Down
4 changes: 2 additions & 2 deletions pycwr/io/PAFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def __init__(self, WSR98D):
self.WSR98D = WSR98D
self.nrays = len(self.WSR98D.radial)
self.nsweeps = self.WSR98D.header['TaskConfig']['CutNumber']
print(self.nsweeps, self.nrays)
# print(self.nsweeps, self.nrays)
self.rays_per_sweep = self.nrays // self.nsweeps
self.radial = []
if self.WSR98D.get_azimuth()[0] == self.WSR98D.get_azimuth()[1]:
Expand All @@ -206,7 +206,7 @@ def __init__(self, WSR98D):
self.WSR98D.get_latitude_longitude_altitude_frequency()
self.header = self.WSR98D.header
self.bins_per_sweep = self.get_nbins_per_sweep()
#print(self.bins_per_sweep)
# print(self.bins_per_sweep)
self.range = self.get_range_per_radial(self.bins_per_sweep.max())
self.azimuth = self.get_azimuth()
self.elevation = self.get_elevation()
Expand Down

0 comments on commit 8013dd6

Please sign in to comment.