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)
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)
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)
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)
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)
def test_image(): holo = get_example_data('image0001') assert_pickle_roundtrip(holo)
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)
def test_prior(): g = prior.Gaussian(1, 1) assert_pickle_roundtrip(g) assert_pickle_roundtrip(g.lnprob)
def test_pickle_mie_object(): m = Mie() assert_pickle_roundtrip(m) assert_pickle_roundtrip(m.calc_holo, True)
def test_pickle_calc_holo(): assert_pickle_roundtrip(Mie.calc_holo)
def test_pickle_mie_object(): m = Mie() assert_pickle_roundtrip(m)
def test_image(): holo = get_example_data('image0001.yaml') assert_pickle_roundtrip(holo)