Commit c58a877e authored by Reinhard Prix's avatar Reinhard Prix
Browse files

ComputeFstat: various minor cleanup edits

- testGCT.sh: change Fstat method used to 'best' instead of 'OptC'
- ComputeFstatTest: avoid re-running redundant tests on 'best' methods
- ComputeFstatBenchmark: removed unused option 'runBuffered'
- minor efficiency improvement in XLALComputeFstatFromFaFb()
- ComputeFstatBenchmark: output info file for any 'resamp' method
- ComputeFstat_Resamp: removed now-unused MultiUINT4Vector type
- refs #2001
Original: 4fb7578c9cb3fbbee291c9491ea93203e590bbf6
parent 6762f25a
......@@ -299,7 +299,7 @@ rm -f checkpoint.cpt # delete checkpoint to start correctly
outfile_GCT_DM="${testDir}/GCT_DM.dat"
timingsfile_DM="${testDir}/timing_DM.dat"
cmdline="$gct_code $gct_CL_common --FstatMethod=DemodOptC --fnameout='$outfile_GCT_DM' --outputTiming='$timingsfile_DM' ${BSGL_flags}"
cmdline="$gct_code $gct_CL_common --FstatMethod=DemodBest --fnameout='$outfile_GCT_DM' --outputTiming='$timingsfile_DM' ${BSGL_flags}"
if [ -n "$DEBUG" ]; then
cmdline="$cmdline"
else
......@@ -331,7 +331,7 @@ rm -f checkpoint.cpt # delete checkpoint to start correctly
outfile_GCT_DM_BSGL="${testDir}/GCT_DM_BSGL.dat"
timingsfile_DM_BSGL="${testDir}/timing_DM_BSGL.dat"
cmdline="$gct_code $gct_CL_common --FstatMethod=DemodOptC ${BSGL_flags} --SortToplist=2 --fnameout='$outfile_GCT_DM_BSGL' --outputTiming='$timingsfile_DM_BSGL'"
cmdline="$gct_code $gct_CL_common --FstatMethod=DemodBest ${BSGL_flags} --SortToplist=2 --fnameout='$outfile_GCT_DM_BSGL' --outputTiming='$timingsfile_DM_BSGL'"
if [ -n "$DEBUG" ]; then
cmdline="$cmdline"
else
......@@ -360,7 +360,7 @@ rm -f checkpoint.cpt # delete checkpoint to start correctly
outfile_GCT_DM_DUAL="${testDir}/GCT_DM_DUAL.dat"
timingsfile_DM_DUAL="${testDir}/timing_DM_DUAL.dat"
cmdline="$gct_code $gct_CL_common --FstatMethod=DemodOptC --SortToplist=3 ${BSGL_flags} --fnameout='$outfile_GCT_DM_DUAL' --outputTiming='$timingsfile_DM_DUAL'"
cmdline="$gct_code $gct_CL_common --FstatMethod=DemodBest --SortToplist=3 ${BSGL_flags} --fnameout='$outfile_GCT_DM_DUAL' --outputTiming='$timingsfile_DM_DUAL'"
if [ -n "$DEBUG" ]; then
cmdline="$cmdline"
else
......
......@@ -58,11 +58,6 @@
#define COLLECT_TIMING 1
// ----- local types ----------
typedef struct tagMultiUINT4Vector
{
UINT4 length;
UINT4Vector **data;
} MultiUINT4Vector;
// ----- workspace ----------
typedef struct tagResampTimingInfo
......
......@@ -70,6 +70,6 @@ XLALComputeFstatFromFaFb ( COMPLEX8 Fa, COMPLEX8 Fb, REAL4 A, REAL4 B, REAL4 C,
- 2.0 * C * ( Fa_re * Fb_re + Fa_im * Fb_im )
- 2.0 * E * ( - Fa_re * Fb_im + Fa_im * Fb_re ) // nonzero only in RAA case where Ed!=0
);
return 2*F;
return 2.0f*F;
} // ComputeFstatFromFaFb()
......@@ -48,7 +48,6 @@ typedef struct
// ----- developer options
REAL8 Tsft;
BOOLEAN runBuffered; // only useful for double-checking and Demod timing
BOOLEAN reuseInput; // only useful for checking workspace management
} UserInput_t;
......@@ -78,7 +77,6 @@ main ( int argc, char *argv[] )
uvar->numTrials = 1;
uvar->Tsft = 1800;
uvar->runBuffered = 0;
uvar->reuseInput = 1;
XLAL_CHECK ( (uvar->IFOs = XLALCreateStringVector ( "H1", NULL )) != NULL, XLAL_EFUNC );
......@@ -98,7 +96,6 @@ main ( int argc, char *argv[] )
XLAL_CHECK ( XLALRegisterUvarMember ( outputInfo, STRING, 0, OPTIONAL, "Append Resampling internal info into this file") == XLAL_SUCCESS, XLAL_EFUNC );
XLAL_CHECK ( XLALRegisterUvarMember ( Tsft, REAL8, 0, DEVELOPER, "SFT length" ) == XLAL_SUCCESS, XLAL_EFUNC );
XLAL_CHECK ( XLALRegisterUvarMember ( runBuffered, BOOLEAN, 0, DEVELOPER, "Explicitly time buffered Fstat call (only useful for double-checking and Demod timing)" ) == XLAL_SUCCESS, XLAL_EFUNC );
XLAL_CHECK ( XLALRegisterUvarMember ( reuseInput, BOOLEAN, 0, DEVELOPER, "Re-use FstatInput from previous setups (only useful for checking workspace management)" ) == XLAL_SUCCESS, XLAL_EFUNC );
XLAL_CHECK ( XLALUserVarReadAllInput(argc, argv) == XLAL_SUCCESS, XLAL_EFUNC );
......@@ -192,7 +189,7 @@ main ( int argc, char *argv[] )
optionalArgs.injectSqrtSX = &injectSqrtSX;
optionalArgs.FstatMethod = FstatMethod;
if ( (uvar->outputInfo != NULL) && (FstatMethod == FMETHOD_RESAMP_GENERIC) )
if ( (uvar->outputInfo != NULL) && (FstatMethod >= FMETHOD_RESAMP_GENERIC) )
{
XLAL_CHECK ( (optionalArgs.timingLogFile = fopen (uvar->outputInfo, "ab")) != NULL, XLAL_ESYS, "Failed to open '%s' for appending\n", uvar->outputInfo );
}
......
......@@ -181,6 +181,9 @@ main ( int argc, char *argv[] )
if ( firstMethod == FMETHOD_START ) { // keep track of first available method found
firstMethod = iMethod;
}
if ( (iMethod == FMETHOD_DEMOD_BEST) || (iMethod == FMETHOD_RESAMP_BEST) ) {
continue; // avoid re-running comparisons for same method because labelled 'best'
}
XLAL_CHECK ( XLALComputeFstat ( &results[iMethod], input[iMethod], &Doppler, numFreqBins, whatToCompute ) == XLAL_SUCCESS, XLAL_EFUNC );
......
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