Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* 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
scanline_nb = len(self.times)
scan_points = np.arange(0, 2048, 32)
# scan_points = np.arange(2048)
sgeom = avhrr(scanline_nb, scan_points, apply_offset=False)
# no attitude error
rpy = [0, 0, 0]
s_times = sgeom.times(
self.times[:, np.newaxis]).ravel()
# s_times = (np.tile(sgeom._times[0, :], (scanline_nb, 1)).astype(
# 'timedelta64[s]') + self.times[:, np.newaxis]).ravel()
orb = Orbital(self.platform_name)
pixels_pos = compute_pixels(orb, sgeom, s_times, rpy)
lons, lats, alts = get_lonlatalt(pixels_pos, s_times)
self.lons, self.lats = geo_interpolate(
lons.reshape((scanline_nb, -1)), lats.reshape((scanline_nb, -1)))
return self.lons, self.lats