Commit ffa1c570 authored by David Keitel's avatar David Keitel
Browse files

Merge branch 'remove-deprecated-options' into 'master'

Remove deprecated/defunct command-line options from LALApps CW codes

See merge request lscsoft/lalsuite!1376
parents 6ff25085 ff31c23f
......@@ -124,7 +124,6 @@ typedef struct {
UINT4 Dterms; /**< size of Dirichlet kernel for Fstat calculation */
UINT4 DtermsRecalc; /**< Recalc: size of Dirichlet kernel for Fstat calculation */
LALStringVector* assumeSqrtSX; /**< Assume stationary Gaussian noise with detector noise-floors sqrt{SX}" */
BOOLEAN SignalOnly; /**< DEPRECATED: ALTERNATIVE switch to assume Sh=1 instead of estimating noise-floors from SFTs */
/* parameters describing the coherent data-segments */
REAL8 tStack; /**< duration of stacks */
UINT4 nStacks; /**< number of stacks */
......@@ -368,7 +367,6 @@ int main( int argc, char *argv[]) {
BOOLEAN uvar_semiCohToplist = TRUE; /* if overall first stage candidates are to be output */
LALStringVector* uvar_assumeSqrtSX = NULL; /* Assume stationary Gaussian noise with detector noise-floors sqrt{SX}" */
BOOLEAN uvar_SignalOnly = FALSE; /* DEPRECATED: ALTERNATIVE switch to assume Sh=1 instead of estimating noise-floors from SFTs */
BOOLEAN uvar_recalcToplistStats = FALSE; /* Do additional analysis for all toplist candidates, output F, FXvector for postprocessing */
BOOLEAN uvar_loudestSegOutput = FALSE; /* output extra info about loudest segment; requires recalcToplistStats */
......@@ -509,7 +507,6 @@ int main( int argc, char *argv[]) {
XLAL_CHECK_MAIN( XLALRegisterNamedUvar( &uvar_printFstat1, "printFstat1", BOOLEAN, 0, OPTIONAL, "Print 1st stage Fstat vectors") == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_MAIN( XLALRegisterNamedUvar( &uvar_assumeSqrtSX, "assumeSqrtSX", STRINGVector, 0, OPTIONAL, "Don't estimate noise-floors but assume (stationary) per-IFO sqrt{SX} (if single value: use for all IFOs)") == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_MAIN( XLALRegisterNamedUvar( &uvar_SignalOnly, "SignalOnly", BOOLEAN, 'S', DEPRECATED, "DEPRECATED ALTERNATIVE: Don't estimate noise-floors but assume sqrtSX=1 instead") == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_MAIN( XLALRegisterNamedUvar( &uvar_nStacksMax, "nStacksMax", INT4, 0, OPTIONAL, "Maximum No. of segments" ) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_MAIN( XLALRegisterNamedUvar( &uvar_tStack, "tStack", REAL8, 'T', OPTIONAL, "Duration of segments (sec)" ) == XLAL_SUCCESS, XLAL_EFUNC);
......@@ -597,9 +594,6 @@ int main( int argc, char *argv[]) {
return( HIERARCHICALSEARCH_EVAL );
}
/* check SignalOnly and assumeSqrtSX */
XLAL_CHECK_MAIN ( !uvar_SignalOnly || (uvar_assumeSqrtSX == NULL), XLAL_EINVAL, "Cannot pass --SignalOnly AND --assumeSqrtSX at the same time!\n");
/* 2F threshold for semicoherent stage */
#ifndef EXP_NO_NUM_COUNT
REAL4 TwoFthreshold = 2.0 * uvar_ThrF;
......@@ -788,7 +782,6 @@ int main( int argc, char *argv[]) {
usefulParams.Dterms = uvar_Dterms;
usefulParams.DtermsRecalc = uvar_DtermsRecalc;
usefulParams.assumeSqrtSX = uvar_assumeSqrtSX;
usefulParams.SignalOnly = uvar_SignalOnly;
usefulParams.SSBprec = uvar_SSBprecision;
usefulParams.Fmethod = uvar_FstatMethod;
usefulParams.FmethodRecalc = uvar_FstatMethodRecalc;
......@@ -1525,13 +1518,6 @@ int main( int argc, char *argv[]) {
XLALPrintError ("%s: XLALComputeFstat() failed with errno=%d\n", __func__, xlalErrno );
return xlalErrno;
}
/* if single-only flag is given, add +4 to F-statistic */
if ( uvar_SignalOnly ) {
if (XLALAdd4ToFstatResults(Fstat_res) != XLAL_SUCCESS) {
XLALPrintError ("%s: XLALAdd4ToFstatResults() failed with errno=%d\n", __func__, xlalErrno );
return xlalErrno;
}
}
/* Loop over coarse-grid frequency bins */
for (ifreq = 0; ifreq < Fstat_res->numFreqBins; ifreq++) {
......@@ -2287,16 +2273,9 @@ void SetUpSFTs( LALStatus *status, /**< pointer to LALStatus structure */
/* loop over segments and read sfts */
for (k = 0; k < in->nStacks; k++) {
/* if single-only flag is given, assume a PSD with sqrt(S) = 1.0 */
/* if flag is given, assume a PSD with sqrt(S) = 1.0 */
MultiNoiseFloor s_assumeSqrtSX;
if ( in->SignalOnly ) {
const SFTCatalog *catalog_k = &(catalogSeq.data[k]);
s_assumeSqrtSX.length = XLALCountIFOsInCatalog ( catalog_k );
for (UINT4 X = 0; X < s_assumeSqrtSX.length; ++X) {
s_assumeSqrtSX.sqrtSn[X] = 1.0;
}
optionalArgs.assumeSqrtSX = &s_assumeSqrtSX;
} else if ( in->assumeSqrtSX != NULL ) {
if ( in->assumeSqrtSX != NULL ) {
const SFTCatalog *catalog_k = &(catalogSeq.data[k]);
LALStringVector *detectorIDs_k = NULL;
if ( ( detectorIDs_k = XLALListIFOsInCatalog( catalog_k ) ) == NULL ) {
......
......@@ -144,8 +144,6 @@ typedef struct
INT4 randSeed; /**< allow user to specify random-number seed for reproducible noise-realizations */
// ---------- DEPRECATED and DEFUNCT options ----------
CHAR *TDDframedir; /**< DEPRECATED: use outFrameDir instead */
} UserVariables_t;
......@@ -589,11 +587,7 @@ XLALInitMakefakedata ( ConfigVars_t *cfg, UserVariables_t *uvar )
} // for X < numDetectors
} // if inFrames
// if user requested timeseries *output* to frame files, handle deprecated options
XLAL_CHECK ( !(uvar->TDDframedir && uvar->outFrameDir), XLAL_EINVAL, "Specify only ONE of {--TDDframedir or --outFrameDir} or NONE\n");
if ( uvar->TDDframedir ) {
cfg->outFrameDir = uvar->TDDframedir;
} else if ( uvar->outFrameDir ) {
if ( uvar->outFrameDir ) {
cfg->outFrameDir = uvar->outFrameDir;
}
#endif
......@@ -677,15 +671,6 @@ XLALInitUserVars ( UserVariables_t *uvar, int argc, char *argv[] )
XLALRegisterUvarMember( randSeed, INT4, 0, DEVELOPER, "Specify random-number seed for reproducible noise (0 means use /dev/urandom for seeding).");
XLALRegisterUvarMember( sourceDeltaT, REAL8, 0, DEVELOPER, "Source-frame sampling period. '0' implies previous internal defaults" );
// ----- deprecated but still supported options [throw warning if used] (only shown in help at lalDebugLevel >= info) ----------
#ifdef HAVE_LIBLALFRAME
XLALRegisterUvarMember ( TDDframedir, STRING, 0, DEPRECATED, "Use --outFrameDir instead");
#else
XLALRegisterUvarMember ( TDDframedir, STRING, 0, DEFUNCT, "Need to compile with lalframe support. BUT this option is deprecated and --outFrameDir should be used instead");
#endif
// ----- obsolete and unsupported options [throw error if used] (never shown in help) ----------
/* read cmdline & cfgfile */
BOOLEAN should_exit = 0;
XLAL_CHECK( XLALUserVarReadAllInput( &should_exit, argc, argv, lalAppsVCSInfoList ) == XLAL_SUCCESS, XLAL_EFUNC );
......
......@@ -77,7 +77,6 @@ typedef struct
CHAR *ephemSun; /**< Sun ephemeris file to use */
LALStringVector* timeGPS; /**< GPS timestamps to compute detector state for (REAL8 format) */
CHAR *timeStampsFile; /**< alternative: read in timestamps from a single file (deprecated) */
LALStringVector *timeStampsFiles; /**< alternative: read in timestamps from file(s) */
INT4 Tsft; /**< assumed length of SFTs, needed for offset to timestamps when comparing to CFS_v2, PFS etc */
......@@ -286,7 +285,6 @@ XLALInitUserVars ( UserVariables_t *uvar )
uvar->skyGridFile = NULL;
uvar->timeGPS = NULL;
uvar->timeStampsFile = NULL;
uvar->outab = 0;
uvar->outABCD = 0;
uvar->singleIFOweighting = 0;
......@@ -315,9 +313,6 @@ XLALInitUserVars ( UserVariables_t *uvar )
XLALRegisterUvarMember( outab, STRING, 'o', OPTIONAL, "output file for antenna pattern functions a(t), b(t) at each timestamp");
XLALRegisterUvarMember( outABCD, STRING, 'O', OPTIONAL, "output file for antenna pattern matrix elements A, B, C, D averaged over timestamps");
/* developer user variables */
XLALRegisterUvarMember( timeStampsFile, STRING, 0, OPTIONAL, "Alternative: single time-stamps file (deprecated, use --timeStampsFiles instead");
return XLAL_SUCCESS;
} /* XLALInitUserVars() */
......@@ -340,13 +335,10 @@ XLALInitCode ( ConfigVariables *cfg, const UserVariables_t *uvar, const char *ap
XLAL_CHECK ( (cfg->numTimeStampsX = XLALCreateUINT4Vector ( cfg->numDetectors )) != NULL, XLAL_EFUNC, "XLALCreateREAL8Vector(%d) failed.", cfg->numDetectors );
BOOLEAN haveTimeGPS = XLALUserVarWasSet( &uvar->timeGPS );
BOOLEAN haveTimeStampsFile = XLALUserVarWasSet( &uvar->timeStampsFile );
BOOLEAN haveTimeStampsFiles = XLALUserVarWasSet( &uvar->timeStampsFiles );
XLAL_CHECK ( !(haveTimeStampsFiles && haveTimeStampsFile), XLAL_EINVAL, "Can't handle both timeStampsFiles and (deprecated) haveTimeStampsFiles input options." );
XLAL_CHECK ( !(haveTimeGPS && haveTimeStampsFile), XLAL_EINVAL, "Can't handle both (deprecated) timeStampsFile and timeGPS input options." );
XLAL_CHECK ( !(haveTimeGPS && haveTimeStampsFiles), XLAL_EINVAL, "Can't handle both timeStampsFiles and timeGPS input options." );
XLAL_CHECK ( haveTimeGPS || haveTimeStampsFiles || haveTimeStampsFile, XLAL_EINVAL, "Need either timeStampsFiles or timeGPS input option." );
XLAL_CHECK ( haveTimeGPS || haveTimeStampsFiles, XLAL_EINVAL, "Need either timeStampsFiles or timeGPS input option." );
if ( haveTimeStampsFiles ) {
XLAL_CHECK ( (uvar->timeStampsFiles->length == 1 ) || ( uvar->timeStampsFiles->length == cfg->numDetectors ), XLAL_EINVAL, "Length of timeStampsFiles list is neither 1 (one file for all detectors) nor does it match the number of detectors. (%d != %d)", uvar->timeStampsFiles->length, cfg->numDetectors );
XLAL_CHECK ( (uvar->timeStampsFiles->length == 1 ) || !uvar->outab, XLAL_EINVAL, "At the moment, can't produce a(t), b(t) output (--outab) when given per-IFO --timeStampsFiles.");
......@@ -388,9 +380,6 @@ XLALInitCode ( ConfigVariables *cfg, const UserVariables_t *uvar, const char *ap
if ( haveTimeStampsFiles ) {
singleTimeStampsFile = uvar->timeStampsFiles->data[0];
}
else if ( haveTimeStampsFile ) {
singleTimeStampsFile = uvar->timeStampsFile;
}
XLAL_CHECK ( ( cfg->multiTimestamps->data[0] = XLALReadTimestampsFile ( singleTimeStampsFile ) ) != NULL, XLAL_EFUNC );
nTS = cfg->multiTimestamps->data[0]->length;
......
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