Verified Commit 25913455 authored by Sebastian Khan's avatar Sebastian Khan Committed by Adam Mercer
Browse files

Merge branch 'fix-epoch-phenomXPHM' into 'master'

Fix epoch time of PhenomXHM/XPHM polarizations

See merge request lscsoft/lalsuite!1374

(cherry picked from commit 2e90e095)
parent 0ae15079
...@@ -1415,6 +1415,7 @@ static int IMRPhenomXHM_MultiMode2( ...@@ -1415,6 +1415,7 @@ static int IMRPhenomXHM_MultiMode2(
/* Coalescence time is fixed to t=0, shift by overall length in time. */ /* Coalescence time is fixed to t=0, shift by overall length in time. */
//XLAL_CHECK(XLALGPSAdd(&ligotimegps_zero, -1. / pWF->deltaF), XLAL_EFUNC, "Failed to shift the coalescence time to t=0. Tried to apply a shift of -1/df with df = %g.", pWF->deltaF); //XLAL_CHECK(XLALGPSAdd(&ligotimegps_zero, -1. / pWF->deltaF), XLAL_EFUNC, "Failed to shift the coalescence time to t=0. Tried to apply a shift of -1/df with df = %g.", pWF->deltaF);
size_t n = (htildelm)->data->length; size_t n = (htildelm)->data->length;
XLAL_CHECK(XLALGPSAdd(&ligotimegps_zero, -1. / pWF->deltaF), XLAL_EFUNC, "Failed to shift the coalescence time to t=0. Tried to apply a shift of -1/df with df = %g.", pWF->deltaF);
*hptilde = XLALCreateCOMPLEX16FrequencySeries("hptilde: FD waveform", &(ligotimegps_zero), 0.0, pWF->deltaF, &lalStrainUnit, n); *hptilde = XLALCreateCOMPLEX16FrequencySeries("hptilde: FD waveform", &(ligotimegps_zero), 0.0, pWF->deltaF, &lalStrainUnit, n);
if (!(hptilde)){ XLAL_ERROR(XLAL_EFUNC);} if (!(hptilde)){ XLAL_ERROR(XLAL_EFUNC);}
memset((*hptilde)->data->data, 0, n * sizeof(COMPLEX16)); // what is this for?? memset((*hptilde)->data->data, 0, n * sizeof(COMPLEX16)); // what is this for??
......
...@@ -686,7 +686,7 @@ int XLALSimIMRPhenomXPHMFromModes( ...@@ -686,7 +686,7 @@ int XLALSimIMRPhenomXPHMFromModes(
/* Initialize hctilde according to hptilde. */ /* Initialize hctilde according to hptilde. */
size_t npts = (*hptilde)->data->length; size_t npts = (*hptilde)->data->length;
*hctilde = XLALCreateCOMPLEX16FrequencySeries("hctilde: FD waveform", &ligotimegps_zero, (*hptilde)->f0, pWF->deltaF, &lalStrainUnit, npts); *hctilde = XLALCreateCOMPLEX16FrequencySeries("hctilde: FD waveform", &(*hptilde)->epoch, (*hptilde)->f0, pWF->deltaF, &lalStrainUnit, npts);
XLAL_CHECK (*hctilde, XLAL_ENOMEM, "Failed to allocated waveform COMPLEX16FrequencySeries of length %zu.", npts); XLAL_CHECK (*hctilde, XLAL_ENOMEM, "Failed to allocated waveform COMPLEX16FrequencySeries of length %zu.", npts);
memset((*hctilde)->data->data, 0, npts * sizeof(COMPLEX16)); memset((*hctilde)->data->data, 0, npts * sizeof(COMPLEX16));
XLALUnitMultiply(&((*hctilde)->sampleUnits), &((*hctilde)->sampleUnits), &lalSecondUnit); XLALUnitMultiply(&((*hctilde)->sampleUnits), &((*hctilde)->sampleUnits), &lalSecondUnit);
......
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