29 [
'a'] =
'A', [
'b'] =
'B', [
'c'] =
'C', [
'd'] =
'D', [
'e'] =
'E', [
'f'] =
'F', [
'g'] =
'G', [
'h'] =
'H',
30 [
'i'] =
'I', [
'j'] =
'J', [
'k'] =
'K', [
'l'] =
'L', [
'm'] =
'M', [
'n'] =
'N', [
'o'] =
'O', [
'p'] =
'P',
31 [
'q'] =
'Q', [
'r'] =
'R', [
's'] =
'S', [
't'] =
'T', [
'u'] =
'U', [
'v'] =
'V', [
'w'] =
'W', [
'x'] =
'X',
32 [
'y'] =
'Y', [
'z'] =
'Z'
42 if ( (
c =
a2A[(
int )( *
s )] ) ) {
60 struct timeval time1, time2;
64 gettimeofday( &time1, NULL );
70 gettimeofday( &time2, NULL );
74 tottime = (
REAL8 )( ( time2.tv_sec + time2.tv_usec * 1.e-6 ) - ( time1.tv_sec + time1.tv_usec * 1.e-6 ) );
78 UINT4 nlike = 0, ndata = 0;
83 tmpdata = tmpdata->
next;
85 fprintf(
timefile,
"[%d] Number of likelihood evaluations: %d\n", timenum, nlike / ndata );
103 struct timeval time1, time2;
107 gettimeofday( &time1, NULL );
114 gettimeofday( &time2, NULL );
118 tottime = (
REAL8 )( ( time2.tv_sec + time2.tv_usec * 1.e-6 ) - ( time1.tv_sec + time1.tv_usec * 1.e-6 ) );
140 ProcessParamsTable *
ppt = NULL;
141 ProcessParamsTable *commandLine = runState->
commandLine;
147 FILE *devrandom = NULL;
190 tmp = atof(
ppt->value );
199 tmpi = atoi(
ppt->value );
206 tmp = strtod(
ppt->value, (
char ** )NULL );
216 runState->
GSLrandom = gsl_rng_alloc( gsl_rng_mt19937 );
221 randomseed = atoi(
ppt->value );
227 if ( ( devrandom = fopen(
"/dev/urandom",
"r" ) ) == NULL ) {
228 gettimeofday( &tv, 0 );
229 randomseed = tv.tv_sec + tv.tv_usec;
231 if ( fread( &randomseed,
sizeof( randomseed ), 1, devrandom ) != 1 ) {
232 fprintf( stderr,
"Error... could not read random seed\n" );
239 gsl_rng_set( runState->
GSLrandom, randomseed );
252 CHAR *outtimefile = NULL;
255 CHAR *dotloc = strrchr( outtimefile,
'.' );
256 CHAR *slashloc = strrchr( outtimefile,
'/' );
257 if ( dotloc != NULL ) {
258 if ( slashloc != NULL ) {
259 if ( slashloc < dotloc ) {
268 if ( (
timefile = fopen( outtimefile,
"w" ) ) == NULL ) {
269 fprintf( stderr,
"Warning... cannot create a timing file, so proceeding without timings\n" );
300 ProcessParamsTable *
ppt;
301 ProcessParamsTable *commandLine = runState->
commandLine;
314 timeBins = atoi(
ppt->value );
319 while ( ifo_model ) {
371 ifo_model = ifo_model->
next;
416 snprintf( varname,
sizeof( varname ),
"F%u",
i );
419 snprintf( varname,
sizeof( varname ),
"F%u_FIXED",
i );
532 snprintf( varname,
sizeof( varname ),
"FB%u",
i );
549 snprintf( varname,
sizeof( varname ),
"%s_%u",
glitchpars[
i],
j + 1 );
553 if ( glv->
length > glnum ) {
622 CHAR *propfile = NULL;
625 ProcessParamsTable *
ppt;
626 ProcessParamsTable *commandLine = runState->
commandLine;
628 CHAR *tempPar = NULL, *tempPrior = NULL;
636 CHAR *filebuf = NULL;
644 INT4 varyphase = 0, varyskypos = 0, varybinary = 0, varyglitch = 0;
650 fprintf( stderr,
"Error... --prior-file is required.\n" );
678 fprintf( stderr,
"Warning... number of values ('%d') on line '%d' in prior file is different than expected:\n\t'%s'", nvals,
k + 1, tlist->
tokens[
k] );
693 if ( !strcmp( tempPrior,
"uniform" ) || !strcmp( tempPrior,
"loguniform" ) || !strcmp( tempPrior,
"gaussian" ) || !strcmp( tempPrior,
"fermidirac" ) ) {
695 XLAL_ERROR_VOID(
XLAL_EINVAL,
"Error... 'uniform', 'loguniform', 'gaussian', or 'fermidirac' priors must only be given for single parameters." );
699 XLAL_ERROR_VOID(
XLAL_EINVAL,
"Error... 'uniform', 'loguniform', 'gaussian', or 'fermidirac' priors must specify four values." );
702 low = atof( tline->
tokens[2] );
703 high = atof( tline->
tokens[3] );
705 if ( !strcmp( tempPrior,
"uniform" ) || !strcmp( tempPrior,
"loguniform" ) ) {
711 if ( strcmp( tempPrior,
"uniform" ) && strcmp( tempPrior,
"loguniform" ) && strcmp( tempPrior,
"gaussian" ) && strcmp( tempPrior,
"fermidirac" ) ) {
716 if ( !strcmp( tempPrior,
"uniform" ) ) {
718 }
else if ( !strcmp( tempPrior,
"loguniform" ) ) {
720 }
else if ( !strcmp( tempPrior,
"gaussian" ) ) {
722 }
else if ( !strcmp( tempPrior,
"fermidirac" ) ) {
725 }
else if ( !strcmp( tempPrior,
"gmm" ) ) {
733 fprintf( stderr,
"Warning... number of values ('%d') on line '%d' in prior file is different than expected:\n\t'%s'", nvals,
k + 1, tlist->
tokens[
k] );
748 gsl_matrix **gmmcovs;
759 CHAR UNUSED *nextpart;
768 if ( weightvals->
nTokens != nmodes ) {
771 for (
UINT4 j = 0;
j < nmodes;
j++ ) {
776 REAL8 minval = -INFINITY, maxval = INFINITY;
781 for (
UINT4 j = 0;
j < npars;
j++ ) {
782 REAL8 thismin = minval, thismax = maxval;
790 if ( minmaxvals->
nTokens == 2 ) {
791 if ( isfinite( atof( minmaxvals->
tokens[0] ) ) ) {
792 thismin = atof( minmaxvals->
tokens[0] );
794 if ( isfinite( atof( minmaxvals->
tokens[1] ) ) ) {
795 thismax = atof( minmaxvals->
tokens[1] );
800 minvals->
data[
j] = thismin;
801 maxvals->data[
j] = thismax;
810 for (
UINT4 j = 0;
j < npars;
j++ ) {
873 ifotemp = ifotemp->
next;
920 ProcessParamsTable *
ppt = NULL;
921 UINT4 defrac = 0, freqfrac = 0, esfrac = 0, ewfrac = 0, flatfrac = 0;
925 defrac = atoi(
ppt->value );
932 freqfrac = atoi(
ppt->value );
937 esfrac = atoi(
ppt->value );
944 ewfrac = atoi(
ppt->value );
951 flatfrac = atoi(
ppt->value );
956 if ( !defrac && !freqfrac && !ewfrac && !esfrac ) {
1017 gsl_matrix *corMatg = NULL;
1023 for (
i = 0;
i < parMat->
length;
i++ ) {
1027 for ( ; checkPrior ; checkPrior = checkPrior->
next ) {
1044 for (
j =
i + 1;
j < corsize;
j++ )
1045 for (
k = 0;
k < corsize;
k++ ) {
1046 corMat->
data[(
j - 1 )*corsize +
k] = corMat->
data[
j * corsize +
k];
1050 for (
k =
i + 1;
k < corsize;
k++ )
1051 for (
j = 0;
j < corsize;
j++ ) {
1052 corMat->
data[
j * corsize +
k - 1] = corMat->
data[
j * corsize +
k];
1064 corMatg = gsl_matrix_alloc( parMat->
length, parMat->
length );
1066 for (
j = 0;
j < parMat->
length;
j++ ) {
1067 gsl_matrix_set( corMatg,
i,
j, corMat->
data[
i * corsize +
j] );
1071 for (
i = 0;
i < parMat->
length;
i++ ) {
1077 for ( ; checkPrior ; checkPrior = checkPrior->
next ) {
1115 UINT4 gaussianLike = 0, roq = 0, nonGR = 0;
1161 REAL8Vector *sumPC = NULL, *sumPX = NULL, *sumPY = NULL, *sumPB = NULL, *sumPL = NULL;
1162 REAL8Vector *sumCX = NULL, *sumCY = NULL, *sumCB = NULL, *sumCL = NULL;
1163 REAL8Vector *sumXY = NULL, *sumXB = NULL, *sumXL = NULL;
1168 REAL8Vector *sumPCWhite = NULL, *sumPXWhite = NULL, *sumPYWhite = NULL, *sumPBWhite = NULL, *sumPLWhite = NULL;
1169 REAL8Vector *sumCXWhite = NULL, *sumCYWhite = NULL, *sumCBWhite = NULL, *sumCLWhite = NULL;
1170 REAL8Vector *sumXYWhite = NULL, *sumXBWhite = NULL, *sumXLWhite = NULL;
1171 REAL8Vector *sumYBWhite = NULL, *sumYLWhite = NULL;
1177 REAL8Vector *arespV = NULL, *brespV = NULL, *arespS = NULL, *brespS = NULL;
1188 INT4 chunkLength = 0, length = 0,
i = 0,
j = 0,
count = 0;
1190 REAL8 aT = 0., bT = 0., aV = 0., bV = 0., aS = 0., bS = 0.;
1263 REAL8 logGaussianNorm = 0.;
1265 for (
i = 0,
count = 0 ;
i < length ;
i += chunkLength,
count++ ) {
1266 chunkLength = chunkLengths->
data[
count];
1287 sumPX->data[
count] = 0.;
1288 sumPY->data[
count] = 0.;
1289 sumPB->data[
count] = 0.;
1290 sumPL->data[
count] = 0.;
1292 sumCY->data[
count] = 0.;
1293 sumCB->data[
count] = 0.;
1294 sumCL->data[
count] = 0.;
1296 sumXB->data[
count] = 0.;
1297 sumXL->data[
count] = 0.;
1299 sumYL->data[
count] = 0.;
1307 sumPXWhite->data[
count] = 0.;
1308 sumPYWhite->data[
count] = 0.;
1309 sumPBWhite->data[
count] = 0.;
1310 sumPLWhite->data[
count] = 0.;
1312 sumCYWhite->data[
count] = 0.;
1313 sumCBWhite->data[
count] = 0.;
1314 sumCLWhite->data[
count] = 0.;
1316 sumXBWhite->data[
count] = 0.;
1317 sumXLWhite->data[
count] = 0.;
1319 sumYLWhite->data[
count] = 0.;
1329 for (
j =
i ;
j <
i + chunkLength ;
j++ ) {
1330 REAL8 vari = 1., a0 = 0., a1 = 0.,
b0 = 0.,
b1 = 0., timeScaled = 0.;
1331 INT4 timebinMin = 0, timebinMax = 0;
1333 B =
data->compTimeData->data->data[
j];
1336 if ( gaussianLike ) {
1337 vari =
data->varTimeData->data->data[
j];
1342 sumdat->
data[
count] += ( creal(
B ) * creal(
B ) + cimag(
B ) * cimag(
B ) ) / vari;
1347 timebinMin = (
INT4 )fmod( floor(
T / tsv ), tsteps );
1348 timeMin = timebinMin * tsv;
1349 timebinMax = (
INT4 )fmod( timebinMin + 1, tsteps );
1350 timeMax = timeMin + tsv;
1353 a0 = arespT->
data[timebinMin];
1354 a1 = arespT->
data[timebinMax];
1355 b0 = brespT->
data[timebinMin];
1356 b1 = brespT->
data[timebinMax];
1359 timeScaled = (
T - timeMin ) / ( timeMax - timeMin );
1361 aT = a0 + ( a1 - a0 ) * timeScaled;
1362 bT =
b0 + (
b1 -
b0 ) * timeScaled;
1373 a0 = arespV->
data[timebinMin];
1374 a1 = arespV->
data[timebinMax];
1375 b0 = brespV->data[timebinMin];
1376 b1 = brespV->data[timebinMax];
1378 aV = a0 + ( a1 - a0 ) * timeScaled;
1379 bV =
b0 + (
b1 -
b0 ) * timeScaled;
1381 a0 = arespS->data[timebinMin];
1382 a1 = arespS->data[timebinMax];
1383 b0 = brespS->data[timebinMin];
1384 b1 = brespS->data[timebinMax];
1386 aS = a0 + ( a1 - a0 ) * timeScaled;
1387 bS =
b0 + (
b1 -
b0 ) * timeScaled;
1394 sumPX->data[
count] += aT * aV / vari;
1395 sumPY->data[
count] += aT * bV / vari;
1396 sumPB->data[
count] += aT * aS / vari;
1397 sumPL->data[
count] += aT * bS / vari;
1399 sumCY->data[
count] += bT * bV / vari;
1400 sumCB->data[
count] += bT * aS / vari;
1401 sumCL->data[
count] += bT * bS / vari;
1403 sumXB->data[
count] += aV * aS / vari;
1404 sumXL->data[
count] += aV * bS / vari;
1406 sumYL->data[
count] += bV * bS / vari;
1417 vari =
data->varTimeData->data->data[
j];
1418 sumPWhite->
data[
count] += aT * aT / vari;
1419 sumCWhite->
data[
count] += bT * bT / vari;
1420 sumPCWhite->
data[
count] += aT * bT / vari;
1424 sumXWhite->
data[
count] += aV * aV / vari;
1425 sumYWhite->
data[
count] += bV * bV / vari;
1426 sumBWhite->
data[
count] += aS * aS / vari;
1427 sumLWhite->
data[
count] += bS * bS / vari;
1429 sumPXWhite->data[
count] += aT * aV / vari;
1430 sumPYWhite->data[
count] += aT * bV / vari;
1431 sumPBWhite->data[
count] += aT * aS / vari;
1432 sumPLWhite->data[
count] += aT * bS / vari;
1433 sumCXWhite->
data[
count] += bT * aV / vari;
1434 sumCYWhite->data[
count] += bT * bV / vari;
1435 sumCBWhite->data[
count] += bT * aS / vari;
1436 sumCLWhite->data[
count] += bT * bS / vari;
1437 sumXYWhite->
data[
count] += aV * bV / vari;
1438 sumXBWhite->data[
count] += aV * aS / vari;
1439 sumXLWhite->data[
count] += aV * bS / vari;
1440 sumYBWhite->
data[
count] += bV * aS / vari;
1441 sumYLWhite->data[
count] += bV * bS / vari;
1442 sumBLWhite->
data[
count] += aS * bS / vari;
1516 ifomodel = ifomodel->
next;
1539 UINT4 modecount = 0;
1542 CHAR *startloc = strchr( meanstr,
'[' );
1547 CHAR strpart[16384];
1555 if ( !strpart[0] ) {
1562 if ( meantoc->
nTokens != npars ) {
1563 XLAL_PRINT_WARNING(
"Warning... number of means parameters specified for GMM is not consistent with number of parameters.\n" );
1564 for (
INT4 k = modecount - 1;
k > -1;
k-- ) {
1572 meanmat[modecount]->
data[
j] = atof( meantoc->
tokens[
j] );
1575 startloc = closeloc;
1580 if ( modecount != nmodes ) {
1581 XLAL_PRINT_WARNING(
"Warning... number of means values specified for GMM is not consistent with number of modes.\n" );
1582 for (
INT4 k = modecount - 1;
k > -1;
k-- ) {
1610 UINT4 modecount = 0;
1613 CHAR *startloc = strchr( covstr,
'[' );
1618 CHAR strpart[16384];
1621 gsl_matrix **covmat;
1622 covmat =
XLALCalloc( nmodes,
sizeof( gsl_matrix * ) );
1625 CHAR *openloc = strstr( startloc + 1,
"[[" );
1631 CHAR *closeloc = strstr( openloc + 1,
"]]" );
1636 strncpy( strpart, openloc + 1, ( closeloc - openloc ) );
1637 strpart[( closeloc - openloc )] =
'\0';
1639 CHAR *newstartloc = strpart;
1643 covmat[modecount] = gsl_matrix_alloc( npars, npars );
1646 CHAR newstrpart[8192];
1649 if ( !newstrpart[0] ) {
1653 if ( parcount > npars ) {
1654 XLAL_PRINT_WARNING(
"Warning... number of covariance parameters specified for GMM is not consistent with number of parameters.\n" );
1655 for (
INT4 k = modecount;
k > -1;
k-- ) {
1656 gsl_matrix_free( covmat[
k] );
1662 newstartloc = newcloseloc;
1667 if ( covtoc->
nTokens != npars ) {
1668 XLAL_PRINT_WARNING(
"Warning... number of means parameters specified for GMM is not consistent with number of parameters.\n" );
1669 for (
INT4 k = modecount;
k > -1;
k-- ) {
1670 gsl_matrix_free( covmat[
k] );
1677 gsl_matrix_set( covmat[modecount], parcount,
j, atof( covtoc->
tokens[
j] ) );
1683 startloc = closeloc;
1687 if ( modecount != nmodes ) {
1688 XLAL_PRINT_WARNING(
"Warning... number of means values specified for GMM is not consistent with number of modes.\n" );
1689 for (
INT4 k = modecount;
k > -1;
k-- ) {
1690 gsl_matrix_free( covmat[
k] );
1703 CHAR *openpar = strchr( bstr, openbracket );
1704 CHAR *closepar = strchr( bstr + 1, closebracket );
1706 if ( !openpar || !closepar ) {
1711 strncpy(
dest, openpar + 1, ( closepar - openpar ) - 1 );
1712 dest[( closepar - openpar ) - 1] =
'\0';
1715 return closepar + 1;
1723 for (
i = 0;
i < nthreads;
i++ ) {
1728 thread->
GSLrandom = gsl_rng_alloc( gsl_rng_mt19937 );
1729 randomseed = gsl_rng_get( state->
GSLrandom );
1730 gsl_rng_set( thread->
GSLrandom, randomseed );
#define __func__
log an I/O error, i.e.
const REAL8Vector * PulsarGetREAL8VectorParam(const PulsarParameters *pars, const CHAR *name)
Return a REAL8Vector parameter.
int PulsarCheckParam(const PulsarParameters *pars, const CHAR *name)
Check for the existence of the parameter name in the PulsarParameters structure.
LALStringVector * XLALReadTEMPOCorFile(REAL8Array *cormat, CHAR *corfile)
This function will read in a TEMPO-style parameter correlation matrix.
REAL8 PulsarGetREAL8Param(const PulsarParameters *pars, const CHAR *name)
Return a REAL8 parameter.
const CHAR * PulsarGetStringParam(const PulsarParameters *pars, const CHAR *name)
Return a string parameter.
REAL8 PulsarGetREAL8VectorParamIndividual(const PulsarParameters *pars, const CHAR *name)
Return an individual REAL8 value from a REAL8Vector parameter.
REAL8Array * XLALCreateREAL8Array(UINT4Vector *)
char * XLALFileLoad(const char *path)
void LALInferenceAddVariable(LALInferenceVariables *vars, const char *name, const void *value, LALInferenceVariableType type, LALInferenceParamVaryType vary)
LALInferenceThreadState * LALInferenceInitThreads(INT4 nthreads)
REAL8 LALInferenceGetREAL8Variable(LALInferenceVariables *vars, const char *name)
LALInferenceParamVaryType
void LALInferenceCopyVariables(LALInferenceVariables *origin, LALInferenceVariables *target)
void * LALInferenceGetVariable(const LALInferenceVariables *vars, const char *name)
ProcessParamsTable * LALInferenceGetProcParamVal(ProcessParamsTable *procparams, const char *name)
void LALInferenceSetParamVaryType(LALInferenceVariables *vars, const char *name, LALInferenceParamVaryType vary)
void LALInferenceLogSampleToArray(LALInferenceVariables *algorithmParams, LALInferenceVariables *vars)
int LALInferenceCheckVariable(LALInferenceVariables *vars, const char *name)
LALINFERENCE_PARAM_OUTPUT
LALINFERENCE_PARAM_LINEAR
LALINFERENCE_REAL8Vector_t
LALINFERENCE_COMPLEX16Vector_t
void LALInferenceNestedSamplingAlgorithm(LALInferenceRunState *runState)
void LALInferenceSetupLivePointsArray(LALInferenceRunState *runState)
void LALInferenceAddGaussianPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 *mu, REAL8 *sigma, LALInferenceVariableType type)
void LALInferenceAddGMMPrior(LALInferenceVariables *priorArgs, const char *name, REAL8Vector ***mus, gsl_matrix ***covs, REAL8Vector **weights, REAL8Vector **minrange, REAL8Vector **maxrange)
void LALInferenceAddMinMaxPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 *min, REAL8 *max, LALInferenceVariableType type)
void LALInferenceAddLogUniformPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 *xmin, REAL8 *xmax, LALInferenceVariableType type)
void LALInferenceRemoveGaussianPrior(LALInferenceVariables *priorArgs, const char *name)
int LALInferenceCheckGaussianPrior(LALInferenceVariables *priorArgs, const char *name)
void LALInferenceGetGaussianPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 *mu, REAL8 *sigma)
void LALInferenceAddCorrelatedPrior(LALInferenceVariables *priorArgs, const char *name, gsl_matrix **cor, REAL8 *mu, REAL8 *sigma, UINT4 *idx)
void LALInferenceAddFermiDiracPrior(LALInferenceVariables *priorArgs, const char *name, REAL8 *sigma, REAL8 *r, LALInferenceVariableType type)
REAL8 LALInferenceEnsembleStretchFull(LALInferenceThreadState *thread, LALInferenceVariables *cp, LALInferenceVariables *proposedParams)
const char *const frequencyBinJumpName
REAL8 LALInferenceEnsembleWalkFull(LALInferenceThreadState *thread, LALInferenceVariables *cp, LALInferenceVariables *proposedParams)
const char *const drawFlatPriorName
void LALInferenceAddProposalToCycle(LALInferenceProposalCycle *cycle, LALInferenceProposal *prop, INT4 weight)
void LALInferenceZeroProposalStats(LALInferenceProposalCycle *cycle)
const char *const ensembleWalkFullName
void LALInferenceRandomizeProposalCycle(LALInferenceProposalCycle *cycle, gsl_rng *rng)
LALInferenceProposal * LALInferenceInitProposal(LALInferenceProposalFunction func, const char *name)
REAL8 LALInferenceDifferentialEvolutionFull(LALInferenceThreadState *thread, LALInferenceVariables *currentParams, LALInferenceVariables *proposedParams)
REAL8 LALInferenceDrawFlatPrior(LALInferenceThreadState *thread, LALInferenceVariables *currentParams, LALInferenceVariables *proposedParams)
LALInferenceProposalCycle * LALInferenceInitProposalCycle(void)
REAL8 LALInferenceCyclicProposal(LALInferenceThreadState *thread, LALInferenceVariables *currentParams, LALInferenceVariables *proposedParams)
const char *const ensembleStretchFullName
REAL8 LALInferenceFrequencyBinJump(LALInferenceThreadState *thread, LALInferenceVariables *currentParams, LALInferenceVariables *proposedParams)
const char *const differentialEvolutionFullName
void * XLALCalloc(size_t m, size_t n)
char char * XLALStringDuplicate(const char *s)
int XLALStringCaseCompare(const char *s1, const char *s2)
int char * XLALStringAppend(char *s, const char *append)
void XLALDestroyStringVector(LALStringVector *vect)
LALStringVector * XLALAppendString2Vector(LALStringVector *vect, const CHAR *string)
void XLALDestroyUINT4Vector(UINT4Vector *vector)
REAL8Vector * XLALCreateREAL8Vector(UINT4 length)
COMPLEX16Vector * XLALCreateCOMPLEX16Vector(UINT4 length)
void XLALDestroyREAL8Vector(REAL8Vector *vector)
UINT4Vector * XLALCreateUINT4Vector(UINT4 length)
#define XLAL_ERROR_VOID(...)
#define XLAL_PRINT_WARNING(...)
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
CHAR * get_bracketed_string(CHAR *dest, const CHAR *bstr, int openbracket, int closebracket)
void initialise_proposal(LALInferenceRunState *runState)
Initialise the MCMC proposal distribution for sampling new points.
void add_correlation_matrix(LALInferenceVariables *ini, LALInferenceVariables *priors, REAL8Array *corMat, LALStringVector *parMat)
Adds a correlation matrix for a multi-variate Gaussian prior.
static const CHAR a2A[256]
Array for conversion from lowercase to uppercase.
static void strtoupper(CHAR *s)
Convert string to uppercase.
void initialise_prior(LALInferenceRunState *runState)
Sets up the parameters to be searched over and their prior ranges.
void sum_data(LALInferenceRunState *runState)
Calculates the sum of the square of the data and model terms.
void add_initial_variables(LALInferenceVariables *ini, PulsarParameters *pars)
Set up all the allowed variables for a known pulsar search This functions sets up all possible variab...
void setup_lookup_tables(LALInferenceRunState *runState, LALSource *source)
Sets the time angle antenna response lookup table.
void initialise_threads(LALInferenceRunState *state, INT4 nthreads)
void initialise_algorithm(LALInferenceRunState *runState)
Initialises the nested sampling algorithm control.
gsl_matrix ** parse_gmm_covs(CHAR *covstr, UINT4 npars, UINT4 nmodes)
Parse data from a prior file containing Gaussian Mixture Model covariance matrix values.
void setup_live_points_array_wrapper(LALInferenceRunState *runState)
A wrapper around LALInferenceSetupLivePointsArray.
void nested_sampling_algorithm_wrapper(LALInferenceRunState *runState)
A wrapper around LALInferenceNestedSamplingAlgorithm.
REAL8Vector ** parse_gmm_means(CHAR *meanstr, UINT4 npars, UINT4 nmodes)
Parse data from a prior file containing Gaussian Mixture Model mean values.
Header file for the initialisation functions for the parameter estimation code for known pulsar searc...
void add_variable_parameter(PulsarParameters *params, LALInferenceVariables *var, const CHAR *parname, LALInferenceParamVaryType vary)
Add a REAL8 parameter from a PulsarParameters variable into a LALInferenceVariable.
void response_lookup_table(REAL8 t0, LALDetAndSource detNSource, INT4 timeSteps, REAL8 avedt, REAL8Vector *aT, REAL8Vector *bT, REAL8Vector *aV, REAL8Vector *bV, REAL8Vector *aS, REAL8Vector *bS)
Creates a lookup table of the detector antenna pattern.
#define IFO_XTRA_DATA(ifo)
void samples_prior(LALInferenceRunState *runState)
Read in an ascii text file of nested samples, convert to posterior samples and create k-d tree.
void check_and_add_fixed_variable(LALInferenceVariables *vars, const char *name, void *value, LALInferenceVariableType type)
Add a variable, checking first if it already exists and is of type LALINFERENCE_PARAM_FIXED and if so...
LALStringVector * corlist
#define NUMGLITCHPARS
The total number of glitch parameters that can define a signal.
#define NUMSKYPARS
The total number of sky position parameters that can define a signal e.g.
static const CHAR binpars[NUMBINPARS][VARNAME_MAX]
A list of the binary system parameters.
#define TIMEBINS
Default number of bins in time (over one sidereal day) for the time vs.
#define NUMAMPPARS
The total number of 'amplitude' parameters that can define a signal e.g.
static const CHAR amppars[NUMAMPPARS][VARNAME_MAX]
A list of the amplitude parameters.
static const CHAR glitchpars[NUMGLITCHPARS][VARNAME_MAX]
A list of the glitch parameters.
#define NUMBINPARS
The total number of binary system parameters that can define a signal e.g.
static const CHAR skypars[NUMSKYPARS][VARNAME_MAX]
A list of the sky position parameters.
const LALDetector * pDetector
struct tagLALInferenceIFOData * next
struct tagLALInferenceIFOModel * next
LALInferenceVariables * params
LALInferenceIFOModel * ifo
ProcessParamsTable * commandLine
LALInferenceVariables * proposalArgs
LALInferenceVariables * algorithmParams
struct tagLALInferenceIFOData * data
LALInferenceVariables * priorArgs
LALInferenceThreadState * threads
LALInferenceLogFunction logsample
LALInferenceVariables * currentParams
LALInferenceVariables * priorArgs
LALInferenceModel * model
size_t differentialPointsLength
LALInferenceProposalFunction proposal
LALInferenceProposalCycle * cycle
LALInferenceVariables * proposalArgs
size_t differentialPointsSize
LALInferenceVariables ** differentialPoints
struct tagVariableItem * next
LALInferenceVariableItem * head
The PulsarParameters structure to contain a set of pulsar parameters.