Example #1
0
def test_pymask_grid(example_oifits):
    pa_prior = [30, 50]
    sep_prior = [100, 200]
    cr_prior = [100, 300]
    param_pymask = {
        "pa_prior": pa_prior,
        "sep_prior": sep_prior,
        "cr_prior": cr_prior,
    }
    fit = amical.pymask_grid(str(example_oifits), **param_pymask)
    assert isinstance(fit, dict)
Example #2
0
    # Pymask proposes to add some extra_error on the CP. This allows to take
    # into account a possibly understimated uncertainties on the data. Indeed,
    # some bias due to mismatch between the calibrator and the science spectral type,
    # or some systematic temporal effect could produce additional errors not properly
    # retrieved by the covariance matrix.

    # In addition, we can also add some scaling parameter (`err_scale`) on the CP
    # uncertainties to deal with the number of independant closure phases (N(N-1)(N-2)/6)
    # compare to the dependant one ((N-1)(N-2)/2). If you considere the full CP set (35 for
    # a 7 holes mask), you possibly over-use your data, so you have to scale
    # your uncertainties by the factor of additional CP, which is sqrt(N/3).

    # ** Note that if you used only a subset of CP (by selecting one common hole to
    # save the oifits, see amical.save for details), this additional `err_scale` is unusable.

    fit2 = amical.pymask_grid(inputdata, **param_pymask)

    param_mcmc = {'niters': 800,
                  'walkers': 100,
                  'initial_guess': [146, 47, 244],
                  'burn_in': 100}

    fit3 = amical.pymask_mcmc(inputdata, **param_pymask, **param_mcmc)

    cr_pymask = amical.pymask_cr_limit(inputdata, nsim=500, ncore=12, smax=250,
                                       nsep=100, cmax=5000, nth=30, ncrat=60)

if use_candid & use_pymask:
    plt.figure()
    plt.plot(cr_candid['r'], cr_candid['cr_limit'],
             label='CANDID', alpha=.5, lw=3)
Example #3
0
def test_pymask(filepath):
    fit1 = amical.pymask_grid(str(filepath))
    assert isinstance(fit1, dict)
    fit2 = amical.pymask_grid([filepath])
    assert isinstance(fit2, dict)
Example #4
0
def test_pymask(example_oifits):
    fit1 = amical.pymask_grid(str(example_oifits))
    assert isinstance(fit1, dict)
    fit2 = amical.pymask_grid([example_oifits])
    assert isinstance(fit2, dict)