Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Nans in get_observer_look_no_tle #72

Closed
ninahakansson opened this issue Jan 26, 2021 · 1 comment · Fixed by #77
Closed

Unexpected Nans in get_observer_look_no_tle #72

ninahakansson opened this issue Jan 26, 2021 · 1 comment · Fixed by #77

Comments

@ninahakansson
Copy link

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 !

@djhoese
Copy link
Member

djhoese commented Jan 26, 2021

This may be a duplicate of #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants