def test_plot_convolution(self):

        convol1 = Convolution("data/convolution1.conv")
        if DISABLE_PLOT == False:
            Plot(convol1.extract_elementary(1), convol1.extract_elementary(2))

        histo_b2 = Histogram("data/nothofagus_antarctica_bud_2.his")
        histo_s2 = Histogram("data/nothofagus_antarctica_shoot_2.his")

        convol31 = Estimate(Shift(histo_s2, 1), "CONVOLUTION",
                            Estimate(histo_b2, "NP"),
                            NbIteration=100,
                            Estimator="PenalizedLikelihood",
                            Weight=0.5)
        if DISABLE_PLOT == False:
            Plot(convol31.extract_elementary(1))
    def test_plot_convolution(self):

        convol1 = Convolution("data/convolution1.conv")
        if DISABLE_PLOT == False:
            Plot(convol1.extract_elementary(1), convol1.extract_elementary(2))

        histo_b2 = Histogram("data/nothofagus_antarctica_bud_2.his")
        histo_s2 = Histogram("data/nothofagus_antarctica_shoot_2.his")

        convol31 = Estimate(Shift(histo_s2, 1),
                            "CONVOLUTION",
                            Estimate(histo_b2, "NP"),
                            NbIteration=100,
                            Estimator="PenalizedLikelihood",
                            Weight=0.5)
        if DISABLE_PLOT == False:
            Plot(convol31.extract_elementary(1))
def test_simulate_convolution():
    c = Convolution("data/convolution1.conv")
    s1 = Simulate(c, 1000)
    assert s1
 def create_data(self):
     conv = Convolution(str(get_shared_data('test_convolution1.conv')))
     return conv.simulate(1000)
 def create_data(self):
     conv = Convolution(str(get_shared_data('test_convolution1.conv')))
     return conv.simulate(1000)
 def conv(self):
     d1 = Binomial(0, 10, 0.5)
     d2 = NegativeBinomial(0, 1, 0.1)
     m = Convolution(d1, d2)
     return m
 def conv_data(self):
     d1 = Binomial(0, 10, 0.5)
     d2 = NegativeBinomial(0, 1, 0.1)
     conv = Convolution(d1, d2)
     conv_data = conv.simulate(self.N)
     return conv_data
 def test_convolution(self):
     convol = Convolution("data/convolution1.conv")
     convol_histo = Simulate(convol, 200)
     _histo = ExtractHistogram(convol_histo, "Elementary", 1)
     _histo = ExtractHistogram(convol_histo, "Convolution")
    def test_plot_convolution_data(self):

        convol1 = Convolution("data/convolution1.conv")
        convol_histo1 = Simulate(convol1, 200)
        if DISABLE_PLOT == False:
            convol_histo1.plot()
Example #10
0
def test_output_display_viewpoint_survival():
    d1 = Distribution("B", 2, 19, 0.5)
    print Display(d1, ViewPoint="Survival")
    convol1 = Convolution("data/convolution1.conv")
    print Display(convol1, ViewPoint="Survival")