Skip to content

Commit

Permalink
set elevation less than 0 degree to -180 -> 180
Browse files Browse the repository at this point in the history
  • Loading branch information
YvZheng committed Sep 8, 2020
1 parent e4daf47 commit 70df3be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pycwr/io/WSR98DFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ def get_elevation(self):
获取每根径向的仰角
:return: (nRays)
"""
return np.array([self.radial[iray]['Elevation'] for iray in range(self.nrays)])
elevation = np.array([self.radial[iray]['Elevation'] for iray in range(self.nrays)])
return np.where(elevation>180, elevation-360, elevation)

def get_rays_per_sweep(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion pycwr/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from . import SCFile, WSR98DFile, SABFile, CCFile
from .auto_io import *
from .auto_io import read_auto

__all__ = ["read_auto", "CCFile", "SCFile", "WSR98DFile", "SABFile"]

0 comments on commit 70df3be

Please sign in to comment.