コード例 #1
0
ファイル: test_pickle.py プロジェクト: sid6155330/holopy
def test_AlphaModelholo_likelihood():
    holo = get_example_data('image0001')
    s = Sphere(
        prior.Gaussian(.5, .1), prior.Gaussian(1.6, .1),
        (prior.Gaussian(5, 1), prior.Gaussian(5, 1), prior.Gaussian(5, 1)))
    model = AlphaModel(s, alpha=prior.Gaussian(.7, .1), noise_sd=.01)
    assert_pickle_roundtrip(model)
コード例 #2
0
ファイル: test_pickle.py プロジェクト: lindensmith/holopy
def test_emcee():
    holo = get_example_data('image0001.yaml')
    s = Sphere(
        prior.Gaussian(.5, .1), prior.Gaussian(1.6, .1),
        (prior.Gaussian(5, 1), prior.Gaussian(5, 1), prior.Gaussian(5, 1)))
    model = AlphaModel(s, Mie, alpha=prior.Gaussian(.7, .1), noise_sd=.01)
    emcee = Emcee(model, holo)
    assert_pickle_roundtrip(emcee)
コード例 #3
0
ファイル: test_pickle.py プロジェクト: sid6155330/holopy
def test_PerfectLensModelholo_likelihood():
    holo = get_example_data('image0001')
    sphere_center = (prior.Gaussian(5, 1), prior.Gaussian(5, 1),
                     prior.Gaussian(5, 1))
    s = Sphere(n=prior.Gaussian(1.6, .1),
               r=prior.Gaussian(.5, .1),
               center=sphere_center)
    model = PerfectLensModel(s, noise_sd=0.01, lens_angle=0.8)
    assert_pickle_roundtrip(model)
コード例 #4
0
ファイル: test_pickle.py プロジェクト: sid6155330/holopy
def test_ExactModelholo_likelihood():
    holo = get_example_data('image0001')
    sphere_center = (prior.Gaussian(5, 1), prior.Gaussian(5, 1),
                     prior.Gaussian(5, 1))
    s = Sphere(n=prior.Gaussian(1.6, .1),
               r=prior.Gaussian(.5, .1),
               center=sphere_center)
    model = ExactModel(s, noise_sd=.01)
    assert_pickle_roundtrip(model)
コード例 #5
0
ファイル: test_pickle.py プロジェクト: lindensmith/holopy
def test_TimeSeriesAlphaModel():
    n = TimeIndependent(prior.Gaussian(5, .5))
    assert_pickle_roundtrip(n)
    st = Sphere(n=n,
                r=TimeIndependent(prior.BoundedGaussian(1.6, .1, 0, np.inf)),
                center=(prior.Gaussian(10, 1), prior.Gaussian(10, 1),
                        prior.BoundedGaussian(1.6, .1, 0, np.inf)))
    assert_pickle_roundtrip(st)
    noise_sd = .1
    mt = TimeSeriesAlphaModel(st,
                              Mie,
                              noise_sd,
                              alpha=prior.Uniform(0, 1),
                              n_frames=2)
    assert_pickle_roundtrip(mt)
コード例 #6
0
ファイル: test_pickle.py プロジェクト: sid6155330/holopy
def test_image():
    holo = get_example_data('image0001')
    assert_pickle_roundtrip(holo)
コード例 #7
0
ファイル: test_pickle.py プロジェクト: barkls/holopy
def test_AlphaModelholo_likelihood():
    holo = get_example_data('image0001')
    s = Sphere(prior.Gaussian(.5, .1), prior.Gaussian(1.6, .1),
               (prior.Gaussian(5, 1), prior.Gaussian(5, 1), prior.Gaussian(5, 1)))
    model = AlphaModel(s, alpha = prior.Gaussian(.7, .1), noise_sd=.01)
    assert_pickle_roundtrip(model)
コード例 #8
0
ファイル: test_pickle.py プロジェクト: barkls/holopy
def test_prior():
    g = prior.Gaussian(1, 1)
    assert_pickle_roundtrip(g)
    assert_pickle_roundtrip(g.lnprob)
コード例 #9
0
ファイル: test_pickle.py プロジェクト: lindensmith/holopy
def test_pickle_mie_object():
    m = Mie()
    assert_pickle_roundtrip(m)
    assert_pickle_roundtrip(m.calc_holo, True)
コード例 #10
0
ファイル: test_pickle.py プロジェクト: lindensmith/holopy
def test_pickle_calc_holo():
    assert_pickle_roundtrip(Mie.calc_holo)
コード例 #11
0
ファイル: test_pickle.py プロジェクト: sid6155330/holopy
def test_prior():
    g = prior.Gaussian(1, 1)
    assert_pickle_roundtrip(g)
    assert_pickle_roundtrip(g.lnprob)
コード例 #12
0
ファイル: test_pickle.py プロジェクト: sid6155330/holopy
def test_pickle_mie_object():
    m = Mie()
    assert_pickle_roundtrip(m)
コード例 #13
0
ファイル: test_pickle.py プロジェクト: tdimiduk/holopy
def test_pickle_calc_holo():
    assert_pickle_roundtrip(Mie.calc_holo)
コード例 #14
0
ファイル: test_pickle.py プロジェクト: tdimiduk/holopy
def test_pickle_mie_object():
    m = Mie()
    assert_pickle_roundtrip(m)
    assert_pickle_roundtrip(m.calc_holo, True)
コード例 #15
0
ファイル: test_pickle.py プロジェクト: barkls/holopy
def test_pickle_mie_object():
    m = Mie()
    assert_pickle_roundtrip(m)
コード例 #16
0
ファイル: test_pickle.py プロジェクト: tdimiduk/holopy
def test_image():
    holo = get_example_data('image0001.yaml')
    assert_pickle_roundtrip(holo)