134 char args[] =
"a:A:b:B:c:C:D:e:E:f:F:g:G:h:H:i:I:j:J:k:K:l:L:m:M:n:N:o:O:p:P:q:Q:r:R:s:S:t:T:u:U:v:V:w:W:x:X:y:Y:z:Z:1:2:3:4:5:6:7:8:9:<:>:!:&:(:):#:|:@";
142 int option_index = 0;
152 if ( long_options[option_index].
flag )
155 error(
"error parsing option %s with argument %s\n",
224 else if ( ! strcmp(
"ILIGONoise",
LALoptarg))
228 else if ( ! strcmp(
"ALIGONoise",
LALoptarg))
234 fprintf( stderr,
"invalid argument to --%s:\n"
235 "unknown data type specified:"
236 "%s valid options are WhiteNoise, ILIGONoise or ALIGONoise",
246 else if ( ! strcmp(
"twoPointFivePN",
LALoptarg ) )
250 else if ( ! strcmp(
"threePN",
LALoptarg ) )
254 else if ( ! strcmp(
"threePointFivePN",
LALoptarg ) )
258 else if ( ! strcmp(
"pseudoFourPN",
LALoptarg ) )
264 fprintf( stderr,
"invalid argument to --%s:\n"
265 "unknown order specified: "
266 "%s (must be one of twoPN, twoPointFivePN, threePN, threePointFivePN, pseudoFourPN)\n",
422 fprintf(stderr,
"invalid argument to --%s:\n"
423 "unknown data type specified;\n"
424 "%s (must be one of: real_4, real_8)\n",
439 fprintf(stderr,
"invalid argument to --%s:\n"
440 "unknown data type specified;\n"
441 "%s (must be one of: real_4, real_8)\n",
446 error(
"unknown error while parsing options\n" );
449 error(
"unknown error while parsing options\n" );
456 fprintf( stderr,
"extraneous command line arguments:\n" );
465 for ( ifoNumber = 0; ifoNumber <
LAL_NUM_IFO; ifoNumber++ )
467 if ( localparams.
haveTrig[ifoNumber] )
477 if (localparams.
numIFO == 2)
479 if (! strcmp(localparams.
ifoName[0],
"H1"))
481 if (! strcmp(localparams.
ifoName[1],
"H2"))
533 localparams.sampleRate;
537 localparams.sampleRate;
574 verbose(
"warning: Sigmasq correction factor is not yet available for this approximant: setting it to 1.\n");
596 params->injectList = NULL;
599 params->rightAscension = -1000.;
600 params->declination = -1000.;
602 params->timingAccuracy = 0.0005;
603 params->skyPositionsFile = NULL;
607 params->injSearchWindow = 1.;
610 params->dynRangeFac = 1E20;
613 params->highpassFrequency = -1.0;
614 params->lowTemplateFrequency = -1.0;
615 params->lowFilterFrequency = -1.0;
616 params->highFilterFrequency = -1.0;
619 params->segmentsToDoList =
"^-$";
620 params->templatesToDoList =
"^-$";
633 params->nullStatThreshold = 5.25;
634 params->nullStatGradOn = 30.;
635 params->nullStatGradient = 50./700.;
641 params->ligoDoubleData = 1;
642 params->virgoDoubleData = 0;
650 UINT4 recordLength = 0;
651 UINT4 segmentLength = 0;
652 UINT4 segmentStride = 0;
653 UINT4 truncateLength = 0;
659 if (
params->getSpectrum )
677 for( ifoNumber = 0; ifoNumber <
LAL_NUM_IFO; ifoNumber++)
679 if (
params->haveTrig[ifoNumber] )
688 if (
params->getSpectrum )
692 segmentLength = floor(
params->psdSegmentDuration*
params->sampleRate + 0.5);
694 params->psdStrideDuration = 0.5 *
params->psdSegmentDuration;
695 segmentStride = floor(
params->psdStrideDuration *
params->sampleRate + 0.5);
698 truncateLength = floor(
params->truncateDuration *
params->sampleRate + 0.5);
708 segmentLength = floor(
params->segmentDuration *
params->sampleRate + 0.5);
710 segmentStride = floor(
params->strideDuration *
params->sampleRate + 0.5);
712 sanity_check( !( (recordLength - segmentLength) % segmentStride ) );
713 params->numOverlapSegments = 1 + (recordLength - segmentLength)/segmentStride;
722 if (
params->rightAscension != -1000. &&
params->declination != -1000. )
730 if (
params->skyError>0. )
737 if (
params->numIFO == 2 )
747 else if (
params->skyPositionsFile)
754 if (
params->numIFO == 2 )
762 error(
"--do-null-stream and --sky-error are incompatbile. Null stream on more than one sky point is a bad idea.\n" );
798 fprintf(stderr,
"Please use --spin-bank and/or --non-spin-bank with this ");
799 fprintf(stderr,
"code and not --bank-file.\n");
802 if (
params->doBankVeto && (!
params->bankVetoBankName) )
804 fprintf(stderr,
"When using --do-bank-veto you must also supply ");
805 fprintf(stderr,
"--bank-veto-templates. \n" );
808 if (
params->bankVetoBankName && (!
params->doBankVeto) )
810 fprintf(stderr,
"Supplying --bank-veto-templates will do nothing if ");
811 fprintf(stderr,
"--do-bank-veto is not given. \n" );
815 fprintf(stderr,
"When using --do-auto-veto you must also supply ");
816 fprintf(stderr,
"--num-auto-chisq-points and --auto-veto-time-step\n");
819 if (
params->doChiSquare && (!
params->numChiSquareBins))
821 fprintf(stderr,
"When using --do-chi-square you must also supply ");
822 fprintf(stderr,
"--num-chi-square-bins \n");
831 fprintf(stderr,
"You have not specified any detectors to analyse");
834 else if (
params->numIFO == 1)
836 fprintf(stdout,
"You have only specified one detector, "
837 "why are you using the coherent code? \n");
853 fprintf( stderr,
"\ngeneral options:\n" );
854 fprintf( stderr,
"--help print this message\n" );
855 fprintf( stderr,
"--version print the version of the code\n" );
856 fprintf( stderr,
"--verbose print verbose messages while running\n" );
858 fprintf( stderr,
"\ndata reading options:\n" );
859 fprintf( stderr,
"--h1-data Analyze h1 data \n" );
860 fprintf( stderr,
"--h2-data Analyze h2 data \n" );
861 fprintf( stderr,
"--l1-data Analyze l1 data \n" );
862 fprintf( stderr,
"--v1-data Analyze v1 data \n" );
863 fprintf( stderr,
"--h1-frame-cache=cachefile name of the frame cache file\n" );
864 fprintf( stderr,
"--h2-frame-cache=cachefile name of the frame cache file\n" );
865 fprintf( stderr,
"--l1-frame-cache=cachefile name of the frame cache file\n" );
866 fprintf( stderr,
"--v1-frame-cache=cachefile name of the frame cache file\n" );
867 fprintf( stderr,
"--h1-channel-name data channel to analyze\n" );
868 fprintf( stderr,
"--h2-channel-name data channel to analyze\n" );
869 fprintf( stderr,
"--l1-channel-name data channel to analyze\n" );
870 fprintf( stderr,
"--v1-channel-name data channel to analyze\n" );
871 fprintf( stderr,
"--gps-start-time=tstart GPS start time of data to analyze (sec)\n" );
872 fprintf( stderr,
"--gps-start-time-ns=tstartns nanosecond residual of start time\n" );
873 fprintf( stderr,
"--gps-end-time=tstop GPS stop time of data to analyze (sec)\n" );
874 fprintf( stderr,
"--gps-end-time-ns=tstopns nanosecond residual of stop time\n" );
875 fprintf( stderr,
"\nsimulated data options:\n" );
876 fprintf( stderr,
"--simulated-data=dataType create simulated Gaussian noise. Can be WhiteNoise,ILIGONoise or ALIGONoise. \n" );
877 fprintf( stderr,
"--random-seed=seed random number seed for simulated data\n" );
878 fprintf( stderr,
"--sample-rate=srate sampling rate of simulated data (Hz)\n" );
879 fprintf( stderr,
"--zero-data create a time series of zeros\n" );
881 fprintf( stderr,
"\ndata conditioning options:\n" );
882 fprintf( stderr,
"--highpass-frequency=fhi high-pass filter data at frequency fhi (Hz)\n" );
883 fprintf( stderr,
"--sample-rate=srate decimate data to be at sample rate srate (Hz)\n" );
885 fprintf( stderr,
"\ncalibration options:\n" );
886 fprintf( stderr,
"--strain-data data is strain (already calibrated)\n" );
887 fprintf( stderr,
"--ligo-calibrated-data=TYPE LIGO calibrated data of TYPE real_4 or real_8\n");
888 fprintf( stderr,
"--virgo-calibrated-data=TYPE Virgo calibrated data of TYPE real_4 or real_8\n");
889 fprintf( stderr,
"--strain-data data is strain (already calibrated)\n" );
890 fprintf( stderr,
"--dynamic-range-factor=dynfac scale calibration by factor dynfac\n" );
891 fprintf( stderr,
"--fft-level=PLAN Set the fft plan to use level=PLAN\n" );
893 fprintf( stderr,
"\ndata segmentation options:\n" );
894 fprintf( stderr,
"--segment-duration=duration duration of a data segment for filtering (sec)\n" );
895 fprintf( stderr,
"--psd-segment-duration=duration duration of a data segment for PSD generation (sec)\n" );
896 fprintf( stderr,
"--block-duration=duration duration of an analysis block (sec)\n" );
897 fprintf( stderr,
"--pad-data=duration input data padding (sec)\n" );
898 fprintf( stderr,
"--h1-slide-segment=amount amount to be slid H1\n" );
899 fprintf( stderr,
"--h2-slide-segment=amount amount to be slid H2\n" );
900 fprintf( stderr,
"--l1-slide-segment=amount amount to be slid L1\n" );
901 fprintf( stderr,
"--v1-slide-segment=amount amount to be slid V1\n" );
902 fprintf( stderr,
"--do-short-slides Enabling sliding within the analysis segments. \n");
903 fprintf( stderr,
"--short-slide-offset Sets the slide amount between ifos when doing short slides.\n");
905 fprintf( stderr,
"\npower spectrum options:\n" );
906 fprintf( stderr,
"--theoretical-spectrum take the PSD as the PSD used to generate the simulated data\n" );
907 fprintf( stderr,
"--low-template-freq=fmin low frequency cutoff for generation of templates (Hz)\n" );
908 fprintf( stderr,
"--low-filter-freq=f_low low frequency cutoff for matched filtering (Hz)\n" );
909 fprintf( stderr,
"--high-filter-freq=f_max high frequency cutoff for matched filtering (Hz)\n" );
910 fprintf( stderr,
"--inverse-spec-length=t set length of inverse spectrum to t seconds\n" );
911 fprintf( stderr,
"\nbank generation options:\n" );
912 fprintf( stderr,
"--bank-file=name Location of tmpltbank xml file\n" );
913 fprintf( stderr,
"--spin-bank=name Location of output spin bank for spin checker or input spin bank for cohPTF_inspiral \n");
914 fprintf( stderr,
"--non-spin-bank=name Location of output non spin bank for spin checker or input non spin bank for cohPTF_inspiral \n");
915 fprintf( stderr,
"\nfiltering options:\n" );
916 fprintf( stderr,
"--only-segment-numbers=seglist list of segment numbers to compute\n" );
917 fprintf( stderr,
"--analyze-inj-segs-only Only analyze times when injections have been made\n" );
918 fprintf( stderr,
"--only-template-numbers=tmpltlist list of filter templates to use\n" );
919 fprintf( stderr,
"--face-on-analysis Run with templates demanding inclination=0\n" );
920 fprintf( stderr,
"--face-away-analysis Run with templates demanding inclination=pi/2\n" );
921 fprintf( stderr,
"--dynamic-template-length Run with templates whose length is dynamically set to be close to the maximum possible.\n");
922 fprintf( stderr,
"--analyse-segment-end Rather than analyse the middle half of analysis segments (1/4 to 3/4 of length), which is the default behaviour. Analyse from (1/2 - truncDuration to 1 - truncDuration of length) where truncDuration is the spectrum truncation which cannot be analysed. This is the closest to the end of the segment it is possible to analyse \n");
924 fprintf( stderr,
"\nsky location options:\n" );
925 fprintf( stderr,
"--right-ascension=ra right ascension of external trigger in degrees\n" );
926 fprintf( stderr,
"--declination=dec declination of external trigger in degrees\n" );
927 fprintf( stderr,
"--sky-error=err 1-sigma error radius in sky location of external trigger in degrees\n" );
928 fprintf( stderr,
"--timing-accuracy=t_acc Accuracy ( in seconds ) of timing information\n" );
929 fprintf( stderr,
"--sky-positions-file=name Location of sky locations file for IPN\n" );
931 fprintf( stderr,
"\ninjection options:\n" );
932 fprintf( stderr,
"--injection-file=file list of software injections to make into the data. If this option is not given injections are not made\n");
933 fprintf( stderr,
"--inj-search-window=arg output injection triggers only within arg of the injections\n");
934 fprintf( stderr,
"--inj-mchirp-window=arg search for injections only with templates with fractional mchirp distance within arg\n");
936 fprintf( stderr,
"\nTrigger extraction options:\n" );
937 fprintf( stderr,
"--snr-threshold=threshold Only keep triggers with a snr above threshold\n" );
938 fprintf( stderr,
"--spin-snr-threshold=threshold Only keep spinning triggers with a snr above threshold\n" );
939 fprintf( stderr,
"--sngl-snr-threshold Only keep triggers if at least one ifo has snr above value\n" );
940 fprintf( stderr,
"--non-spin-snr2-threshold=value SNR squared value over which a non spin trigger is considered found for spin checker program\n" );
941 fprintf( stderr,
"--spin-snr2-threshold=value SNR squared value over which a spin trigger is considered found for spin checker program\n" );
942 fprintf( stderr,
"--trig-time-window=window Keep loudest trigger within window seconds\n" );
943 fprintf( stderr,
"--do-null-stream Calculate Null SNR for potential triggers\n");
944 fprintf( stderr,
"--do-trace-snr Calculate Trace SNR for potential triggers \n");
945 fprintf( stderr,
"--do-bank-veto Calculate Bank Veto for potential triggers \n");
946 fprintf( stderr,
"--bank-veto-templates File containing templates to use for bank veto \n");
947 fprintf( stderr,
"--do-auto-veto Calculate Auto Veto for potential triggers \n");
948 fprintf( stderr,
"--do-chi-square Calculate the chi squared value for potential triggers \n");
949 fprintf( stderr,
"--num-auto-chisq-points Number of points to use in calculating auto veto \n");
950 fprintf( stderr,
"--auto-veto-time-step Seperation between points for auto veto \n");
951 fprintf( stderr,
"--num-chi-square-bins Number of bins to use to calculate chi square \n");
952 fprintf (stderr,
"--chi-square-threshold Only calculate chi square if detection statistic is above this threshold \n");
953 fprintf (stderr,
"--store-amplitude-params Calculate and store the amplitude params in the multi_inspiral table \n");
955 fprintf( stderr,
"\ntrigger output options:\n" );
956 fprintf( stderr,
"--output-file=outfile output triggers to file outfile\n" );
957 fprintf( stderr,
"--trig-start-time=sec output only triggers after GPS time sec. CURRENTLY NONFUNCTIONAL\n" );
958 fprintf( stderr,
"--trig-end-time=sec output only triggers before GPS time sec. CURRENTLY NONFUNCTIONAL\n" );
959 fprintf( stderr,
"--ifo-tag=string set ifotag to string for file naming\n" );
960 fprintf( stderr,
"--user-tag=string set the process_params usertag to string\n" );
961 fprintf( stderr,
"--do-clustering turn on clustering\n");
962 fprintf( stderr,
"--cluster-window=arg cluster window length\n");
963 fprintf( stderr,
"--write-sngl-inspiral-table Write output as sngl_inspiral\n");
965 fprintf( stderr,
"\nintermediate data output options:\n" );
966 fprintf( stderr,
"--write-raw-data write raw data before injection or conditioning\n" );
967 fprintf( stderr,
"--write-data write data after injection and conditioning\n" );
968 fprintf( stderr,
"--write-inv-spectrum write inverse power spectrum\n" );
969 fprintf( stderr,
"--write-segment write overwhitened data segments\n" );
970 fprintf( stderr,
"--write-filter-output write filtered data segments\n" );
const LALVCSInfoList lalAppsVCSInfoList
NULL-terminated list of VCS and build information for LALApps and its dependencies
int XLALSimInspiralGetApproximantFromString(const char *waveform)
int LALgetopt_long_only(int argc, char *const *argv, const char *options, const struct LALoption *long_options, int *opt_index)
#define required_argument
#define sanity_check(condition)
int coh_PTF_parse_options(struct coh_PTF_params *params, int argc, char **argv)
int coh_PTF_params_inspiral_sanity_check(struct coh_PTF_params *params)
int coh_PTF_default_params(struct coh_PTF_params *params)
int coh_PTF_usage(const char *program)
int coh_PTF_params_sanity_check(struct coh_PTF_params *params)
int error(const char *fmt,...)
INT8 epoch_to_ns(LIGOTimeGPS *epoch)
LIGOTimeGPS * XLALGPSTimeNow(LIGOTimeGPS *gpstime)
LAL_PNORDER_TWO_POINT_FIVE
LAL_PNORDER_THREE_POINT_FIVE
int XLALOutputVCSInfo(FILE *fp, const LALVCSInfoList vcs_list, const int verbose, const char *prefix)
char name[LIGOMETA_SOURCE_MAX]
REAL4 chiSquareCalcThreshold
const char * skyPositionsFile
UINT4 slideSegments[LAL_NUM_IFO+1]
const char * segmentsToDoList
const char * dataCache[LAL_NUM_IFO]
const char * bankVetoBankName
char ifoName[MAXIFO][LIGOMETA_IFO_MAX]
const char * channel[LAL_NUM_IFO]
int writeSnglInspiralTable
REAL4 lowTemplateFrequency
const char * templatesToDoList
REAL4 nonspinSNR2threshold
INT4 haveTrig[LAL_NUM_IFO]
REAL4 highFilterFrequency