示例#1
0
    def test_extract_data(self):
        """todo : check if this test makes sense"""
        h = Histogram(str(get_shared_data("meri1.his")))

        e = h.estimate_nonparametric()

        assert e
示例#2
0
    def test_convolution(self):

        elementary = Histogram("data/nothofagus_antarctica_bud_2.his")
        total = Histogram("data/nothofagus_antarctica_shoot_2.his")

        convol1 = Estimate(Shift(total, 1), "CONVOLUTION",
                           Estimate(elementary, "NP"),
                           NbIteration=100,
                           Estimator="PenalizedLikelihood",
                           Weight=0.5)

        convol2 = total.shift(1).estimate_convolution(
                                    elementary.estimate_nonparametric(),
                                    NbIteration=100,
                                    Estimator="PenalizedLikelihood",
                                    Weight=0.5)

        assert convol1 and convol2
        assert convol1 == convol2
示例#3
0
 def test_nonparametric(self):
     h = Histogram(get_shared_data("meri1.his"))
     e =  h.estimate_nonparametric()
     assert e