Boundaries, spaces, and priors#
Parameter boundaries are a prerequisite of MCMC/NS samplers, and together with priors and spaces, they must be specified for each parameter. The code automatically selects the values that work well in most cases, so you may need to do only minor tuning. This page explains how to change the default behaviour of PyORBIT, and then it collects the default parameter properties used by PyORBIT when the configuration file does not override them with boundaries, spaces, priors, or fixed. Keep in mind that PyORBIT will activate only the parameters relevant to the model you selected for your data
General description and examples#
For every parameter involved in a fit, it is possible to specify
the
boundariesof the parameter spaces;the
spacesover which to explore the parameter space;the
priorsfor a given parameter;if a parameter has a
fixedvalue.
Sometimes it is possible to specify a prior for a derived parameter as well.
Spaces#
A parameter can be explored in Linear (or Natural) space when it spans a small range, or in Logarithmic space when it spans multiple orders of magnitude. A smaller base for the logarithm provides smaller jumps between orders of magnitude, and may be useful to better map the posterior. Given \(\theta\) the sampling parameter (the one explored by the sampler) and \(\gamma\) the physical parameters (the one entering the model), the following options are available:
Keyword |
Description |
Transformation |
Inverse |
Notes |
|---|---|---|---|---|
|
Linear or Natural space |
\(\theta = \gamma\) |
\(\gamma = \theta\) |
Natural space, 1:1 match |
|
Natural logarithm |
\(\theta = \ln{\gamma}\) |
\(\gamma = {\rm e}^\theta \) |
|
|
Logarithm in base 2 |
\(\theta = \log_{2}{\gamma}\) |
\(\gamma = 2^{\theta}\) |
|
|
Logarithm in base 10 |
\(\theta = \log_{10}{\gamma}\) |
\(\gamma = 10^{\theta}\) |
|
|
The sine of the angle parameter |
\(\theta = \sin {\gamma} \) |
\(\gamma = \arcsin {\gamma} \) |
Uniform prior in \(\sin (\gamma)\) |
|
The cosine of the angle parameter |
\(\theta = \cos {\gamma} \) |
\(\gamma = \arccos {\theta} \) |
Uniform prior in \(\cos (\gamma)\) |
33common:
34 planets:
35 b:
36 orbit: circular
37 use_time_inferior_conjunction: True
38 spaces:
39 P: Linear
40 K: Linear
41 boundaries:
42 P: [0.2750, 0.2850]
43 K: [0.001, 20.0]
44 Tc: [57744.00, 57744.10]
45 priors:
46 P: ['Gaussian', 0.280324956, 0.000000067]
47 Tc: ['Gaussian', 57744.071508, 0.000103]
Boundaries#
By specifying the boundaries of a parameter, the sampler will not be allowed to explore values outside this range.
Boundaries can be specified using the keyword boundaries within the corresponding model.
33common:
34 planets:
35 b:
36 orbit: circular
37 use_time_inferior_conjunction: True
38 spaces:
39 P: Linear
40 K: Linear
41 boundaries:
42 P: [0.2750, 0.2850]
43 K: [0.001, 20.0]
44 Tc: [57744.00, 57744.10]
45 priors:
46 P: ['Gaussian', 0.280324956, 0.000000067]
47 Tc: ['Gaussian', 57744.071508, 0.000103]
Priors#
The prior expresses our knowledge of the parameter before analysing the data. The code will automatically retrieve the boundaries for a given parameter if they are needed for the prior calculation (e.g., as in the Uniform prior). Due to the different treatment of priors in Nested Sampling algorithms, some priors are available only in Linear space when used in NS analysis. Those cases are reported in the Spaces (NS) column
Keyword |
Description |
Parameters |
Spaces (NS) |
|---|---|---|---|
|
Uniform prior (default choice) |
All |
|
|
Gaussian prior |
1) center 2) scale |
|
|
Beta distribution |
1) shape parameter \(\alpha\) 2) shape parameter \(\beta\) |
All |
|
Alias for |
1) shape parameter \(\alpha\) 2) shape parameter \(\beta\) |
All |
|
Right side of a Half-Normal distribution |
1) center 2) scale |
|
|
Left side of a Half-Normal distribution |
1) center 2) scale |
|
|
Alias for |
1) center 2) scale |
|
|
Bigaussian distribution symmetric around 90° |
1) center 2) scale |
|
|
Bigaussian distribution symmetric around 0 |
1) center 2) scale |
|
|
Jeffreys prior, normalized between the boundaries |
|
|
|
Alias for |
|
|
|
Modified Jeffreys prior, normalized between the boundaries |
1) \(a\) (linear for \(\theta < a\) |
|
|
Alias for |
1) \(a\) |
|
|
Alias for |
1) \(a\) |
|
|
Rayleigh prior, normalized between the boundaries |
1) scale \(\sigma\) |
|
Example:
33common:
34 planets:
35 b:
36 orbit: circular
37 use_time_inferior_conjunction: True
38 spaces:
39 P: Linear
40 K: Linear
41 boundaries:
42 P: [0.2750, 0.2850]
43 K: [0.001, 20.0]
44 Tc: [57744.00, 57744.10]
45 priors:
46 P: ['Gaussian', 0.280324956, 0.000000067]
47 Tc: ['Gaussian', 57744.071508, 0.000103]
Important
Boundaries and priors in the YAML file must be written in the physical (or natural) parameter space. This is also true when the parameter is sampled in a logarithmic space. In that case, boundaries must be strictly positive.
Where to specify a parameter’s properties#
TO BE DONE
Dataset systematics#
In the tables below:
Uniform []means a uniform prior over the listed boundaries, with no extra prior hyperparameters.Nonein theFixedcolumn means that the parameter has no predefined value when fixed by the user or the algorithm.dynamicmeans that the numerical boundary is computed from the dataset or from another model at initialisation time.Pattern rows such as
poly_c{0..9}represent all parameters in the indicated range.
Each dataset will include one offset and one jitter parameter for each active flag in
the input file. The actual parameter names are offset_0, offset_1, … and
jitter_0, jitter_1, …
Parameter |
Boundaries |
Space |
Prior |
Fixed |
Notes |
|---|---|---|---|---|---|
|
dynamic |
|
|
|
See subsection below. |
|
dynamic |
|
|
|
See subsection below. |
|
dynamic |
|
|
|
Same boundary logic as |
Offset boundaries#
The boundaries associated with each offset will be as large as possible to accommodate improbable or anomalous situations, such as eccentric planets or massive long-period companions with partial RV coverage.
Given x as the array with the time of the observations, y as the array with the data, and e as the corresponding error, the boundaries for the offset are determined in the following way:
x_range = np.max(x) - np.min(x)
y_range = np.max(y) - np.min(y)
y_trend = np.abs(y_range/x_range)
y_diff = np.abs(np.mean(x)-Tref) * y_trend + 1000.
offset_boundaries = [np.min(y) - 10.*y_diff, np.max(y) + 10.*y_diff]
where \(T_{\rm ref}\) is the reference time specified in the parame
Broad boundaries do not represent a problem when running an MCMC sampler, given an adequate starting point. When running pyDE+emcee, for example, you must allow a sufficiently large number of generations for the pyDE code to properly explore the parameter space; typically, 50000 generations is a good starting value.
Jitter boundaries#
The jitter boundaries are computed dynamically by taking the maximum error in the array as the reference and multiplying or dividing by 100 to set the upper or lower limits, respectively.
jitter_boundaries = [min(e)/100, 100 max(e)]
The lower boundary is intentionally set to a value other than zero to avoid problems for datasets where the jitter parameter is explored in logarithmic space. Since jitter is added in quadrature to the formal errors, a value much smaller than the error has the same effect as no jitter at all. Hence, in most cases it is not necessary to change the default lower limit to zero.
Changing the boundaries#
Offset and jitter boundaries are determined using the whole dataset, without distinction by the flag specified in the 4th and 5th columns (see Prepare a dataset file )
Let’s take the case when a dataset is using two flags for jitter and two flags for offset, e.g., when putting together data collected with HARPS and HARPS-N, but you want to use a single covariance matrix for the stellar activity. You can specify different boundaries for each distinct jitter and offset parameters:
1inputs:
2 RVdata:
3 file: datasets/K2-141_RV_PyORBIT.dat
4 kind: RV
5 models:
6 - radial_velocities
7 - tinygp_quasiperiodic
8 boundaries:
9 jitter_0: [ 0.00, 10.0]
10 jitter_1: [ 0.00, 20.0]
11 offset_0: [ -3500.0, -3300.0]
12 offset_1: [ -4000.0, -3000.0]
----- dataset: RVdata
jitter_0 id: 11 s:Linear b:[ 0.0000, 10.0000] p:Uniform []
jitter_1 id: 12 s:Linear b:[ 0.0000, 20.0000] p:Uniform []
offset_0 id: 13 s:Linear b:[ -3500.0000, -3300.0000] p:Uniform []
offset_1 id: 14 s:Linear b:[ -4000.0000, -3000.0000] p:Uniform []
The code will automatically assign the If you don’t specify the boundaries for one of the parameters, the automa
8 boundaries:
9 #jitter_0: [ 0.00, 10.0]
10 jitter_1: [ 0.00, 20.0]
11 #offset_0: [ -3500.0, -3300.0]
12 offset_1: [ -4000.0, -3000.0]
----- dataset: RVdata
jitter_0 id: 11 s:Linear b:[ 0.0120, 1088.3783] p:Uniform []
jitter_1 id: 12 s:Linear b:[ 0.0000, 20.0000] p:Uniform []
offset_0 id: 13 s:Linear b:[ -13430.6237, 6632.5000] p:Uniform []
offset_1 id: 14 s:Linear b:[ -4000.0000, -3000.0000] p:Uniform []
You can apply the same boundaries to all the jitter/offset parameters of a dataset by removing the numerical subscript:
8 boundaries:
9 jitter: [ 0.00, 10.0]
10 offset: [ -3500.0, -3300.0]
----- dataset: RVdata
jitter_0 id: 11 s:Linear b:[ 0.0000, 10.0000] p:Uniform []
jitter_1 id: 12 s:Linear b:[ 0.0000, 10.0000] p:Uniform []
offset_0 id: 13 s:Linear b:[ -3500.0000, -3300.0000] p:Uniform []
offset_1 id: 14 s:Linear b:[ -3500.0000, -3300.0000] p:Uniform []
Changing priors and spaces#
The same tricks above with boundaries also apply to spaces and priors,
for example, specifying generic priors as below:
8 boundaries:
9 jitter: [ 0.00, 10.0]
10 offset: [ -3500.0, -3300.0]
11 priors:
12 jitter: ['HalfGaussian', 0.00, 10.0]
13 offset: ['Gaussian', -3450.0, 10.0]
will affect all the flag-specific parameters of your dataset:
----- dataset: RVdata
jitter_0 id: 11 s:Linear b:[ 0.0000, 10.0000] p:HalfGaussian [ 0. 10.]
jitter_1 id: 12 s:Linear b:[ 0.0000, 10.0000] p:HalfGaussian [ 0. 10.]
offset_0 id: 13 s:Linear b:[ -3500.0000, -3300.0000] p:Gaussian [-3450. 10.]
offset_1 id: 14 s:Linear b:[ -3500.0000, -3300.0000] p:Gaussian [-3450. 10.]
Caution
You cannot mix generic and flag-specific names! For example, this configuration:
boundaries:
jitter: [ 0.00, 10.0]
offset: [ -3500.0, -3300.0]
offset_1: [ -4000.0, -3000.0]
jitter_1: [0.00, 20.0]
will produce unexpected results, including ignored priors and wrong boundary assignments.
Planets#
Common object: common: planets.
Parameter |
Boundaries |
Space |
Prior |
Fixed |
|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dynamic |
|
|
|
|
|
|
|
|
Star Parameters#
Common object: common: star: star_parameters.
Parameter |
Boundaries |
Space |
Prior |
Fixed |
|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Stellar Activity#
Common object: common: activity.
Parameter |
Boundaries |
Space |
Prior |
Fixed |
|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Limb Darkening#
Common objects: ld_linear, ld_quadratic, ld_square-root,
ld_logarithmic, ld_exponential, ld_power2, and ld_nonlinear.
Common object |
Parameter |
Boundaries |
Space |
Prior |
Fixed |
|---|---|---|---|---|---|
|
|
|
|
|
|
two-coefficient laws |
|
|
|
|
|
two-coefficient laws |
|
|
|
|
|
two-coefficient laws |
|
|
|
|
|
two-coefficient laws |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The two-coefficient laws are ld_quadratic, ld_square-root,
ld_logarithmic, ld_exponential, and ld_power2.
Normalization, Dilution, Offset, and Jitter#
Common object |
Parameter |
Boundaries |
Space |
Prior |
Fixed |
|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dynamic |
|
|
|
|
|
dynamic |
|
|
|
common_offset and common_jitter inherit their numerical boundaries from the
datasets that use them. If more than one dataset shares the same common
parameter, the boundary is expanded to include all relevant datasets.
Polynomial and Detrending Models#
Common objects: polynomial_trend, detrending, and lightcurve_detrending.
Common object |
Parameter |
Boundaries |
Space |
Prior |
Fixed |
|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Correlation Models#
Common objects: correlation and complex_correlation.
Model or common object |
Parameter |
Boundaries |
Space |
Prior |
Fixed |
|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The local_correlated_jitter coefficients are model-local rather than common
object parameters. Their highest order is set by the model keyword order.
Harmonics and Sinusoids#
Common objects: harmonics and sinusoid.
Common object |
Parameter |
Boundaries |
Space |
Prior |
Fixed |
|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CHEOPS and CCF Parameters#
Common objects: cheops_modelling and ccf_parameters.
Common object |
Parameter |
Boundaries |
Space |
Prior |
Fixed |
|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Model Families#
Most entries in the models section do not define new boundaries directly.
They select which common-object parameters are sampled and whether those
parameters are shared among datasets or local to a dataset.
Model family |
Parameter defaults used |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Multidimensional GP models |
|
|
|
|
|
|
|
|
The model-local parameters listed in Correlation Models. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|