Пример #1
0
    def __init__(self, growth_type='orig'):

        Kernel.__init__(self)

        self.L =  0.0
        self.U = 10.0
        self.T = range(5)

        self.name = 'EED'
        self.time_independent = True

        self.survival_params  = [ 1.34, 0.92 ]
        self.growth_params    = [ 0.37, 0.73, 0.127, 0.23 ]
        self.fecundity_params = [ 0.034, 0.038 ]

        if growth_type == 'slow':
            self.growth_params = [ 0.0, 1.01, 0.005, 0.001 ]
            self.name          = 'EEDSlow'

        self.discontinuities  = [ 0.15, 0.25 ]
Пример #2
0
    def __init__(self, **kwargs):

        Kernel.__init__(self)

        self.L =   1.0
        self.U = 150.0
        self.T = range(5)

        self.name = 'Zuidema'
        self.time_dependent = False

        # parashorea chinensis
        self.survival_params = [ 0.98 ]
        self.growth_params   = [ 42.1, 144.0, 2.258, 0.1054 ] # a, b, c, sd
        self.k_st_params     = [ -3.232, 0.146, 0.829 ]       # b, mu, sdl
        self.k_ts_params     = [ 0.118, 1.078, 0.369 ]        # a54, mu, sd

        self.k_ss = asarray([[ 0.700, 0.0,   0.0,   0.0   ],
                                [ 0.101, 0.704, 0.0,   0.0   ],
                                [ 0.0,   0.136, 0.793, 0.0   ],
                                [ 0.0,   0.0,   0.096, 0.819 ]])
Пример #3
0
    def __init__(self):
        
        Kernel.__init__(self)

        self.time_dependent = True

        # read climate data and measurements (cm^2)
        climate      = read_csv('kernels/artr/climate.csv')
        measurements = read_csv('kernels/artr/survivalDataARTR.csv')
        years        = sorted(list(set([ int(x.year) for x in measurements ])))
        fecundity_measurements = read_csv('kernels/artr/fecdat.csv')

        log_areas = {}
        for year in years:
            log_areas[year] = [ float(x.logArea) for x in measurements 
                                                 if int(x.year) == year ]
            
        # set attributes
        self.n0        = log_areas[years[0]]
        self.log_areas = log_areas
        self.years     = years
        self.climate   = climate
        self.fec_meas  = fecundity_measurements

        self.mortality_type = 'noexp'
        self.fecundity_type = 'uniform_exp'

        self._tweak_covariat = None
        self._tweak_factor   = 1.0


        # set parameters
        self.params = {

            'growth': {

                'mean': np.array(
            [ -6.134753578,  0.765515413,  0.006574618,  0.362328659 ]),

                'covariance': np.array(
            [[  2.3003264050, -3.551420e-04, -9.540608e-04, -1.202835e-01 ],
             [ -0.0003551420,  3.699543e-04,  1.274024e-06, -6.374569e-05 ],
             [ -0.0009540608,  1.274024e-06,  3.545569e-06,  3.898729e-05 ],
             [ -0.1202834507, -6.374569e-05,  3.898729e-05,  6.350332e-03 ]])
                },

            'survival': {

                'mean': np.array(
            [ -1.482555395,  0.753372235,  0.003454076, -0.001100492 ]),

                'covariance':
                    np.array(
            [[  1.149244e-01, -1.422819e-02, -4.075111e-04,  5.042504e-05 ],
             [ -1.422819e-02,  1.058307e-02,  5.006554e-05, -3.693585e-05 ],
             [ -4.075111e-04,  5.006554e-05,  1.520893e-06, -1.896803e-07 ],
             [  5.042504e-05, -3.693585e-05, -1.896803e-07,  1.351324e-07 ]])
                },

            'fecundity': {

                'mean': np.array(
            [ 3.16420466, 0.06773083, 0.02146190 ]),

                'covariance': 
                    np.array(
            [[  2.900329e-02,  3.790527e-04,  2.113102e-05 ],
             [  3.790527e-04,  1.101385e-04,  8.486999e-06 ],
             [  2.113102e-05,  8.486999e-06,  1.079253e-05 ]])
                }
            }

        # default parameters
        self.growth_params    = self.params['growth']['mean']
        self.survival_params  = self.params['survival']['mean']
        self.fecundity_params = self.params['fecundity']['mean']