Blind Search

Search class

class rvsearch.search.Search(data, post=None, starname='star', max_planets=8, priors=[], crit='bic', fap=0.001, min_per=3, max_per=10000, manual_grid=None, oversampling=1.0, trend=False, linear=False, eccentric=False, fix=False, polish=True, baseline=True, mcmc=True, workers=1, verbose=True, save_outputs=True, mstar=None)[source]

Class to initialize and modify posteriors as planet search runs.

Parameters
  • data (DataFrame) – pandas dataframe containing times, vel, err, and insts.

  • post (radvel.Posterior) – Optional posterior with known planet params.

  • starname (str) – String, used to name the output directory.

  • max_planets (int) – Integer, limit on iterative planet search.

  • priors (list) – List of radvel prior objects to use.

  • crit (str) – Either ‘bic’ or ‘aic’, depending on which criterion to use.

  • fap (float) – False-alarm-probability to pass to the periodogram object.

  • min_per (float) – Minimum search period, to pass to the periodogram object.

  • trend (bool) – Whether to perform a DBIC test to select a trend model.

  • linear (bool) – Wether to linearly optimize gamma offsets.

  • fix (bool) – Whether to fix known planet parameters during search.

  • polish (bool) – Whether to create finer period grid after planet is found.

  • verbose (bool) –

  • save_outputs (bool) – Save output plots and files? [default = True]

  • mstar (tuple) – (optional) stellar mass and uncertainty in solar units

__init__(data, post=None, starname='star', max_planets=8, priors=[], crit='bic', fap=0.001, min_per=3, max_per=10000, manual_grid=None, oversampling=1.0, trend=False, linear=False, eccentric=False, fix=False, polish=True, baseline=True, mcmc=True, workers=1, verbose=True, save_outputs=True, mstar=None)[source]

Initialize self. See help(type(self)) for accurate signature.

__weakref__

list of weak references to the object (if defined)

add_gp(inst=None)[source]

Add a gaussian process to the posterior (NOT IN USE).

add_planet()[source]

Add parameters for one more planet to posterior.

basebic = None
if post == None:

self.basebic = None

else:

self.basebic = post.likelihood.bic()

Continue a search by trying to add one more planet

Parameters

fixed_threshold (bool) – fix the BIC threshold at the last threshold, or re-derive for each periodogram

fit_orbit()[source]

Perform a max-likelihood fit with all parameters free.

inject_recover(injected_orbel, num_cpus=None, full_grid=False)[source]

Inject and recover Inject and attempt to recover a synthetic planet signal :param injected_orbel: array of orbital elements sent to radvel.kepler.rv_drive :type injected_orbel: array :param num_cpus: Number of CPUs to utilize. Will default to self.workers :type num_cpus: int :param full_grid: if True calculate periodogram on full grid, if False only calculate

at single period

Returns

(recovered? (T/F), recovered_orbel)

Return type

tuple

Run an iterative search for planets not given in posterior.

Parameters
  • fixed_threshold (float) – (optional) use a fixed delta BIC threshold

  • mkoutdir (bool) – create the output directory?

save(filename='post_final.pkl')[source]

Pickle current posterior.

sub_gp(num_gps=1)[source]

Remove a gaussian process from the posterior (NOT IN USE).

sub_planet()[source]

Remove parameters for one planet from posterior.

trend_test()[source]

Perform zero-planet baseline fit, test for significant trend.