def test_mcmc(): x0 = generic_params bounds = generic_bounds f = np.linspace(0, 288, 100) model = asy_peakbag.asymp_spec_model(f, 2) snr = np.ones(len(f)) prior = asy_peakbag.Prior(generic_bounds, generic_gaussian) mcmc = asy_peakbag.mcmc(f, snr, model, x0, prior)
def test_mcmc_call(): x0 = generic_params bounds = generic_bounds f = np.linspace(0, 288, 100) model = asy_peakbag.asymp_spec_model(f, 2) snr = model(x0) prior = asy_peakbag.Prior(generic_bounds, generic_gaussian) mcmc = asy_peakbag.mcmc(f, snr, model, x0, prior) samples = mcmc(10, 20)
def test_model_call(): model = asy_peakbag.asymp_spec_model(np.linspace(1, 10, 10), 2) asy = model(generic_params)
def test_model_asy(): """Can I generate a complete model realization""" model = asy_peakbag.asymp_spec_model(np.linspace(1, 10, 10), 2) asy = model.model(*generic_params)
def test_model_pair(): """Can I define a pair of modes in a model instance""" model = asy_peakbag.asymp_spec_model(np.linspace(1, 10, 10), 2) pair = model.pair(6, 10, 0.1, 2.0) assert_almost_equal(pair[5], 10.0, 0.1)
def test_model_lorentzian(): ''' Very simple lorentzian test ''' model = asy_peakbag.asymp_spec_model(np.linspace(1, 200, 3), 2) lor = model.lor(1, 10.0, np.log10(1.0)) assert_almost_equal(lor[0], 10.0, 0.1) assert_almost_equal(lor[1], 0.0, 0.1)
def test_model(): """Can I initialize a model instance""" model = asy_peakbag.asymp_spec_model(np.linspace(1, 2, 3), 2)