Periodograms

class rvsearch.periodogram.Periodogram(post, basebic=None, minsearchp=3, maxsearchp=10000, baseline=True, basefactor=5.0, oversampling=1.0, manual_grid=None, fap=0.001, num_pers=None, eccentric=False, workers=1, verbose=True)[source]

Class to calculate and store periodograms.

Parameters
  • post (radvel.Posterior) – radvel.Posterior object

  • minsearchp (float) – minimum search period

  • maxsearchp (float) – maximum search period

  • baseline (bool) – Whether to calculate maxsearchp from obs. baseline

  • basefactor (float) – How far past the obs. baseline to search

  • oversampling (float) – By how much to oversample the period grid

  • manual_grid (array) – Option to feed in a user-chosen period grid

  • fap (float) – False-alarm-probability threshold for detection

  • num_pers (int) – (optional) number of frequencies to test, default

  • eccentric (bool) – Whether to fit with free or fixed eccentricity

  • workers (int) – Number of cpus over which to parallelize

  • verbose (bool) – Whether to print progress during calculation

__init__(post, basebic=None, minsearchp=3, maxsearchp=10000, baseline=True, basefactor=5.0, oversampling=1.0, manual_grid=None, fap=0.001, num_pers=None, eccentric=False, workers=1, verbose=True)[source]

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

__weakref__

list of weak references to the object (if defined)

eFAP()[source]

Calculate the threshold for significance based on BJ’s empirical false-alarm-probability algorithm, and estimate the false-alarm-probability of the DBIC global maximum.

ls()[source]

Compute Lomb-Scargle periodogram with astropy.

make_per_grid()[source]

Generate a grid of periods for which to compute likelihoods.

per_bic()[source]

Compute delta-BIC periodogram. ADD: crit is BIC or AIC.

per_spacing()[source]

Get the number of sampled frequencies and return a period grid.

Condition for spacing: delta nu such that during the entire duration of observations, phase slip is no more than P/4

Returns

Array of test periods

Return type

array

plot_per(alias=True, floor=True, save=False)[source]

Plot periodogram.

Parameters
  • alias (bool) – Plot year, month, day aliases?

  • floor (bool) – Set y-axis minimum according to likelihood limit?

  • save (bool) – Save plot to current directory?

tels = None

for val in self.post.params.keys(): if ‘gamma_’ in val:

self.tels.append(val.split(‘_’)[1])

class rvsearch.periodogram.TqdmUpTo(iterable=None, desc=None, total=None, leave=True, file=None, ncols=None, mininterval=0.1, maxinterval=10.0, miniters=None, ascii=None, disable=False, unit='it', unit_scale=False, dynamic_ncols=False, smoothing=0.3, bar_format=None, initial=0, position=None, postfix=None, unit_divisor=1000, write_bytes=None, gui=False, **kwargs)[source]

Provides update_to(n) which uses tqdm.update(delta_n).

update_to(b=1, bsize=1, tsize=None)[source]
bint, optional

Number of blocks transferred so far [default: 1].

bsizeint, optional

Size of each block (in tqdm units) [default: 1].

tsizeint, optional

Total size (in tqdm units). If [default: None] remains unchanged.