CONAN.fit_data.run_fit

CONAN.fit_data.run_fit#

CONAN.fit_data.run_fit(lc_obj=None, rv_obj=None, fit_obj=None, statistic='median', out_folder='output', init_only=False, progress=True, rerun_result=False, get_parameter_names=False, shared_params={}, conditionals={}, debug=False, save_burnin_chains=True, resume_sampling=False, skip_bwbr=False, dyn_kwargs=dict(sample='rwalk', bound='multi'), run_kwargs=dict(), verbose=True)#

function to fit the data using the light-curve object lc_obj, rv_object rv_obj, and fit_setup object fit_obj.

Parameters:
  • lc_obj (lightcurve object;) – object containing lightcurve data and setup parameters. see CONAN.load_lightcurves() for more details.

  • rv_obj (rv object) – object containing radial velocity data and setup parameters. see CONAN.load_rvs() for more details.

  • fit_obj (fit_setup object;) – object containing fit setup parameters. see CONAN.fit_setup() for more details.

  • statistic (str;) – statistic to run on posteriors to obtain model parameters and create model output file “_*out.dat”. must be one of [“median”, “max”, “bestfit”], default is “median”. “max” and “median” calculate the maximum and median of each parameter posterior respectively while “bestfit” is the parameter combination that gives the maximum joint posterior probability.

  • progress (bool;) – if True, show MCMC progress bar, default is True.

  • out_folder (str;) – path to output folder, default is “output”.

  • init_only (bool;) – generate only initial models, prior display, and *out.dat files in the output folder. useful for diagnosing starting points or generating full lc and rv models

  • rerun_result (bool;) – if True, rerun CONAN with previous fit result in order to regenerate plots and files. This also allows to create files compatibile with latest CONAN version. Default is False.

  • shared_params (dict, optional) – dict specifying parameters that shared a value. Default is empty dict {}. use CONAN.get_parameter_names(lc_obj, rv_obj) to see all parameter names.

  • conditionals (dict, optional) – dict specifying conditional parameter dependencies or constraints not captured by the prior function. e.g cond = dict(cond1=”sesinw**2 + secosw**2 < 1”) #TODO

  • resume_sampling (bool;) – resume sampling from last saved position

  • verbose (bool;) – if True, print out additional information, default is False.

  • debug (bool;) – if True, print out additional debugging information, default is False.

  • save_burnin_chains (bool;) – if True, save burn-in chains to file, default is True.

  • dyn_kwargs (dict;) – other parameters sent to the dynesty.NestedSampler() or dynesty.DynamicNestedSampler() function. e.g dyn_kwargs=dict(sample=’rwalk’,bound=’multi’)

  • run_kwargs (dict;) – other parameters sent to emcee’s run_mcmc() function or dynesty’s run_nested() function. e.g., for emcee: run_kwargs=dict(thin_by=1, tune=True, skip_initial_state_check=False) e.g., for dynesty dynamic sampling: run_kwargs=dict(maxiter_init=10000, maxiter_batch=1000,n_effective=30000) e.g., for static sampling: run_kwargs=dict( nlive_batch=50, maxbatch=5,maxiter=10000, maxcall=50000, logl_max=12344, n_effective=30000)

Returns:

result – Object that contains methods to plot the chains, corner, and histogram of parameters. e.g result.plot_chains(), result.plot_burnin_chains(), result.plot_corner, result.plot_posterior("T_0")

Return type:

object containing labeled mcmc chains