Commit 044db518 authored by megmillhouse's avatar megmillhouse

Change timeshift handling to accound for different segment start time possibilities

parent 9c2091ac
......@@ -200,6 +200,13 @@ void InjectFromMDC(ProcessParamsTable *commandLine, LALInferenceIFOData *IFOdata
}
printf("Shifting MDC by %f seconds.\n",mdc_shift);
// Read in trigtime for MDC shifting
ppt = LALInferenceGetProcParamVal(commandLine,"--trigtime");
double mdc_trigtime = atof(ppt->value);
mdc_trigtime = mdc_trigtime + mdc_shift; // actual time shift it
printf("Reading in MDC from gps time %f\n", mdc_trigtime);
LIGOTimeGPS epoch=IFOdata->timeData->epoch;
REAL8 deltaT=IFOdata->timeData->deltaT ;
......@@ -227,12 +234,7 @@ void InjectFromMDC(ProcessParamsTable *commandLine, LALInferenceIFOData *IFOdata
// MM: Update to handle MDC time sliding (i.e. use old MDCs in new noise)
LIGOTimeGPS epoch_shift;
double mdc_trigtime = (double)epoch.gpsSeconds + 1.0e-9*(double)epoch.gpsNanoSeconds;
mdc_trigtime = mdc_trigtime + 2.0 + mdc_shift; // The 2 here is for that weird segment thing
printf("Reading in MDC from gps time %f\n", mdc_trigtime);
XLALGPSSetREAL8(&epoch_shift, mdc_trigtime);
// real gps time: 1164714814.0
/* Inject into FD data stream and calculate optimal SNR */
......
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