Beispiel #1
0
    def radianceFromTOA():
        """
    calculate at-sensor radiance from top-of-atmosphere (TOA) reflectance
    """

        # top of atmosphere reflectance
        toa = mission_specifics.TOA(TimeSeries.image, TimeSeries.mission)

        # solar irradiances
        ESUNs = mission_specifics.ESUNs(TimeSeries.image, TimeSeries.mission)

        # wavebands
        bands = mission_specifics.ee_bandnames(TimeSeries.mission)

        # solar zenith (radians)
        theta = mission_specifics.solar_z(
            TimeSeries.image, TimeSeries.mission).multiply(0.017453293)

        # circular math
        pi = ee.Number(3.14159265359)

        # Earth-Sun distance squared (AU)
        d = ee.Number(TimeSeries.day_of_year).subtract(4).multiply(
            0.017202).cos().multiply(-0.01672).add(1)
        d_squared = d.multiply(d)

        # radiace at-sensor
        rad = toa.select(ee.List(bands)).multiply(ESUNs).multiply(
            theta.cos()).divide(pi).divide(d_squared)

        return rad
Beispiel #2
0
    def get():

        altitude = AtmcorrInput.elevation.reduceRegion(\
            reducer = ee.Reducer.mean(),\
            geometry = TimeSeries.geom.centroid()\
            )

        return ee.Dictionary({
            'solar_z':
            mission_specifics.solar_z(TimeSeries.image, TimeSeries.mission),
            'h2o':
            Atmospheric.water(TimeSeries.geom, TimeSeries.date),
            'o3':
            Atmospheric.ozone(TimeSeries.geom, TimeSeries.date),
            'aot':
            Atmospheric.aerosol(TimeSeries.geom, TimeSeries.date),
            'alt':
            altitude.get('be75'),
            'doy':
            TimeSeries.day_of_year
        })