29#include <lal/LALPulsarVCSInfo.h>
30#include <lal/UserInput.h>
31#include <lal/PulsarDataTypes.h>
32#include <lal/SFTfileIO.h>
33#include <lal/LogPrintf.h>
39 CHAR *timeStampsStarting;
40 CHAR *timeStampsFinishing;
50int main(
int argc,
char *argv[] )
71 if ( uvar.outSFTnames ) {
83 char *
comment =
XLALCalloc( 1, len = strlen( logstr ) + strlen( VCSInfoString ) + 512 );
85 sprintf(
comment,
"Generated by:\n%s\n%s\n", logstr, VCSInfoString );
95 if ( uvar.outSFTnames ) {
104 if ( uvar.outSFTnames ) {
123 uvar->file_pattern = NULL;
124 uvar->timeStampsStarting = NULL;
125 uvar->timeStampsFinishing = NULL;
126 uvar->outSFTnames = NULL;
127 uvar->outSFTdir = NULL;
128 uvar->outSingleSFT = 1;
131 XLALRegisterUvarMember( file_pattern,
STRING,
'i', REQUIRED,
"String of SFDB files (possibly from more than one detector, separated by a ;)" );
132 XLALRegisterUvarMember( timeStampsStarting,
STRING,
's', OPTIONAL,
"File(s) containing the starting timestamps of science segments (possibly from more than one detector, separated by a ;)" );
133 XLALRegisterUvarMember( timeStampsFinishing,
STRING,
'f', OPTIONAL,
"File(s) containing the starting timestamps of science segments (possibly from more than one detector, separated by a ;)" );
136 XLALRegisterUvarMember( outSFTnames,
STRING,
'd', OPTIONAL,
"Single SFT output custom path(s) (possibly from more than one detector, separated by a ;). Ignored if outSingleSFT is FALSE. Only use either outSFTnames or outSFTdir" );
137 XLALRegisterUvarMember( outSFTdir,
STRING,
'n', OPTIONAL,
"Directory for officially-named output SFTs. Only use either outSFTnames or outSFTdir." );
138 XLALRegisterUvarMember( outSingleSFT,
BOOLEAN, 0, OPTIONAL,
"Write a single concatenated SFT file instead of individual files (default: TRUE)" );
149 struct stat stat_buf;
151 if (
stat( fname, &stat_buf ) ) {
155 if ( ! S_ISDIR( stat_buf.st_mode ) ) {
const LALVCSInfoList lalPulsarVCSInfoList
NULL-terminated list of VCS and build information for LALPulsar and its dependencies
int main(int argc, char *argv[])
int initUserVars(UserInput_t *uvar)
BOOLEAN is_directory(const CHAR *fname)
#define XLAL_INIT_DECL(var,...)
void * XLALCalloc(size_t m, size_t n)
char * XLALVCSInfoString(const LALVCSInfoList vcs_list, const int verbose, const char *prefix)
void XLALDestroyMultiSFTVector(MultiSFTVector *multvect)
Destroy a multi SFT-vector.
MultiSFTVector * XLALReadSFDB(REAL8 f_min, REAL8 f_max, const CHAR *file_pattern, const CHAR *timeStampsStarting, const CHAR *timeStampsFinishing)
Return a MultiSFTVector struct from an input set of SFDBs, possibly from more than one detector.
LALStringVector * XLALFindFiles(const CHAR *globstring)
Returns a list of filenames matching the input argument, which may be one of the following:
int XLALWriteSFTVector2NamedFile(const SFTVector *sftVect, const CHAR *SFTfilename, const CHAR *SFTwindowtype, const REAL8 SFTwindowparam, const CHAR *SFTcomment)
Write the given SFTVector to a single merged SFT file with the supplied filename.
int XLALWriteSFTVector2StandardFile(const SFTVector *sftVect, SFTFilenameSpec *SFTfnspec, const CHAR *SFTcomment, const BOOLEAN merged)
Write the given SFTVector to SFT file(s) with a standard () filename(s).
int XLALFillSFTFilenameSpecStrings(SFTFilenameSpec *spec, const CHAR *path, const CHAR *extn, const CHAR *detector, const CHAR *window_type, const CHAR *privMisc, const CHAR *pubObsKind, const CHAR *pubChannel)
Convenience function for filling out the string fields in a SFTFilenameSpec.
void XLALDestroyStringVector(LALStringVector *vect)
#define XLAL_CHECK(assertion,...)
#define XLAL_CHECK_MAIN(assertion,...)
A vector of COMPLEX8FrequencySeries.
A collection of SFT vectors – one for each IFO in a multi-IFO search.
UINT4 length
number of ifos
SFTVector ** data
sftvector for each ifo
Structure specifying an SFT file name, following the convention in .