Commit b3dd7220 authored by Adam Mercer's avatar Adam Mercer

migrate pe_NRSur7dq2 branch

parent 837952ed
This diff is collapsed.
FROM ligo/lalsuite-runtime:jessie
COPY /opt/lalsuite /opt/lalsuite
ENV LD_LIBRARY_PATH="/opt/lalsuite/lib" \
OCTAVE_PATH="/opt/lalsuite/lib/x86_64-linux-gnu/octave/3.8.2/site/oct/x86_64-pc-linux-gnu" \
PATH="/opt/lalsuite/bin:${PATH}" \
PKG_CONFIG_PATH="/opt/lalsuite/lib/pkgconfig" \
PYTHONPATH="/opt/lalsuite/lib/python2.7/site-packages" \
# LALSuite
This is the main LALSuite development repository, past development is
captured in the repository below:
https://git.ligo.org/lscsoft/lalsuite-archive
This new repository utilizes [git-lfs](https://wiki.ligo.org/DASWG/GitLFS#Install_the_git_LFS_client) for the managament of large files and as such `git-lfs` needs to be installed and configured to correctly clone this repository. After installing `git-lfs` it can be configured using:
```
$ git lfs install
```
This only needs to be done once for each machine you access the repository. It can then be cloned using:
```
$ git clone git@git.ligo.org:lscsoft/lalsuite.git
```
......@@ -2203,8 +2203,7 @@ class BinnedLnPDF(BinnedDensity):
return InterpBinnedArray(self)
def at_centres(self):
with numpy.errstate(divide = "ignore", invalid = "ignore"):
return numpy.log(super(BinnedLnPDF, self).at_centres()) - self.norm
return numpy.log(super(BinnedLnPDF, self).at_centres()) - self.norm
def marginalize(self, dim):
new = super(BinnedLnPDF, self).marginalize(dim)
......@@ -2249,11 +2248,6 @@ class BinnedLnPDF(BinnedDensity):
self.norm = other.norm + math.log1p(math.exp(self.norm - other.norm))
return self
def __add__(self, other):
self = super(BinnedLnPDF, self).__add__(other)
self.normalize()
return self
def copy(self):
new = super(BinnedLnPDF, self).copy()
new.norm = self.norm
......
......@@ -377,8 +377,7 @@ LALSimulateCoherentGW( LALStatus *stat,
} else {
output->sampleUnits = CWsignal->a->sampleUnits;
}
if( snprintf( output->name, LALNameLength, "response to %s", CWsignal->a->name ) >= LALNameLength )
ABORT( stat, SIMULATECOHERENTGWH_ENUL, SIMULATECOHERENTGWH_MSGENUL );
snprintf( output->name, LALNameLength, "response to %s", CWsignal->a->name );
}
/* Define temporary variables to access the data of CWsignal->a,
......
......@@ -112,12 +112,15 @@ extern const int lalNoDebug;
} while ( 0 )
#define ABORT( statusptr, code, mesg ) \
do { if ( (statusptr)->statusPtr ) FREESTATUSPTR( statusptr ); \
do { if ( 1 ) \
{ \
if ( (statusptr)->statusPtr ) FREESTATUSPTR( statusptr ); \
SETSTATUS( statusptr, code, mesg ); \
if ( code ) \
(void) LALError( statusptr, "ABORT:" ); \
(void) LALTrace( statusptr, 1 ); \
return; \
} \
} while ( 0 )
#ifdef LAL_NDEBUG
......
......@@ -353,8 +353,8 @@ int WriteFrame(int argc,char *argv[],struct CommandLineArgsTag CLA)
/* Filters file checksum and cvs info (first 2 lines in filters file) */
{
char buffer[1280];
snprintf(buffer, sizeof(buffer), "Filters file checksum and header: %s\n%s",
char buffer[1024];
snprintf(buffer, sizeof buffer, "Filters file checksum and header: %s\n%s",
InputData.filter_chksum, InputData.filter_vc_info);
XLALFrameAddFrHistory(frame, __FILE__, buffer);
}
......
......@@ -3287,11 +3287,14 @@ void BankEfficiencyParseGetInt(
{
CHAR *tmp;
CHAR msg[2048];
CHAR *tmp1;
tmp1 = argv[*bank_index+1];
if ( argv[*bank_index+1] != NULL )
{
*data = strtol(argv[*bank_index+1], &tmp , 10);
if (*data==0 && argv[*bank_index+1][0] != '0')
if (*data==0 && tmp1[0] != '0')
{
sprintf(msg, "Expect a int after option %s (got %s)\n ",
argv[*bank_index],
......@@ -3302,8 +3305,9 @@ void BankEfficiencyParseGetInt(
}
else
{
sprintf(msg, "Expect a int after option %s (got NULL)\n ",
argv[*bank_index]);
sprintf(msg, "Expect a int after option %s (got %s)\n ",
argv[*bank_index],
argv[*bank_index+1]);
fprintf(stderr, "%s", msg);
exit( 1 );
}
......@@ -3334,11 +3338,13 @@ void BankEfficiencyParseGetDouble(
{
CHAR *tmp;
CHAR msg[2048];
CHAR *tmp2 ;
tmp2 = argv[*bank_index+1];
if (argv[*bank_index+1] != NULL)
{
*data = strtod(argv[*bank_index+1], &tmp );
if (*data == 0 && argv[*bank_index+1][0]!='0')
if (*data == 0 && tmp2[0]!='0')
{
sprintf(msg, "Expect a float after option %s (got %s)\n ",
argv[*bank_index],
......@@ -3348,8 +3354,9 @@ void BankEfficiencyParseGetDouble(
}
else
{
sprintf(msg, "Expect a float after option %s (got NULL)\n ",
argv[*bank_index]);
sprintf(msg, "Expect a float after option %s (got %s)\n ",
argv[*bank_index],
argv[*bank_index+1]);
fprintf(stderr, "%s", msg);
}
*bank_index =*bank_index + 1;
......@@ -3364,6 +3371,10 @@ void BankEfficiencyParseGetDouble2(
{
CHAR *tmp;
CHAR msg[2048];
CHAR *tmp2 , *tmp1;
tmp1 = argv[*bank_index+1];
tmp2= argv[*bank_index+2];
*data1 = 0 ;
*data2 = 0 ;
......@@ -3372,8 +3383,8 @@ void BankEfficiencyParseGetDouble2(
{
*data1 = strtod(argv[*bank_index+1], &tmp );
*data2 = strtod(argv[*bank_index+2], &tmp );
if ((!(*data1) && argv[*bank_index+1][0]!='0')
|| (!(*data2) && argv[*bank_index+2][0]!='0'))
if ((!(*data1) && tmp1[0]!='0')
|| (!(*data2) && tmp2[0]!='0'))
{
sprintf(msg, "Expect 2 floats after option %s (got %s and %s)\n ",
argv[*bank_index],
......@@ -3383,8 +3394,9 @@ void BankEfficiencyParseGetDouble2(
}
else
{
sprintf(msg, "Expect 2 floats after option %s (got NULL and/or NULL)\n ",
argv[*bank_index]);
sprintf(msg, "Expect 2 floats after option %s (got %s and %s)\n ",
argv[*bank_index],
argv[*bank_index+1],argv[*bank_index+2]);
fprintf(stderr, "%s", msg);
}
*bank_index = *bank_index +2 ;
......
......@@ -21,6 +21,7 @@ TRIGSCANSRC = trigscan.c
INSPFRINJSRC = inspfrinj.c
GWF2XMLSRC = gwf2xml.c
SPININJSRC = spininj.c
COINEXTSRC = coinext.c
RANDOMBANKSRC = randombank.c
NINJASRC = ninja.c
FRNINJASRC = fr_ninja.c
......@@ -46,6 +47,7 @@ LALMETAIO_PROGS = \
lalapps_trigbank \
lalapps_trigscan \
lalapps_spininj \
lalapps_coinext \
lalapps_randombank \
lalapps_ninja \
lalapps_fr_ninja \
......@@ -68,6 +70,7 @@ lalapps_trigscan_SOURCES = $(TRIGSCANSRC)
lalapps_spininj_SOURCES = $(SPININJSRC)
lalapps_inspfrinj_SOURCES = $(INSPFRINJSRC)
lalapps_gwf2xml_SOURCES = $(GWF2XMLSRC)
lalapps_coinext_SOURCES = $(COINEXTSRC)
lalapps_randombank_SOURCES = $(RANDOMBANKSRC)
lalapps_ninja_SOURCES = $(NINJASRC)
lalapps_fr_ninja_SOURCES = $(FRNINJASRC)
......
This diff is collapsed.
......@@ -76,6 +76,7 @@ def parse_command_line():
parser.add_option("-t", "--threshold", metavar = "float", type = "float", help = "Set the coincidence threshold (required). The meaning is defined by the match algorithm. For --match=exact this sets the Delta t window in seconds.")
parser.add_option("--min-instruments", metavar = "number", default = "2", type = "int", help = "Set the minimum number of instruments that must participate in a coincidence (default = 2). The value must be greater than 0.")
parser.add_option("--vetoes-name", metavar = "string", default = "vetoes", help = "From the input document, exatract the segment list having this name to use as the veto segments (default = \"vetoes\"). Warning: if no segments by this name are found in the document then vetoes will not be applied, this is not an error condition.")
parser.add_option("--trigger-program", metavar = "name", default = "inspiral", help = "Set the name of the program that generated the event list as it appears in the process table (default = \"inspiral\"). This is used to identify the search_summary table entries to be used to define instrument on and off times.")
parser.add_option("--coinc-end-time-segment", metavar = "seg", help = "The segment of time to retain coincident triggers from. Uses segmentUtils.from_range_strings() format \"START:END\" for an interval of the form [START,END), \"START:\" for an interval of the form [START,INF), and \":END\" for an interval of the form (-INF,END).")
parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.")
options, filenames = parser.parse_args()
......@@ -236,8 +237,8 @@ for n, filename in enumerate(filenames, start = 1):
coinc_definer_row = thinca.InspiralCoincDef,
thresholds = options.threshold,
ntuple_comparefunc = ntuple_comparefunc,
seglists = None, # FIXME
veto_segments = vetoes,
trigger_program = options.trigger_program,
min_instruments = options.min_instruments,
verbose = options.verbose
)
......
......@@ -328,7 +328,6 @@ INT4 main( INT4 argc, CHAR *argv[] )
LALoptarg_len = strlen( LALoptarg ) + 1;
frameType = (CHAR *) calloc( LALoptarg_len, sizeof(CHAR));
memcpy( frameType, LALoptarg, LALoptarg_len );
break;
case 'n':
/* create storage for the injection set name */
......
......@@ -97,7 +97,7 @@ INT4 on_your_marks(LALInferenceRunState *run_state) {
char *infile = ppt->value;
FILE *input = fopen(infile, "r");
char params[128][VARNAME_MAX];
char params[128][128];
INT4 *col_order = XLALCalloc(ndim, sizeof(INT4));
INT4 ncols;
......
......@@ -179,15 +179,9 @@ int plan_problem(char type, /**< 'r' for real or 'c' for complex tran
case 3:
planning_flags |= FFTW_EXHAUSTIVE;
/* Fall through: */
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
case 2:
planning_flags |= FFTW_PATIENT;
/* Fall through */
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
case 1:
planning_flags |= FFTW_MEASURE;
break;
......
......@@ -179,15 +179,9 @@ int plan_problem(char type, /**< 'r' for real or 'c' for complex tran
case 3:
planning_flags |= FFTW_EXHAUSTIVE;
/* Fall through: */
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
case 2:
planning_flags |= FFTW_PATIENT;
/* Fall through */
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
case 1:
planning_flags |= FFTW_MEASURE;
break;
......
......@@ -179,7 +179,6 @@ static void parse_options(INT4 argc, CHAR *argv[])
long_options[option_index].name, timeout);
exit(1);
}
break;
case 'g':
/* get filename */
......
......@@ -34,7 +34,7 @@ from glue.ligolw import dbtables
from lal.utils import CacheEntry
from lalburst import git_version
from lalburst import burca_tailor
from lalburst import calc_likelihood
from lalburst import ligolw_burca2
from lalburst import SnglBurstUtils
from lalburst.SimBurstUtils import MW_CENTER_J2000_RA_RAD, MW_CENTER_J2000_DEC_RAD
......@@ -161,7 +161,7 @@ for n, filename in enumerate(filenames):
#
calc_likelihood.ligolw_burca2(database, distributions, distributions.coinc_params, verbose = options.verbose, params_func_extra_args = (MW_CENTER_J2000_RA_RAD, MW_CENTER_J2000_DEC_RAD))
ligolw_burca2.ligolw_burca2(database, distributions, distributions.coinc_params, verbose = options.verbose, params_func_extra_args = (MW_CENTER_J2000_RA_RAD, MW_CENTER_J2000_DEC_RAD))
#
......
......@@ -925,9 +925,6 @@ void get_input_args(inputParams_t *inputParams, INT4 argc, CHAR *argv[]){
else
fprintf(stderr, "Error passing option %s with argument %s\n",
long_options[option_index].name, LALoptarg);
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
case 'h': /* help message */
fprintf(stderr, USAGE, program);
exit(0);
......@@ -984,6 +981,7 @@ void get_input_args(inputParams_t *inputParams, INT4 argc, CHAR *argv[]){
inputParams->nyears = atoi(LALoptarg);
break;
case '?':
fprintf(stderr, "Unknown error while parsing options\n");
default:
fprintf(stderr, "Unknown error while parsing options\n");
}
......
......@@ -188,9 +188,6 @@ void get_input_args(inputParams_t *inputParams, int argc, char *argv[]){
else
fprintf(stderr, "Error passing option %s with argument %s\n",
long_options[option_index].name, LALoptarg);
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
case 'h': /* help message */
fprintf(stderr, USAGE, program);
exit(0);
......@@ -210,6 +207,7 @@ void get_input_args(inputParams_t *inputParams, int argc, char *argv[]){
inputParams->interval = atof(LALoptarg);
break;
case '?':
fprintf(stderr, "Unknown error while parsing options\n");
default:
fprintf(stderr, "Unknown error while parsing options\n");
}
......
......@@ -308,7 +308,6 @@ typedef struct {
BOOLEAN transient_useFReg; /**< FALSE: use 'standard' e^F for marginalization, TRUE: use e^FReg = (1/D)*e^F */
CHAR *outputTiming; /**< output timing measurements and parameters into this file [append!]*/
CHAR *outputFstatTiming; /**< output F-statistic timing measurements and parameters into this file [append!]*/
int FstatMethod; //!< select which method/algorithm to use to compute the F-statistic
......@@ -794,26 +793,6 @@ int main(int argc,char *argv[])
} /* if timing output requested */
/* if requested: output F-statistic timings into F-statistic-timing-file */
if ( uvar.outputFstatTiming )
{
FILE *fp;
if ( (fp = fopen( uvar.outputFstatTiming, "rb" )) != NULL )
{
fclose(fp);
XLAL_CHECK ( (fp = fopen( uvar.outputFstatTiming, "ab" ) ), XLAL_ESYS, "Failed to open existing timing-file '%s' for appending\n", uvar.outputFstatTiming );
XLAL_CHECK_MAIN ( XLALAppendFstatTiming2File ( GV.Fstat_in, fp, 0 ) == XLAL_SUCCESS, XLAL_EFUNC );
}
else
{
XLAL_CHECK ( (fp = fopen( uvar.outputFstatTiming, "wb" ) ), XLAL_ESYS, "Failed to open new timing-file '%s' for writing\n", uvar.outputFstatTiming );
XLAL_CHECK_MAIN ( XLALAppendFstatTiming2File ( GV.Fstat_in, fp, 1 ) == XLAL_SUCCESS, XLAL_EFUNC );
}
fclose(fp);
} /* if timing output requested */
/* ----- if using toplist: sort and write it out to file now ----- */
if ( fpFstat && GV.FstatToplist )
{
......@@ -1132,7 +1111,6 @@ initUserVars ( UserInput_t *uvar )
XLALRegisterUvarMember(transient_useFReg, BOOLEAN, 0, DEVELOPER, "FALSE: use 'standard' e^F for marginalization, if TRUE: use e^FReg = (1/D)*e^F (BAD)");
XLALRegisterUvarMember(outputTiming, STRING, 0, DEVELOPER, "Append timing measurements and parameters into this file");
XLALRegisterUvarMember(outputFstatTiming, STRING, 0, DEVELOPER, "Append F-statistic timing measurements and parameters into this file");
XLALRegisterUvarMember(resampFFTPowerOf2, BOOLEAN, 0, DEVELOPER, "For Resampling methods: enforce FFT length to be a power of two (by rounding up)" );
......@@ -1423,7 +1401,6 @@ InitFstat ( ConfigVariables *cfg, const UserInput_t *uvar )
optionalArgs.assumeSqrtSX = assumeSqrtSX;
optionalArgs.FstatMethod = uvar->FstatMethod;
optionalArgs.resampFFTPowerOf2 = uvar->resampFFTPowerOf2;
optionalArgs.collectTiming = XLALUserVarWasSet ( &uvar->outputFstatTiming );
XLAL_CHECK ( (cfg->Fstat_in = XLALCreateFstatInput( catalog, fCoverMin, fCoverMax, cfg->dFreq, cfg->ephemeris, &optionalArgs )) != NULL, XLAL_EFUNC );
XLALDestroySFTCatalog(catalog);
......
......@@ -181,7 +181,7 @@ int main( int argc, char **argv ){
// add "NAME" attribute
PulsarAddParam( pulparams[numpulsars], "NAME", psrname, PULSARTYPE_string_t );
snprintf(outputFilename, sizeof(outputFilename), "%s/SplInter_%s_%s",inputParams.outputdir,psrname,
sprintf(outputFilename, "%s/SplInter_%s_%s",inputParams.outputdir,psrname,
splParams.detector.frDetector.prefix);
outputfilenames = XLALAppendString2Vector(outputfilenames, outputFilename);
......@@ -230,14 +230,14 @@ int main( int argc, char **argv ){
}
/* load all types of ephemeris files, as uses little RAM/computational effort, and different parfiles may use a combination */
snprintf(earthfile200, sizeof(earthfile200), "%s/earth00-19-DE200.dat.gz",inputParams.ephemdir);
snprintf(sunfile200, sizeof(sunfile200), "%s/sun00-19-DE200.dat.gz",inputParams.ephemdir);
snprintf(earthfile405, sizeof(earthfile405), "%s/earth00-19-DE405.dat.gz",inputParams.ephemdir);
snprintf(sunfile405, sizeof(sunfile405), "%s/sun00-19-DE405.dat.gz",inputParams.ephemdir);
snprintf(earthfile414, sizeof(earthfile414), "%s/earth00-19-DE414.dat.gz",inputParams.ephemdir);
snprintf(sunfile414, sizeof(sunfile414), "%s/sun00-19-DE414.dat.gz",inputParams.ephemdir);
snprintf(earthfile421, sizeof(earthfile421), "%s/earth00-19-DE421.dat.gz",inputParams.ephemdir);
snprintf(sunfile421, sizeof(sunfile421), "%s/sun00-19-DE421.dat.gz",inputParams.ephemdir);
sprintf(earthfile200, "%s/earth00-19-DE200.dat.gz",inputParams.ephemdir);
sprintf(sunfile200, "%s/sun00-19-DE200.dat.gz",inputParams.ephemdir);
sprintf(earthfile405, "%s/earth00-19-DE405.dat.gz",inputParams.ephemdir);
sprintf(sunfile405, "%s/sun00-19-DE405.dat.gz",inputParams.ephemdir);
sprintf(earthfile414, "%s/earth00-19-DE414.dat.gz",inputParams.ephemdir);
sprintf(sunfile414, "%s/sun00-19-DE414.dat.gz",inputParams.ephemdir);
sprintf(earthfile421, "%s/earth00-19-DE421.dat.gz",inputParams.ephemdir);
sprintf(sunfile421, "%s/sun00-19-DE421.dat.gz",inputParams.ephemdir);
edat200 = XLALMalloc(sizeof(*edat200));
edat405 = XLALMalloc(sizeof(*edat405));
......@@ -245,8 +245,8 @@ int main( int argc, char **argv ){
edat421 = XLALMalloc(sizeof(*edat421));
/* Load time correction files. */
snprintf(timefileTDB, sizeof(timefileTDB), "%s/tdb_2000-2019.dat.gz",inputParams.ephemdir);
snprintf(timefileTE405, sizeof(timefileTE405), "%s/te405_2000-2019.dat.gz",inputParams.ephemdir);
sprintf(timefileTDB,"%s/tdb_2000-2019.dat.gz",inputParams.ephemdir);
sprintf(timefileTE405, "%s/te405_2000-2019.dat.gz",inputParams.ephemdir);
/* read in ephemeris files */
edat200 = XLALInitBarycenter(earthfile200, sunfile200);
......@@ -390,8 +390,8 @@ int main( int argc, char **argv ){
if ( sftlalcache == NULL ){
CHAR cacheFile[FILENAME_MAXLEN], cacheFileCheck[FILENAME_MAXLEN];
if(inputParams.cacheDir){
snprintf(cacheFile, sizeof(cacheFile), "list:%s/Segment_%d-%d.sftcache",inputParams.filePattern,(INT4)ROUND(startt),(INT4)ROUND(endt));
snprintf(cacheFileCheck, sizeof(cacheFileCheck), "%s/Segment_%d-%d.sftcache",inputParams.filePattern,(INT4)ROUND(startt),(INT4)ROUND(endt));
sprintf(cacheFile,"list:%s/Segment_%d-%d.sftcache",inputParams.filePattern,(INT4)ROUND(startt),(INT4)ROUND(endt));
sprintf(cacheFileCheck,"%s/Segment_%d-%d.sftcache",inputParams.filePattern,(INT4)ROUND(startt),(INT4)ROUND(endt));
}
else{
sprintf(cacheFile,"%s",inputParams.filePattern);
......@@ -1378,10 +1378,8 @@ void get_input_args(InputParams *inputParams, int argc, char *argv[]){
break;
case '?':
fprintf(stderr, "unknown error while parsing options\n" );
break;
default:
fprintf(stderr, "unknown error while parsing options\n" );
break;
}
}
}
......
......@@ -167,7 +167,7 @@ int main(int argc, char **argv){
continue;
}
else{
snprintf(parname,sizeof(parname),"%s/%s", inputs.pulsarDir, pulsars[h]->d_name);
sprintf(parname,"%s/%s", inputs.pulsarDir, pulsars[h]->d_name);
fprintf(stderr, "%s\n", parname);
FILE *inject;
......@@ -400,7 +400,6 @@ void ReadInput(InputParams *inputParams, int argc, char *argv[]){
else
fprintf(stderr, "Error parsing option %s with argument %s\n",
long_options[option_index].name, LALoptarg );
break;
case 'h': /* help message */
fprintf(stderr, USAGE, program);
exit(0);
......@@ -438,10 +437,8 @@ void ReadInput(InputParams *inputParams, int argc, char *argv[]){
break;
case '?':
fprintf(stderr, "unknown error while parsing options\n" );
break;
default:
fprintf(stderr, "unknown error while parsing options\n" );
break;
}
}
......
......@@ -877,7 +877,6 @@ the pulsar parameter file */
else
fprintf(stderr, "Error parsing option %s with argument %s\n",
long_options[option_index].name, LALoptarg );
break;
case 'h': /* help message */
fprintf(stderr, USAGE, program);
exit(0);
......@@ -1046,10 +1045,8 @@ the pulsar parameter file */
break;
case '?':
fprintf(stderr, "unknown error while parsing options\n" );
break;
default:
fprintf(stderr, "unknown error while parsing options\n" );
break;
}
}
......
......@@ -227,7 +227,7 @@ INT4 main(INT4 argc, CHAR *argv[]){
output.psr = inputs.pulsar;
output.dob = inputs.dob; /* set degree of belief for UL */
output.outPost = inputs.outputPost;
snprintf(outputFile, sizeof(outputFile), "%s/evidence_%s", output.outputDir, output.psr);
sprintf(outputFile, "%s/evidence_%s", output.outputDir, output.psr);
/*==========================================================================*/
if( inputs.mcmc.doMCMC == 0 ){
......@@ -294,7 +294,7 @@ defined!\n");
for( i = 0 ; i < numDets ; i++ ){
/*============================ GET DATA ==================================*/
/* get detector B_ks data file in form finehet_JPSR_DET */
snprintf(dataFile, sizeof(dataFile), "%s/data%s/finehet_%s_%s", inputs.inputDir, dets[i],
sprintf(dataFile, "%s/data%s/finehet_%s_%s", inputs.inputDir, dets[i],
inputs.pulsar, dets[i]);
/* open data file */
......@@ -758,11 +758,9 @@ W:y:g:G:K:N:X:O:J:M:{:(r:fFR><)[:" ;
else
fprintf(stderr, "Error passing option %s with argument %s\n",
long_options[option_index].name, LALoptarg);
break;
case 'h': /* help message */
printf("Usage: %s [options]\n\n%s%s\n", program, USAGE1, USAGE2);
exit(0);
break;
case 'R': /* verbose */
inputParams->verbose = 1;
break;
......@@ -940,10 +938,8 @@ W:y:g:G:K:N:X:O:J:M:{:(r:fFR><)[:" ;
break;
case '?':
fprintf(stderr, "Unknown error while parsing options\n");
break;
default:
fprintf(stderr, "Unknown error while parsing options\n");
break;
}
}
......@@ -2463,9 +2459,9 @@ paramData ) ) == NULL ){
/* open output file */
if( input.mcmc.outputBI == 0 )
snprintf(outFile, sizeof(outFile), "%s/MCMCchain_%s_%s", input.outputDir, input.pulsar, det);
sprintf(outFile, "%s/MCMCchain_%s_%s", input.outputDir, input.pulsar, det);
else{ /* append number of burn in steps to the file name */
snprintf(outFile, sizeof(outFile), "%s/MCMCchain_%s_%s_burn_in_%d", input.outputDir,
sprintf(outFile, "%s/MCMCchain_%s_%s_burn_in_%d", input.outputDir,
input.pulsar, det, input.mcmc.burnIn );
}
......
......@@ -144,7 +144,6 @@ int main( int argc, char *argv[] ){
break;
else
fprintf(stderr, "Error parsing option %s with argument %s\n", long_options[option_index].name, LALoptarg );
break;
case 'h': /* help message */
fprintf(stderr, USAGE, program);
exit(0);
......@@ -162,15 +161,12 @@ int main( int argc, char *argv[] ){
break;
case 'g': /* the gps time */
gpstime = atof(LALoptarg);
break;
case '?':
fprintf(stderr, "Unknown error while parsing options\n" );
exit(0);
break;
default:
fprintf(stderr, "Unknown error while parsing options\n" );
exit(0);
break;
}
}
......
......@@ -752,14 +752,8 @@ XLALInitMakefakedata ( ConfigVars_t *cfg, UserVariables_t *uvar )
{
case 3:
cfg->spindown->data[2] = uvar->f3dot;
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
case 2:
cfg->spindown->data[1] = uvar->f2dot;
#if __GNUC__ >= 7
__attribute__ ((fallthrough));
#endif
case 1:
cfg->spindown->data[0] = uvar->f1dot;
break;
......
......@@ -95,7 +95,6 @@ typedef struct {
REAL8 tsft; /**< the length of the input sfts */
CHAR *comment;
CHAR *tempdir; /**< a temporary directory for keeping the results */
BOOLEAN with_chi2_renorm; /**< switch on chi^2 renormalisation */
BOOLEAN with_xbins; /**< enable fast summing of extra bins */
} UserInput_t;
......@@ -114,7 +113,7 @@ extern int vrbflg; /**< defined in lalapps.c */
/* define functions */
int main(int argc,char *argv[]);
int XLALReadUserVars(int argc,char *argv[],UserInput_t *uvar, CHAR **clargs);
int XLALComputeSemiCoherentStat(FILE *fp,REAL4DemodulatedPowerVector *power,ParameterSpace *pspace,GridParametersVector *fgrid,GridParameters *bingrid,INT4 ntoplist,BOOLEAN with_chi2_renorm,BOOLEAN with_xbins);
int XLALComputeSemiCoherentStat(FILE *fp,REAL4DemodulatedPowerVector *power,ParameterSpace *pspace,GridParametersVector *fgrid,GridParameters *bingrid,INT4 ntoplist,BOOLEAN with_xbins);
int XLALDefineBinaryParameterSpace(REAL8Space **, LIGOTimeGPS, REAL8, UserInput_t *);
int XLALOpenSemiCoherentResultsFile(FILE **,CHAR *,ParameterSpace *,CHAR *,UserInput_t *);
int XLALtoplist(REAL4 x,Template *params,toplist *TL);
......@@ -370,7 +369,7 @@ int main( int argc, char *argv[] ) {
/**********************************************************************************/
/* compute the semi-coherent detection statistic on the fine grid */
if (XLALComputeSemiCoherentStat(sfp,dmpower,&pspace,freqgridparams,bingridparams,uvar.ntoplist,uvar.with_chi2_renorm,uvar.with_xbins)) {
if (XLALComputeSemiCoherentStat(sfp,dmpower,&pspace,freqgridparams,bingridparams,uvar.ntoplist,uvar.with_xbins)) {
LogPrintf(LOG_CRITICAL,"%s : XLALComputeSemiCoherentStat() failed with error = %d\n",__func__,xlalErrno);
return 1;
}
......@@ -465,7 +464,6 @@ int XLALReadUserVars(int argc, /**< [in] the command line argument co
uvar->tsft = 256;
uvar->seed = 1;
uvar->tempdir = NULL;
uvar->with_chi2_renorm = 1;
uvar->with_xbins = 1;
/* initialise all parameter space ranges to zero */
......@@ -500,7 +498,6 @@ int XLALReadUserVars(int argc, /**< [in] the command line argument co
XLALRegisterUvarMember(seed, INT4, 'X', OPTIONAL, "The random number seed (0 = clock)");
XLALRegisterUvarMember(gpsstart, INT4, 's', OPTIONAL, "The minimum start time (GPS sec)");
XLALRegisterUvarMember(gpsend, INT4, 'e', OPTIONAL, "The maximum end time (GPS sec)");
XLALRegisterUvarMember(with_chi2_renorm, BOOLEAN, 0, OPTIONAL, "Switch on chi^2 renormalisation");
XLALRegisterUvarMember(with_xbins, BOOLEAN, 0, DEVELOPER, "Enable fast summing of extra bins");
/* do ALL cmdline and cfgfile handling */
......@@ -540,7 +537,6 @@ int XLALComputeSemiCoherentStat(FILE *fp, /**< [i
GridParametersVector *fgrid, /**< UNDOCUMENTED */
GridParameters *bingrid, /**< [in] the grid parameters */
INT4 ntoplist, /**< UNDOCUMENTED */
BOOLEAN with_chi2_renorm, /**< switch on chi^2 renormalisation */