Skip to content

Commit

Permalink
πŸ› Fix equator point selection in orbit.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fbriol committed Jan 24, 2024
1 parent 6c4933d commit 2cef7bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyinterp/orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,9 @@ def _equator_properties(lon_nadir: NDArray, lat_nadir: NDArray,

# Search the nearest point to the equator
i1 = (numpy.abs(lat_nadir)).argmin()
i0 = i1 - 1
i0 = i1 - 1 if i1 > 0 else 1
if lat_nadir[i0] * lat_nadir[i1] > 0:
i0, i1 = i1, i1 + 1
i0, i1 = (i1, i1 + 1) if i1 < lat_nadir.size - 1 else (i1 - 1, i1)
lon1 = lon_nadir[i0:i1 + 1]
lat1 = lat_nadir[i0:i1 + 1]

Expand Down

0 comments on commit 2cef7bf

Please sign in to comment.