Commit 045c9041 authored by Miroslav Shaltev's avatar Miroslav Shaltev
Browse files

fix ext spin range in setupsfts

parent 209c4915
......@@ -888,7 +888,7 @@ void FStatNomad::SetUpSFTs( LALStatus *status, /**< pointer to LALStatus struc
UsefulStageVariables *in, /**< input params */
LALSegList *segList)
{
printf("YYYYYYYYYYYYYYYYYYYYYYYYY SetUpSFTs\n");
printf("SetUpSFTs\n");
static SFTConstraints constraints;
REAL8 timebase, tObs, deltaFsft;
UINT4 k,numSFT;
......@@ -926,8 +926,6 @@ printf("YYYYYYYYYYYYYYYYYYYYYYYYY SetUpSFTs\n");
timebase = 1.0/deltaFsft;
/* get sft catalogs for each stack */
// if ( in->segmentList ) /* if segment list was given by user */
// {
SFTCatalogSequence *catalogSeq_p;
if ( (catalogSeq_p = XLALSetUpStacksFromSegmentList ( catalog, segList )) == NULL ) {
XLALPrintError ( "%s: XLALSetUpStacksFromSegmentList() failed to set up segments from given list.\n", __func__ );
......@@ -948,11 +946,6 @@ printf("YYYYYYYYYYYYYYYYYYYYYYYYY SetUpSFTs\n");
}
in->tStack = maxT;
printf("in->tStack: %f\n",in->tStack);
// }
// else /* set up nStacks segments of fixed span tStack */
// {
// TRY( SetUpStacks( status->statusPtr, &catalogSeq, in->tStack, catalog, in->nStacks), status);
// }
/* reset number of stacks */
UINT4 numSegments = catalogSeq.length;
......@@ -1022,6 +1015,7 @@ printf("YYYYYYYYYYYYYYYYYYYYYYYYY SetUpSFTs\n");
tEnd8 = XLALGPSGetREAL8( &tEndGPS );
tMid8 = 0.5 * (tStart8 + tEnd8);
XLALGPSSetREAL8( &tMidGPS, tMid8 );
printf("A:%f, B:%f, C:%f\n",tStart8,tEnd8,tMid8);
}
if ( in->refTime > 0 ) {
......@@ -1031,13 +1025,14 @@ printf("YYYYYYYYYYYYYYYYYYYYYYYYY SetUpSFTs\n");
else { /* set refTime to exact midtime of the total observation-time spanned */
refTimeGPS = tMidGPS;
}
/* get frequency and fdot bands at start time of sfts by extrapolating from reftime */
in->spinRange_refTime.refTime = refTimeGPS;
XLAL_CHECK_LAL( status->statusPtr, XLALExtrapolatePulsarSpinRange( &in->spinRange_startTime,&in->spinRange_refTime, XLALGPSGetREAL8(&tStartGPS)) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_LAL( status->statusPtr, XLALExtrapolatePulsarSpinRange( &in->spinRange_endTime, &in->spinRange_refTime, XLALGPSGetREAL8(&tEndGPS)) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_LAL( status->statusPtr, XLALExtrapolatePulsarSpinRange( &in->spinRange_midTime, &in->spinRange_refTime, XLALGPSGetREAL8(&tMidGPS)) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_LAL( status->statusPtr, XLALExtrapolatePulsarSpinRange( &in->spinRange_startTime,&in->spinRange_refTime, XLALGPSDiff(&tStartGPS, &(&in->spinRange_refTime)->refTime)) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_LAL( status->statusPtr, XLALExtrapolatePulsarSpinRange( &in->spinRange_endTime, &in->spinRange_refTime, XLALGPSDiff(&tEndGPS, &(&in->spinRange_refTime)->refTime)) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_LAL( status->statusPtr, XLALExtrapolatePulsarSpinRange( &in->spinRange_midTime, &in->spinRange_refTime, XLALGPSDiff(&tMidGPS, &(&in->spinRange_refTime)->refTime)) == XLAL_SUCCESS, XLAL_EFUNC);
/* set Fstat spindown resolution (coarse grid) */
in->df1dot = HSMIN(in->df1dot, in->spinRange_midTime.fkdotBand[1]);
......
Supports Markdown
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