Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if satellite == "noaa 16":
scan_angle = 55.25
else:
scan_angle = 55.37
scans_nb = len(hrpttimes)
avhrr_inst = np.vstack(((scan_points / 1023.5 - 1)
* np.deg2rad(-scan_angle),
np.zeros((len(scan_points),)))).T
avhrr_inst = np.tile(avhrr_inst, [scans_nb, 1])
offset = hrpttimes
times = (np.tile(scan_points * 0.000025, [scans_nb, 1])
+ np.expand_dims(offset, 1))
sgeom = ScanGeometry(avhrr_inst, times.ravel())
s_times = sgeom.times(first_time)
rpy = (0, 0, 0)
pixels_pos = compute_pixels((orb.tle._line1, orb.tle._line2), sgeom, s_times, rpy)
pos_time = get_lonlatalt(pixels_pos, s_times)
return pos_time