Unexpected Nans in get_observer_look_no_tle
ninahakansson opened this issue · comments
Code Sample, a minimal, complete, and verifiable piece of code
import numpy as np
from pyorbital.orbital import get_observer_look as get_observer_look_no_tle
sat_alt = 850.0 # km TIROS-N OSCAR
lons = np.linspace(-180, 180, num=1000)
lats = np.linspace(-90, 90, num=1000)
times = np.datetime64('2015-02-25T04:30')
sat_azi, sat_elev = get_observer_look_no_tle(
lons,
lats,
sat_alt, # approximate satellite altitude
times[np.newaxis],
lons, lats, 0)
if np.isnan(sat_elev).any():
raise ValueError
Problem description
The angle of sat_elev is sometimes calculated as NaNs instead of being ~90.
Expected Output
No error.
Actual Result, Traceback if applicable
ValueError
Versions of Python, package at hand and relevant dependencies
Thank you for reporting an issue !
This may be a duplicate of #68