diff --git a/lalapps/src/pulsar/Fstatistic/ComputeFstatistic_v2.c b/lalapps/src/pulsar/Fstatistic/ComputeFstatistic_v2.c index ca96bec529e81f127c113c1d5f329f10e767aecb..20b03070eb558df1b97ce650bd0b1de50506f431 100644 --- a/lalapps/src/pulsar/Fstatistic/ComputeFstatistic_v2.c +++ b/lalapps/src/pulsar/Fstatistic/ComputeFstatistic_v2.c @@ -341,7 +341,7 @@ int compareFstatCandidates ( const void *candA, const void *candB ); int compareFstatCandidates_BSGL ( const void *candA, const void *candB ); int WriteFstatLog ( const CHAR *log_fname, const CHAR *logstr ); -CHAR *XLALGetLogString ( const ConfigVariables *cfg ); +CHAR *XLALGetLogString ( const ConfigVariables *cfg, const BOOLEAN verbose ); int write_TimingInfo ( const CHAR *timingFile, const timingInfo_t *ti, const ConfigVariables *cfg ); @@ -404,7 +404,8 @@ int main(int argc,char *argv[]) XLAL_CHECK_MAIN ( InitFstat( &GV, &uvar) == XLAL_SUCCESS, XLAL_EFUNC ); /* ----- produce a log-string describing the specific run setup ----- */ - XLAL_CHECK_MAIN ( (GV.logstring = XLALGetLogString ( &GV )) != NULL, XLAL_EFUNC ); + BOOLEAN logstrVerbose = TRUE; + XLAL_CHECK_MAIN ( (GV.logstring = XLALGetLogString ( &GV, logstrVerbose )) != NULL, XLAL_EFUNC ); LogPrintfVerbatim( LOG_NORMAL, "%s", GV.logstring ); /* keep a log-file recording all relevant parameters of this search-run */ @@ -790,6 +791,8 @@ int main(int argc,char *argv[]) timing.tauFstat /= num_templates; timing.tauTemplate /= num_templates; timing.tauF0 = timing.tauFstat / timing.NSFTs; + timing.tauTransFstatMap /= num_templates; + timing.tauTransMarg /= num_templates; XLAL_CHECK_MAIN ( write_TimingInfo ( uvar.outputTiming, &timing, &GV ) == XLAL_SUCCESS, XLAL_EFUNC ); @@ -1617,7 +1620,7 @@ InitFstat ( ConfigVariables *cfg, const UserInput_t *uvar ) * Produce a log-string describing the present run-setup */ CHAR * -XLALGetLogString ( const ConfigVariables *cfg ) +XLALGetLogString ( const ConfigVariables *cfg, const BOOLEAN verbose ) { XLAL_CHECK_NULL ( cfg != NULL, XLAL_EINVAL ); @@ -1633,6 +1636,11 @@ XLALGetLogString ( const ConfigVariables *cfg ) XLAL_CHECK_NULL ( (logstr = XLALStringAppend ( logstr, "\n" )) != NULL, XLAL_EFUNC ); XLAL_CHECK_NULL ( (logstr = XLALStringAppend ( logstr, cfg->VCSInfoString )) != NULL, XLAL_EFUNC ); + if ( !verbose ) { + /* don't include search details */ + return logstr; + } + XLAL_CHECK_NULL ( snprintf ( buf, BUFLEN, "%%%% FstatMethod used: '%s'\n", XLALGetFstatInputMethodName ( cfg->Fstat_in ) ) < BUFLEN, XLAL_EBADLEN ); XLAL_CHECK_NULL ( (logstr = XLALStringAppend ( logstr, buf )) != NULL, XLAL_EFUNC ); @@ -2242,6 +2250,10 @@ write_TimingInfo ( const CHAR *fname, const timingInfo_t *ti, const ConfigVariab { XLAL_CHECK ( (fname != NULL) && (ti != NULL), XLAL_EINVAL ); + CHAR *logstr_short; + BOOLEAN logstrVerbose = FALSE; + XLAL_CHECK ( (logstr_short = XLALGetLogString ( cfg, logstrVerbose )) != NULL, XLAL_EFUNC ); + FILE *fp; if ( (fp = fopen(fname,"rb" )) != NULL ) { @@ -2251,14 +2263,20 @@ write_TimingInfo ( const CHAR *fname, const timingInfo_t *ti, const ConfigVariab else { XLAL_CHECK ( (fp = fopen( fname, "wb" ) ), XLAL_ESYS, "Failed to open new timing-file '%s' for writing\n", fname ); - fprintf ( fp, "%2s%6s %10s %10s %10s %10s %10s\n", - "%%", "NSFTs", "NFreq", "tauF[s]", "tauFEff[s]", "tauF0[s]", "FstatMethod" ); + fprintf ( fp, "%s", logstr_short ); + fprintf ( fp, "%2s%6s %10s %10s %10s %10s %10s %10s %10s %10s %10s %16s %12s\n", + "%%", "NSFTs", "NFreq", "tauF[s]", "tauFEff[s]", "tauF0[s]", "FstatMethod", + "tauMin", "tauMax", "NStart", "NTau", "tauTransFstatMap", "tauTransMarg" + ); } - fprintf ( fp, "%8d %10d %10.1e %10.1e %10.1e %10s\n", - ti->NSFTs, ti->NFreq, ti->tauFstat, ti->tauTemplate, ti->tauF0, XLALGetFstatInputMethodName(cfg->Fstat_in) ); + fprintf ( fp, "%8d %10d %10.1e %10.1e %10.1e %10s %10d %10d %10d %10d %16.1e %12.1e\n", + ti->NSFTs, ti->NFreq, ti->tauFstat, ti->tauTemplate, ti->tauF0, XLALGetFstatInputMethodName(cfg->Fstat_in), + ti->tauMin, ti->tauMax, ti->NStart, ti->NTau, ti->tauTransFstatMap, ti->tauTransMarg + ); fclose ( fp ); + XLALFree ( logstr_short ); return XLAL_SUCCESS; } /* write_TimingInfo() */