How to use the pyorbital.geoloc.ScanGeometry function in pyorbital

To help you get started, we’ve selected a few pyorbital examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pytroll / satpy / satpy / satin / hrpt_hmf.py View on Github external
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