The primary objects/classes and likelihood function for ExoSOFTmodel¶
Contents:
-
class
ExoSOFTmodel.model.
ExoSOFTdata
(epochs_di, epochs_rv, rapa, rapa_err, decsa, decsa_err, rv, rv_err, rv_inst_num, data_mode, pasa=False)[source]¶ Bases:
object
An object to contain all the necessary data arrays and parameters to calculate matching predicted data with the model. All member variables will remain constant throughout.
Notes: -Except for rv_inst_num array, all other arrays must be ndarrays of double
precision floating point numbers (dtype=np.dtype(‘d’)).-Arrays, epochs_di, rapa, rapa_err, decsa, and decsa_err must all have same length. -Arrays, epochs_rv, rv, rv_err and rv_inst_num must all have same length.
Inputs: rv_inst_num = ndarray of positive signed or unsigned integers, of same length
as epochs_rv, rv, and rv_err.
-
class
ExoSOFTmodel.model.
ExoSOFTparams
(omega_offset_di, omega_offset_rv, vary_tc, tc_equal_to, di_only, low_ecc, range_maxs, range_mins, num_offsets)[source]¶ Bases:
object
Directly Varried Model Inputs Stored Parameters direct_pars model_in_pars stored_pars i Parameter Parameter Parameter units 0 Mass of Primary (m1) m1 m1 Msun .$$ FILL THIS OUT!!!!
-
check_range
()[source]¶ Determine if all parameters in the full list are within their allowed ranges. Range arrays corrispond to parameters in: [m1, m2, parallax, long_an, e, to/tc, p, inc, arg_peri, v1,v2,...]
-
make_model_in
()[source]¶ Convert directly varied parameters into a comprehensive list of those used ans inputs to during model calculations.
model_in_params: [m1,m2,parallax,long_an,e,to,tc,p,inc,arg_peri,arg_peri_di,arg_peri_rv,a_tot_au,K]
-
make_stored
(chi_squared)[source]¶ Push values in model_in_params, offsets and the resulting chi_squared_3d into an array to be stored on disk during ExoSOFT. Not sure how to make this work with emcee or other tools...
-
stored_to_direct
(pars)[source]¶ take a set of parameters matching ‘stored_pars’ and make the directly varied versions matching ‘direct_pars’. Note: direct_pars: [m1,m2,parallax,long_an,e OR sqrt(e)*sin(arg_peri),to/tc,p,inc,arg_peri OR sqrt(e)*cos(arg_peri),v1,v2...] stored_pars: [m1,m2,parallax,long_an,e,to,tc,p,inc,arg_peri,a_tot_au,chi_sqr,K,v1,v2...]
-
-
ExoSOFTmodel.model.
ln_posterior
(pars, Model)[source]¶ Calculates the likelihood for a given set of inputs. Then calculate the natural logarithm of the posterior probability.
-Model is of type ExoSOFTmodel. Currently just holds resulting fit values. -Data is of type ExoSOFTdata, containing all input data and params to produce predicted values of matching units, and arrays for predicted values. -Params is of type ExoSOFTparams, an class containing functions for calculating versions of the ‘pars’ used as model inputs, and a version that would be for storing to disk when ran in ExoSOFT. -Priors is of type ExoSOFTpriors, containing funtions for each parameter’s prior, a function calculate combined prior given list of params, and any variables necessary for those calculations.