The RV Model
- class radvel.model.GeneralRVModel(params, forward_model, time_base=0)[source]
A generalized Model
- Parameters
params (radvel.Parameters) – The parameters upon which the RV model depends.
forward_model (callable) –
The function that defines the signal as a function of time and parameters. The forward model is called as
forward_model(time, params, *args, **kwargs) -> float
time_base (float) – time relative to which ‘dvdt’ and ‘curv’ terms are computed.
Examples
>>> import radvel # In this example, we'll assume a function called 'my_rv_function' that # computes RV values has been defined elsewhere. We'll assume that # 'my_rv_function' depends on planets' usual RV parameters # contained in radvel.Parameters as well as some additional # parameter, 'my_param'. >>> params = radvel.Parameters(2) >>> params['my_param'] = rv.Parameter(my_param_value,vary=True) >>> rvmodel = radvel.GeneralRVModel(myparams,my_rv_function) >>> rv = rvmodel(10)
- __call__(t, *args, **kwargs)[source]
Compute the signal
- Parameters
t (array of floats) – Timestamps to calculate the model
- Returns
model at each time in t
- Return type
vel (array of floats)
- __weakref__
list of weak references to the object (if defined)
- class radvel.model.Parameter(value=None, vary=True, mcmcscale=None, linear=False)[source]
Object to store attributes of each orbital parameter .. attribute:: value
value of parameter.
- type
float
- vary
True if parameter is allowed to vary in MCMC or max likelihood fits, false if fixed
- Type
Bool
- mcmcscale
step size to be used for MCMC fitting
- Type
float
- linear
if vary=False and linear=True for gamma parameters then they will be calculated analytically using the trick. derived by Timothy Brandt.
- Type
bool
- __weakref__
list of weak references to the object (if defined)
- class radvel.model.Parameters(num_planets, basis='per tc secosw sesinw logk', planet_letters=None)[source]
Object to store the model parameters.
Parameters to describe a radial velocity orbit stored as an OrderedDict.
- Parameters
num_planets (int) – Number of planets in model
basis (string) – parameterization of orbital parameters. See
radvel.basis.Basis
for a list of valid basis strings.planet_letters (dict [optional) – custom map to match the planet numbers in the Parameter object to planet letters. Default {1: ‘b’, 2: ‘c’, etc.}. The keys of this dictionary must all be integers.
- basis
Basis object
- Type
radvel.Basis
- planet_parameters
orbital parameters contained within the specified basis
- Type
list
- num_planets
number of planets in the model
- Type
int
Examples
>>> import radvel # create a Parameters object for a 2-planet system with # custom planet number to letter mapping >>> params = radvel.Parameters(2, planet_letters={1:'d', 2:'e'})