tkmatrix.rv.RvFitter

class tkmatrix.rv.RvFitter

Bases: object

Main class used for RV injection and recovery

__init__() None

Methods

__init__()

compute_mmin_from_semiamplitude(period_grid, ...)

Calculates the minimum mass from a grid of periods and semiamplitudes

compute_semiamplitude_from_mmin(mmin, ...)

Calculates the semi-amplitude from the minimum mass, period and star mass

inject_rv(times, star_mass, rstar, ...)

Creates a synthetic signal of a planet with a given mass, period and t0

mask_signals(rv_df, rv_masks, star_mass)

recover_period(input)

recover_periods(rv_df[, period_grid_geom, ...])

recover_signal(rv_df, period, msin, omega, ...)

recover_strongest_signal(rv_df[, ...])

running_median(data, kernel)

Returns sliding median of width 'kernel' and same length as data

sinfunc(t, k, omega, period)

Computes the RV measurement for the given times, semi-amplitude omega and period.

spectra(chi2[, oversampling_factor, kernel_size])

Computes the SDE for a residuals series.

static compute_mmin_from_semiamplitude(period_grid, k_grid, star_mass)

Calculates the minimum mass from a grid of periods and semiamplitudes

Parameters:
  • period_grid – the period grid

  • k_grid – the semi-amplitude grid

  • star_mass – the star mass

Returns:

the minimum masses grid

static compute_semiamplitude_from_mmin(mmin, period, star_mass)

Calculates the semi-amplitude from the minimum mass, period and star mass

Parameters:
  • mmin – the mass min value

  • period – the period

  • star_mass – the star mass

Returns:

the semi-amplitude value

static inject_rv(times, star_mass, rstar, planet_mass, period, t0)

Creates a synthetic signal of a planet with a given mass, period and t0

Parameters:
  • times – the time series

  • star_mass – the star mass

  • rstar – the star radius

  • planet_mass – the synthetic planet mass

  • period – the synthetic planet period

  • t0 – the synthetic planet epoch

Returns:

the injected RV data

static running_median(data, kernel)

Returns sliding median of width ‘kernel’ and same length as data

Parameters:
  • data – the data for the running_median to be applied to

  • kernel – the kernel size for the running_median

Returns:

the data after the running median

static sinfunc(t, k, omega, period)

Computes the RV measurement for the given times, semi-amplitude omega and period.

Parameters:
  • t – the time series

  • k – the semi-amplitude

  • omega – the omega value

  • period – the period of the planet

Returns:

the RV expected measurements

static spectra(chi2, oversampling_factor=1, kernel_size=30)

Computes the SDE for a residuals series.

Parameters:
  • chi2 – the residuals list

  • oversampling_factor – the oversampling factor

  • kernel_size – the kernel size for the SDE computation

Returns:

all the computed data