Skip to content

Commit 3b91b1e

Browse files
authored
Fix bug to consider scan angles greater than 90 deg (RDX)
1 parent c9337b5 commit 3b91b1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mwr_raw2l1/measurement/scan_transform.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ def scanflag_from_ele(ele, use_ele_diff=False):
229229
230230
Args:
231231
ele: elevation vector as :class:`numpy.ndarray`
232-
use_ele_diff: if True infer scanflag from differences in ele, if False ele>89 are assumed starring, all others
232+
use_ele_diff: if True infer scanflag from differences in ele, if False abs(ele-90)<1 are assumed starring, all others
233233
as scanning. Defaults to False.
234234
Returns:
235235
scanflags as :class:`numpy.ndarray` of same shape as ele
236236
"""
237237

238238
if use_ele_diff:
239-
err_msg = 'currently scanflags can only be inferred from assuming ele>89 as starring and all others as scanning'
239+
err_msg = 'currently scanflags can only be inferred from assuming abs(ele-90)<1 as starring and all others as scanning'
240240
raise NotImplementedError(err_msg)
241241
else:
242-
return np.where(ele > 89, 0, 1)
242+
return np.where(np.abs(ele-90) < 1, 0, 1)

0 commit comments

Comments
 (0)