pymgp.tleorb.tlefind#
- pymgp.tleorb.tlefind(tle, satid, verbose=1)[source]#
Find named satellites in the NORAD Two Line Elements.
Search for named satellites in the list of TLE’s and return an index array and list of names for the found satellites.
- Parameters:
- tlelist of named tuples
List of named tuples with two-line elements.
- satidstr, int, array_like of int or str
String or array with the satellite names to look for, an index, or index array. For strings, the functions looks for satellites that start with satid.
- verboseint, optional
Verbosity level. If ‘verbose=1’ (default) print a message for the found TLE(s), if ‘verbose=0’ the function is quiet.
- Returns:
- isatndarray, int64
Array with element numbers in the list of named tuples tle
- satidsndarray, str
Array with satellite names that have been found
See also
Notes
The input parameter satid accepts the returns isat and satids of a previous function call and should return the same result (on the same set of TLE)
Examples
>>> tleERS=tleread('resource-20240802.tle', verbose=0) # read two-line elements >>> isat, *_ = tlefind(tleERS, 'COSMO-SKYMED 1') Found 1 satellites: COSMO-SKYMED 1 (18)
>>> tlefind(tleERS, 'COSMO', verbose=0) (array([18, 22, 29, 42], dtype=int64), array(['COSMO-SKYMED 1', 'COSMO-SKYMED 2', 'COSMO-SKYMED 3', 'COSMO-SKYMED 4'], dtype='<U23'))
>>> isat, satids = tlefind(tleERS, [ 'RADARSAT-2', 'SENTINEL-1', 'TERRASAR' ]) Found 3 satellites: TERRASAR-X (19) RADARSAT-2 (23) SENTINEL-1A (65) >>> tlefind(tleERS, isat, verbose=0) (array([19, 23, 65], dtype=int64), array(['TERRASAR-X', 'RADARSAT-2', 'SENTINEL-1A'], dtype='<U23')) >>> tlefind(tleERS, isatids, verbose=0) (array([19, 23, 65], dtype=int64), array(['TERRASAR-X', 'RADARSAT-2', 'SENTINEL-1A'], dtype='<U23'))