Пример #1
0
    def __init__(self, lai_coef=0.1, s=0.015, omega=0.1, **kwargs):
        """
        Initialize with same arguemnts as superClass 'Simulator'.

        """
        super(S1_simulator, self).__init__(mission="Sentinel-1b", **kwargs)
        # Setup SAR RT spectra list (Sentinel 1)
        self.freq = 5.405
        self.theta = np.deg2rad(37.0)
        self.stype = 'turbid_rayleigh'
        #self.stype='turbid_isotropic'
        self.surf = 'Oh92'
        # self.surf = 'Dubois95'
        self.models = {'surface': self.surf, 'canopy': self.stype}
        self.s = s  # 0.02
        self.lai_coef = lai_coef  # 0.1
        self.eps = 15. - 0.j
        omega = omega  # 0.12  single scattering albedo

        self.SAR_list = [
            sense_mod.SingleScatRT(
                surface=sense_soil.Soil(mv=self.soilm_lst[x],
                                        f=self.freq,
                                        s=s,
                                        clay=0.23,
                                        sand=0.27,
                                        bulk=1.65),
                #surface=sense_soil.Soil(eps=self.eps, f=self.freq, s=self.s),
                canopy=sense_canopy.OneLayer(
                    ke_h=self.lai_coef *
                    self.state_lst[x].lai,  # extinction coefficient
                    ke_v=self.lai_coef * self.state_lst[x].lai,
                    d=self.state_lst[x].can_height,
                    ks_h=omega *
                    (self.lai_coef *
                     self.state_lst[x].lai),  # volume scattering coeff
                    ks_v=omega * (self.lai_coef * self.state_lst[x].lai)),
                models=self.models,
                # theta=np.deg2rad(self.vza_lst[x]),
                theta=self.theta,
                freq=self.freq) for x in xrange(len(self.state_lst))
        ]
        for s in self.SAR_list:
            s.sigma0()
        self.backscatter_keys = ['vv', 'hh', 'hv']
        # Extract total backscatter (and convert to dB) in the three polarisations from SAR list
        self.stot_hv = np.array([
            10 * np.log10(self.SAR_list[s1c].__dict__['stot']['hv'])
            for s1c in xrange(len(self.SAR_list))
        ])
        self.stot_hh = np.array([
            10 * np.log10(self.SAR_list[s1c].__dict__['stot']['hh'])
            for s1c in xrange(len(self.SAR_list))
        ])
        self.stot_vv = np.array([
            10 * np.log10(self.SAR_list[s1c].__dict__['stot']['vv'])
            for s1c in xrange(len(self.SAR_list))
        ])
Пример #2
0
    def __init__(self, lai_coef=0.01, s=0.015, omega=0.1, **kwargs):
        """
        Initialize with same arguemnts as superClass 'Simulator'.

        """
        super(S1_simulator_testbed, self).__init__(mission='S1', **kwargs)
        # Setup SAR RT spectra list (Sentinel 1)
        self.freq = 5.405
        self.theta = np.deg2rad(37.0)
        self.stype = 'turbid_rayleigh'
        # self.stype='turbid_isotropic'
        self.surf = 'Oh92'
        # self.surf = 'Dubois95'
        self.models = {'surface': self.surf, 'canopy': self.stype}
        self.s = s  # 0.02
        self.lai_coef = lai_coef  # 0.1
        ke = 1.
        self.eps = 15. - 0.j
        # canopy = sense_canopy.OneLayer(ke_h=ke, ke_v=ke, d=0.1*self.state_lst[x].can_height, ks_h=omega * ke, ks_v=omega * ke)
        omega = omega  # 0.12

        self.SAR_list = [
            sense_mod.SingleScatRT(
                #surface=sense_soil.Soil(mv=self.state_lst[x].soil_moisture, f=self.freq, s=self.s-0.01*(self.state_lst[x].lai / 4.), clay=0.23, sand=0.27),
                surface=sense_soil.Soil(mv=self.state_lst[x].soil_moisture /
                                        100,
                                        f=self.freq,
                                        s=s,
                                        clay=0.23,
                                        sand=0.27,
                                        bulk=1.65),
                #surface=sense_soil.Soil(eps=self.eps*(1. + 0.01*(self.state_lst[x].soil_moisture/0.45)), f=self.freq, s=self.s-0.01*(self.state_lst[x].lai / 4.)),
                #canopy=sense_canopy.OneLayer(ke_h=1-self.lai_coef*self.state_lst[x].lai,
                #                             ke_v=1-self.lai_coef*self.state_lst[x].lai,
                #                             d=self.state_lst[x].can_height,
                #                             ks_h=omega * (1-self.lai_coef * self.state_lst[x].lai),
                #                             ks_v=omega * (1-self.lai_coef * self.state_lst[x].lai)),
                canopy=sense_canopy.OneLayer(
                    ke_h=self.lai_coef * np.sqrt(
                        self.state_lst[x].lai / self.state_lst[x].can_height),
                    ke_v=self.lai_coef * np.sqrt(
                        self.state_lst[x].lai / self.state_lst[x].can_height),
                    d=self.state_lst[x].can_height,
                    ks_h=omega * (self.lai_coef * np.sqrt(
                        self.state_lst[x].lai / self.state_lst[x].can_height)),
                    ks_v=omega *
                    (self.lai_coef * np.sqrt(self.state_lst[x].lai /
                                             self.state_lst[x].can_height))),
                models=self.models,
                theta=self.theta,
                freq=self.freq) for x in xrange(len(self.state_lst))
        ]

        for s in self.SAR_list:
            s.sigma0()
        self.backscatter_keys = ['vv', 'hh', 'hv']
Пример #3
0
def run_sense(soil_m, lai, can_height, vza, freq=5.405, stype='turbid_rayleigh', surf='Oh92', s=0.015, lai_coef=0.1,
                        omega=0.1):
    """
    Function that runs the SenSE SAR ScattEring model given some inputs
    :param soil_m: soil moisture (m3 m-3)
    :type soil_m: float
    :param lai: leaf area index (m2 m-2)
    :type lai: float
    :param can_height: canopy height (m)
    :type can_height: float
    :param vza: view zenith angle of sensor (degrees)
    :type vza: float
    :param freq: frequency (GHz)
    :type freq: float
    :param stype: canopy scattering model
    :type stype: str
    :param surf: surface scattering model
    :type surf: str
    :param s: surface rms height (m)
    :type s: float
    :param lai_coef: coefficient of lai for which to calculate extinction and volume scattering coefficients
    :type lai_coef: float
    :param omega: coefficient for calculation of volume scattering coefficients
    :type omega: float
    :return: instance of sense SingleScatRT class
    """
    """Function that runs sense model, given surface biogeophysical variables and viewing geometries
    """
    models = {'surface': surf, 'canopy': stype}
    SAR = sense_mod.SingleScatRT(
          surface=sense_soil.Soil(mv=soil_m, f=freq, s=s, clay=0.23, sand=0.27),
          # surface=sense_soil.Soil(eps=self.eps, f=self.freq, s=self.s),
          canopy=sense_canopy.OneLayer(ke_h=lai_coef * lai,  # extinction coefficient
                                       ke_v=lai_coef * lai,
                                       d=can_height,
                                       ks_h=omega * (lai_coef * lai),  # volume scattering coeff
                                       ks_v=omega * (lai_coef * lai)),
          models=models,
          theta=np.deg2rad(vza),
          freq=freq)
    SAR.sigma0()
    return SAR
Пример #4
0
    def __init__(self, **kwargs):
        """
        Initialize with same arguemnts as superClass 'Simulator'.

        """
        super(S1_simulator, self).__init__(**kwargs)
        # Setup SAR RT spectra list (Sentinel 1)
        self.freq = 5.
        self.theta = np.deg2rad(50)
        self.stype = 'turbid_rayleigh'
        # stype='turbid_isotropic'
        self.models = {'surface': 'Oh92', 'canopy': self.stype}
        self.s = 0.02
        d = 0.22
        ke = 1.
        # canopy = sense_canopy.OneLayer(ke_h=ke, ke_v=ke, d=0.1*self.state_lst[x].can_height, ks_h=omega * ke, ks_v=omega * ke)
        omega = 0.12

        self.SAR_list = [
            sense_mod.SingleScatRT(
                surface=sense_soil.Soil(mv=self.state_lst[x].soil_moisture,
                                        f=self.freq,
                                        s=self.s,
                                        clay=0.23,
                                        sand=0.27),
                canopy=sense_canopy.OneLayer(
                    ke_h=0.1 * self.state_lst[x].lai,
                    ke_v=0.1 * self.state_lst[x].lai,
                    d=0.1 * self.state_lst[x].can_height,
                    ks_h=omega * 0.1 * self.state_lst[x].lai,
                    ks_v=omega * 0.1 * self.state_lst[x].lai),
                models=self.models,
                theta=self.theta,
                freq=self.freq) for x in xrange(len(self.state_lst))
        ]
        for s in self.SAR_list:
            s.sigma0()
        self.backscatter_keys = ['vv', 'hh', 'hv']