LindleyLentati/TempoNest — pull request #3 by vhaasteren (2013-06-20 16:23:37+00:00)
Title: Configfile

This branch has an added feature: instead of using the values from the TempoNestParameters.cpp (still the default fallback), you can provide parameters in the a file with the following layout:

# General parameters:
# Root of the results files,relative to the directory in which TempoNest is run. This will be followed by the pulsar name, and then the individual output file extensions.
root = results/NL-QSDMargin-

# numTempo2its - sets the number of iterations Tempo2 should do before setting the priors. Should only be set to 0 if all the priors are set in setTNPriors
numTempo2its = 1;

# doLinearFit: Switches between the full non linear timing model (doLinearFit=0) and the linear approximation for the timing model based on the initial Tempo2 Fit (= 1).

doLinearFit = 0;

# doMax: Find maximum likelihood values for non linear timing model for the stochastic model chosen.
# Will find maximum in the full un marginalised problem in order to find the best values to then marginalise over.
# Start point of non linear search will be performed at this maximum if chosen unless set otherwise in custom priors.
# Central point of prior for non linear search will be set at this value unless set otherwise in custom priors.
doMax = 0;

# ModelChoice

incEFAC = 1; # include EFAC: 0 = none, 1 = one for all residuals, 2 = one for each observing system
incEQUAD = 0; # include EQUAD: 0 = no, 1 = yes
incRED = 2; # include Red Noise model: 0 = no, 1 = power law model (vHL2013), 2 = model independent (L2013)
incDM = 0; # include Red Noise model: 0 = no, 1 = power law model (vHL2013), 2 = model independent (L2013)

doTimeMargin = 1 ; # 0=No Analytical Marginalisation over Timing Model. 1=Marginalise over QSD. 2=Marginalise over all Model params excluding jumps.
doJumpMargin = 1; # 0=No Analytical Marginalisation over Jumps. 1=Marginalise over Jumps.

# Priors

# Which priors to use: customPriors=0 uses the Priors from tempo2 fit, along with values set in this function, =1:set priors for specific parameters in setTNPriors
customPriors = 0;

# FitSig sets the priors for all timing model and jump parameters for both non linear and linear timing models.
# For the non linear fit, Fitsig multiples the error returned by Tempo2, and sets the prior to be the best fit value returned by tempo2 +/- the scaled error.
# For the linear fit, multiplies the ratio of the rms of the designmatrix vector for each timing model parameter, and the rms of the residuals returned by Tempo2.
FitSig = 10;

# Remaining priors for the stochastic parameters.
EFACPrior[0] = 0.1;
EFACPrior[1] = 10;

EQUADPrior[0] = -10;
EQUADPrior[1] = -5;

AlphaPrior[0] = 1.1;
AlphaPrior[1] = 6.1;

AmpPrior[0] = -20;
AmpPrior[1] = -10;

numCoeff = 10;

CoeffPrior[0] = -10;
CoeffPrior[1] = 0;

DMAlphaPrior[0] = 1.1;
DMAlphaPrior[1] = 6.1;

DMAmpPrior[0] = -18;
DMAmpPrior[1] = -8;