Skip to content
Snippets Groups Projects
Commit a6a7e097 authored by tomrink's avatar tomrink
Browse files

Fix hanlding of out-of-domain earth loc in earth_to_lc_s

parent ea4190e8
No related branches found
No related tags found
No related merge requests found
......@@ -162,8 +162,18 @@ class GEOSNavigation:
def earth_to_lc_s(self, lons, lats):
lamda, theta = self.earth_to_sat_s(lons, lats)
cc, ll = self.sat_to_lc(lamda, theta)
cc = np.where(np.isnan(lamda), -1, cc)
cc = np.where(cc < 0, -1, cc)
cc = np.where(cc >= self.num_elems, -1, cc)
ll = np.where(np.isnan(theta), -1, ll)
ll = np.where(ll < 0, -1, ll)
ll = np.where(ll >= self.num_lines, -1, ll)
cc[ll == -1] = -1
ll[cc == -1] = -1
return cc, ll
def lc_to_earth(self, cc, ll):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment