Commit 5191a5de authored by Karl Wette's avatar Karl Wette
Browse files

Merge branch 'CFSv2-strictSpindownBounds' into 'master'

CFSv2 and DopplerFullScan: add strictSpindownBounds option

See merge request !1597
parents e68b028c 015b1465
Pipeline #225106 passed with stages
in 304 minutes and 18 seconds
......@@ -236,6 +236,9 @@ typedef struct {
REAL8 dorbitEcc;
REAL8 orbitEccBand;
/* extra parameters for --gridType==GRID_SPINDOWN_SQUARE */
BOOLEAN strictSpindownBounds; /**< suppress spindown grid points outside the [fkdot,fkdotBand] ranges? */
/* extra parameters for --gridType=GRID_SPINDOWN_AGEBRK parameter space */
REAL8 spindownAge; /**< spindown age of the object */
REAL8 minBraking; /**< minimum braking index */
......@@ -1021,6 +1024,8 @@ initUserVars ( UserInput_t *uvar )
uvar->timerCount = 10; /* output a timer/progress count every N seconds */
uvar->strictSpindownBounds = FALSE;
uvar->spindownAge = 0.0;
uvar->minBraking = 0.0;
uvar->maxBraking = 0.0;
......@@ -1157,6 +1162,8 @@ initUserVars ( UserInput_t *uvar )
XLALRegisterUvarMember( projectMetric, BOOLEAN, 0, DEVELOPER, "Use projected metric on Freq=const subspact");
XLALRegisterUvarMember( strictSpindownBounds, BOOLEAN, 0, DEVELOPER, "suppress spindown grid points outside the [fkdot,fkdotBand] ranges? (only supported for --gridType=8)");
XLALRegisterUvarMember( spindownAge, REAL8, 0, DEVELOPER, "Spindown age for --gridType=9");
XLALRegisterUvarMember( minBraking, REAL8, 0, DEVELOPER, "Minimum braking index for --gridType=9");
XLALRegisterUvarMember( maxBraking, REAL8, 0, DEVELOPER, "Maximum braking index for --gridType=9");
......@@ -1400,8 +1407,11 @@ InitFstat ( ConfigVariables *cfg, const UserInput_t *uvar )
XLAL_CHECK ( (detector = XLALGetSiteInfo ( catalog->data[0].header.name ) ) != NULL, XLAL_EFUNC );
scanInit.Detector = detector;
/* Specific to --gridType=GRID_SPINDOWN_AGEBRK parameter space */
if (uvar->gridType == GRID_SPINDOWN_AGEBRK) {
/* Specific options for some gridTypes */
if (uvar->gridType == GRID_SPINDOWN_SQUARE) {
scanInit.extraArgs[0] = !uvar->strictSpindownBounds;
}
else if (uvar->gridType == GRID_SPINDOWN_AGEBRK) {
scanInit.extraArgs[0] = uvar->spindownAge;
scanInit.extraArgs[1] = uvar->minBraking;
scanInit.extraArgs[2] = uvar->maxBraking;
......@@ -1907,6 +1917,11 @@ checkUserInputConsistency ( const UserInput_t *uvar )
}
if (uvar->strictSpindownBounds && ! (uvar->gridType == GRID_SPINDOWN_SQUARE) ) {
XLALPrintError("\nERROR: strictSpindownBounds can only be used with gridType=8\n\n");
XLAL_ERROR ( XLAL_EINVAL );
}
/* Specific checks for --gridType=GRID_SPINDOWN_AGEBRK parameter space */
if (uvar->gridType == GRID_SPINDOWN_AGEBRK) {
......
......@@ -190,6 +190,12 @@ XLALInitDopplerFullScan ( const DopplerFullScanInit *init /**< [in] initia
for (size_t i = 0; i < PULSAR_MAX_SPINS; ++i) {
XLAL_CHECK_NULL ( XLALSetLatticeTilingConstantBound(thisScan->spindownTiling, 2 + i, init->searchRegion.fkdot[i], init->searchRegion.fkdot[i] + init->searchRegion.fkdotBand[i]) == XLAL_SUCCESS, XLAL_EFUNC );
}
/* if requested by user, suppress padding in the fkdot (k>0) dimensions;
* if not, default padding is kept the same as in XLALCreateLatticeTiling()
*/
for (size_t i = 1; i < PULSAR_MAX_SPINS; ++i) {
XLAL_CHECK_NULL( XLALSetLatticeTilingPaddingFlags( thisScan->spindownTiling, 2 + i, init->extraArgs[0] ? ( LATTICE_TILING_PAD_LHBBX | LATTICE_TILING_PAD_UHBBX ) : LATTICE_TILING_PAD_NONE ) == XLAL_SUCCESS, XLAL_EFUNC );
}
} else if (thisScan->gridType == GRID_SPINDOWN_AGEBRK) { /* age-braking index parameter space */
......
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