bioverse.analysis module

Provides functions for iterating over several simulations to compute statistical power and more.

bioverse.analysis.test_hypothesis_grid(h, generator, survey, N=10, processes=1, do_bar=True, bins=15, return_chains=False, mw_alternative='greater', method='dynesty', nlive=100, **kwargs)

Runs simulated surveys over a grid of survey and astrophysical parameters. Each time, uses the simulated data set to fit the hypothesis parameters and computes the model evidence versus the null hypothesis.

bioverse.analysis.test_hypothesis_grid_iter(h, generator, survey, bins, return_chains, mw_alternative, method, seed, nlive, kwargs)

Runs a single iteration for test_hypothesis_grid (separated for multiprocessing).

bioverse.analysis.compute_statistical_power(results, threshold=None, method='dlnZ')

Computes the statistical power of a hypothesis test, i.e. the fraction of simulated tests which pass a model comparison significance threshold.

Parameters:
  • results (dict) – Output of test_hypothesis_grid.

  • threshold (float, optional) – Significance threshold to enforce.

  • method (('dAIC', 'dBIC', 'dlnZ', 'p', 'logp')) – Specifies which method to use.

Returns:

power – Array of statistical power for each test in the results grid. Shape is shape(results[method])[:-1].

Return type:

float array

bioverse.analysis.random_simulation(results, generator, survey, bins=15, mw_test=False, mw_alternative='greater', method='dynesty', nlive=100, return_chains=True, **grid_kwargs)
bioverse.analysis.compare_methods(h, data, methods=['dynesty', 'emcee'], **kwargs)
bioverse.analysis.number_vs_time(h, generator, survey, t_total, N=30, average=True, **kwargs)

Determines how many planets are characterized by the simulated survey versus time budget.

bioverse.analysis.number_vs_eta(h, generator, survey, eta_Earth, N=30, average=True, **kwargs)

Determines how many planets are characterized by the simulated survey versus eta Earth.

bioverse.analysis.number_vs_distance(h, generator, survey, d_max, N=30, average=True, **kwargs)

Determines how many planets are characterized by the simulated survey versus d_max.