OceanColor.inrange.InRange¶
- class OceanColor.inrange.InRange(username, password, path='./', npes=None)[source]¶
Search and fetch Ocean Color pixels within range of given waypoints
The satellite files are scanned in parallel in the background and checked against the given waypoints, so that it searches for the next matchup in advance before it is actually requested.
Examples
>>> track = DataFrame([ {"time": datetime64("2016-09-01 10:00:00"), "lat": 35.6, "lon": -126.81}, {"time": datetime64("2016-09-01 22:00:00"), "lat": 34, "lon": -126} ])
>>> engine = InRange(os.getenv("NASA_USERNAME"), os.getenv("NASA_PASSWORD"), './', npes=3)
>>> engine.search(track, sensor="aqua", dtype="L3m", dt_tol=timedelta64(12, 'h'), dL_tol=12e3) >>> for m in engine: >>> print(m)
- __init__(username, password, path='./', npes=None)[source]¶
- Parameters
username (str) – NASA’s EarthData username
password (str) – NASA’s EarthData password
path (str, optional) – Path to save locally NASA’s data files
npes (int, optional) – Number of maximum parallel jobs
Methods
__init__(username, password[, path, npes])- param username
NASA's EarthData username
next()scanner(queue, parent, npes, track, sensor, ...)scanner_threading(queue, parent, npes, ...)search(track, sensor, dtype, dt_tol, dL_tol)Initiate a new search in the background