Commit 48c53452 authored by Ian Harry's avatar Ian Harry
Browse files

Add command line support for face-on/face-away running in coh_PTF

Original: 840bed0c7a6ffa6a7e12b1b0591515dafbbf2a9c
parent d955ea64
......@@ -201,6 +201,8 @@ struct coh_PTF_params {
int doSnglChiSquared;
int singlePolFlag;
int clusterFlag;
int faceOnAnalysis;
int faceAwayAnalysis;
/* write intermediate result flags */
int writeRawData;
int writeProcessedData;
......
......@@ -970,6 +970,10 @@ int main(int argc, char **argv)
Fplus[ifoNumber] = (REAL4) FplusTmp;
Fcross[ifoNumber] = (REAL4) FcrossTmp;
}
if (params->faceAwayAnalysis && params->faceOnAnalysis)
{
params->faceOnStatistic = 1;
}
// This function calculates the cohSNR time series and all of the
// signal based vetoes as appropriate
......@@ -997,6 +1001,36 @@ int main(int argc, char **argv)
skyPoints->data[sp].longitude,
skyPoints->data[sp].latitude,
slideIDList[j], timeOffsets);
if (params->faceAwayAnalysis && params->faceOnAnalysis)
{
params->faceOnStatistic = 2;
coh_PTF_statistic(cohSNR, PTFM, PTFqVec, params, spinTemplate,
timeOffsets, Fplus, Fcross,
j, pValues, gammaBeta, snrComps, nullSNR,
traceSNR, bankVeto, autoVeto,
chiSquare, subBankSize, bankOverlaps,
bankNormOverlaps, dataOverlaps, autoTempOverlaps,
fcTmplt, invspec, segments, invPlan,
&chisqOverlaps,&chisqSnglOverlaps, frequencyRangesPlus,
frequencyRangesCross, startTime);
verbose("Made coherent statistic for segment %d, template %d, "
"sky point %d at %ld \n", j, i, sp,
timeval_subtract(&startTime));
eventId = coh_PTF_add_triggers(params, &eventList, &thisEvent,
cohSNR, *PTFtemplate, eventId,
spinTemplate,
pValues, gammaBeta, snrComps,
nullSNR, traceSNR, bankVeto,
autoVeto, chiSquare, PTFM,
skyPoints->data[sp].longitude,
skyPoints->data[sp].latitude,
slideIDList[j], timeOffsets);
}
params->numEvents = XLALCountMultiInspiral(eventList);
verbose("There are currently %d triggers.\n", params->numEvents);
verbose("Generated triggers for segment %d, template %d, sky point %d at %ld \n", j, i, sp, timeval_subtract(&startTime));
......@@ -2343,7 +2377,7 @@ UINT8 coh_PTF_add_triggers(
MultiInspiralTable *lastEvent = *thisEvent;
MultiInspiralTable *currEvent = NULL;
UINT4 numDOF = 4;
if ( params->singlePolFlag)
if ( params->singlePolFlag || params->faceOnStatistic )
numDOF = 2;
REAL4 cohSNRThreshold = params->threshold;
......@@ -2611,6 +2645,10 @@ UINT8 coh_PTF_add_triggers(
params->ifoName[0], params->ifoName[1], params->ifoName[2],
params->ifoName[3]);
}
if (params->faceOnStatistic == 2)
{
currEvent->inclination = LAL_PI/2.;
}
/* And add the trigger to the lists. IF it passes clustering! */
if (!*eventList)
......
......@@ -52,6 +52,8 @@ int coh_PTF_parse_options(struct coh_PTF_params *params,int argc,char **argv )
{"l1-data", no_argument, &(localparams.haveTrig[LAL_IFO_L1]),1},
/* {"t1-data", no_argument, &(haveTrig[LAL_IFO_T1]), 1 },*/
{"v1-data", no_argument, &(localparams.haveTrig[LAL_IFO_V1]),1},
{"face-on-analysis", no_argument, &(localparams.faceOnAnalysis),1},
{"face-away-analysis", no_argument, &(localparams.faceAwayAnalysis),1},
{ "help", no_argument, 0, 'h' },
{ "version", no_argument, 0, 'V' },
{ "simulated-data", required_argument, 0, '6' },
......@@ -511,6 +513,16 @@ int coh_PTF_parse_options(struct coh_PTF_params *params,int argc,char **argv )
}
}
}
/* Set the faceOn-faceAway flag */
if (localparams.faceOnAnalysis)
{
params->faceOnStatistic = 1;
}
else if (localparams.faceAwayAnalysis)
{
params->faceOnStatistic = 2;
}
// Otherwise it takes default value of 0
*params = localparams;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment