Пример #1
0
def test_dhd_sensibility_is_affected_by_leaf_temperature_only_within_restricted_bounds():
    low_temperature_bound = 35
    high_temperature_bound = 40
    value_at_lowest_bound = exchange.dHd_sensibility(psi=-2.0,
                                                     temp=low_temperature_bound, dhd_max=200.,
                                                     dhd_inhib_beg=195., dHd_inhib_max=190.,
                                                     psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                                     temp_inhib_beg=35, temp_inhib_max=40)
    value_at_highest_bound = exchange.dHd_sensibility(psi=-2.0,
                                                      temp=high_temperature_bound, dhd_max=200.,
                                                      dhd_inhib_beg=195., dHd_inhib_max=190.,
                                                      psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                                      temp_inhib_beg=35, temp_inhib_max=40)
    for temperature in range(0, 50):
        if temperature < low_temperature_bound:
            assert value_at_lowest_bound == exchange.dHd_sensibility(psi=-2.0,
                                                                     temp=temperature, dhd_max=200.,
                                                                     dhd_inhib_beg=195., dHd_inhib_max=190.,
                                                                     psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                                                     temp_inhib_beg=35, temp_inhib_max=40)
        elif temperature < high_temperature_bound:
            assert value_at_lowest_bound >= exchange.dHd_sensibility(psi=-2.0,
                                                                     temp=temperature, dhd_max=200.,
                                                                     dhd_inhib_beg=195., dHd_inhib_max=190.,
                                                                     psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                                                     temp_inhib_beg=35, temp_inhib_max=40)
        else:
            assert value_at_highest_bound == exchange.dHd_sensibility(psi=-2.0,
                                                                      temp=temperature, dhd_max=200.,
                                                                      dhd_inhib_beg=195., dHd_inhib_max=190.,
                                                                      psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                                                      temp_inhib_beg=35, temp_inhib_max=40)
Пример #2
0
def test_dhd_sensibility_is_not_affected_by_leaf_temperature_increases_when_leaf_water_potential_is_optimal():
    value_at_optimal_psi = exchange.dHd_sensibility(psi=0.0,
                                                    temp=25, dhd_max=200.,
                                                    dhd_inhib_beg=195., dHd_inhib_max=190.,
                                                    psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                                    temp_inhib_beg=35, temp_inhib_max=40)
    for temperature in range(0, 50):
        assert value_at_optimal_psi == exchange.dHd_sensibility(psi=0.0,
                                                                temp=temperature, dhd_max=200.,
                                                                dhd_inhib_beg=195., dHd_inhib_max=190.,
                                                                psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                                                temp_inhib_beg=35, temp_inhib_max=40)
Пример #3
0
def test_dhd_sensibility_is_affected_by_leaf_temperature_when_leaf_water_potential_is_below_its_minimum_threshold():
    value_at_optimal_psi = exchange.dHd_sensibility(psi=0.0,
                                                    temp=25, dhd_max=200.,
                                                    dhd_inhib_beg=195., dHd_inhib_max=190.,
                                                    psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                                    temp_inhib_beg=35, temp_inhib_max=40)
    for temperature in range(0, 50):
        assert value_at_optimal_psi > exchange.dHd_sensibility(psi=-2.0,
                                                               temp=temperature, dhd_max=200.,
                                                               dhd_inhib_beg=195., dHd_inhib_max=190.,
                                                               psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                                               temp_inhib_beg=35, temp_inhib_max=40)
Пример #4
0
def test_dhd_sensibility_decreases_as_leaf_water_potential_decreases():
    prev_value = exchange.dHd_sensibility(psi=0.0,
                                          temp=25, dhd_max=200.,
                                          dhd_inhib_beg=195., dHd_inhib_max=190.,
                                          psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                          temp_inhib_beg=35, temp_inhib_max=40)
    for psi in arange(0, -3, -0.1):
        act_value = exchange.dHd_sensibility(psi,
                                             temp=25, dhd_max=200.,
                                             dhd_inhib_beg=195., dHd_inhib_max=190.,
                                             psi_inhib_beg=-.75, psi_inhib_max=-2.,
                                             temp_inhib_beg=35, temp_inhib_max=40)
        assert act_value <= prev_value
        prev_value = act_value