#include <config.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <getopt.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <regex.h>#include <time.h>#include <math.h>#include <FrameL.h>#include <lalapps.h>#include <series.h>#include <processtable.h>#include <lalappsfrutils.h>#include <lal/LALRCSID.h>#include <lal/LALConfig.h>#include <lal/LALStdio.h>#include <lal/LALStdlib.h>#include <lal/LALError.h>#include <lal/LALDatatypes.h>#include <lal/AVFactories.h>#include <lal/LALConstants.h>#include <lal/FrameStream.h>#include <lal/DataBuffer.h>#include <lal/LIGOMetadataTables.h>#include <lal/LIGOMetadataUtils.h>#include <lal/LIGOLwXML.h>#include <lal/LIGOLwXMLRead.h>#include <lal/Date.h>#include <lal/Units.h>#include <lal/FindChirp.h>#include <lal/FindChirpSP.h>#include <lal/FindChirpBCV.h>#include <lal/FindChirpBCVSpin.h>#include <lal/FindChirpChisq.h>#include <lal/StochasticCrossCorrelation.h>#include <lal/DetectorSite.h>#include <lal/Random.h>#include <lal/LALInspiral.h>#include <lal/CoherentInspiral.h>#include <lal/NullStatistic.h>#include <lal/LALStatusMacros.h>#include <lal/SkyCoordinates.h>Include dependency graph for nullstream.c:

Go to the source code of this file.
Defines | |
| #define | CVS_ID_STRING "$Id: nullstream.c,v 1.23 2007/07/18 22:48:40 emessarit Exp $" |
| #define | CVS_REVISION "$Revision: 1.23 $" |
| #define | CVS_SOURCE "$Source: /usr/local/cvs/lscsoft/lalapps/src/inspiral/nullstream.c,v $" |
| #define | CVS_DATE "$Date: 2007/07/18 22:48:40 $" |
| #define | PROGRAM_NAME "nullstream" |
| #define | CVS_NAME_STRING "$Name: $" |
| #define | rint(x) (floor((x)+0.5)) |
| #define | ADD_PROCESS_PARAM(pptype, format, ppvalue) |
| #define | USAGE1 |
| #define | USAGE2 |
| #define | USAGE3 |
Functions | |
| RCSID ("$Id: nullstream.c,v 1.23 2007/07/18 22:48:40 emessarit Exp $") | |
| int | arg_parse_check (int argc, char *argv[], MetadataTable procparams) |
| int | main (int argc, char *argv[]) |
| MAIN function of SideBandMCMC code Compute the posterior pdfs of the orbital and nuisance parameters of a binary signal in Fstat form. | |
Variables | |
| int | vrbflg |
| INT4 | sampleRate = -1 |
| INT4 | numPointsSeg = -1 |
| REAL4 | dynRangeExponent = -1 |
| char | ifoframefile [LAL_NUM_IFO][256] |
| INT4 | H1file = 0 |
| INT4 | H2file = 0 |
| INT4 | L1file = 0 |
| INT4 | G1file = 0 |
| INT4 | T1file = 0 |
| INT4 | V1file = 0 |
| REAL8 | slideStep [LAL_NUM_IFO] = {0.0,0.0,0.0,0.0,0.0,0.0} |
| int | bankDuration = 0 |
| CHAR * | cohbankFileName = NULL |
| CHAR * | xmlFileNameH1 = NULL |
| CHAR * | xmlFileNameH2 = NULL |
| int | nullStatOut = 0 |
| int | eventsOut = 0 |
| REAL4 | nullStatThresh = -1 |
| INT4 | maximizeOverChirp = 0 |
| CHAR | outputPath [FILENAME_MAX] |
| CHAR * | frInType = NULL |
| INT8 | gpsStartTimeNS = 0 |
| LIGOTimeGPS | gpsStartTime |
| INT8 | gpsEndTimeNS = 0 |
| LIGOTimeGPS | gpsEndTime |
| int | gpsStartTimeTemp = 0 |
| int | gpsEndTimeTemp = 0 |
| LALStatus | status |
| LALLeapSecAccuracy | accuracy = LALLEAPSEC_LOOSE |
| CHAR * | userTag = NULL |
| CHAR * | ifoTag = NULL |
| #define CVS_ID_STRING "$Id: nullstream.c,v 1.23 2007/07/18 22:48:40 emessarit Exp $" |
Definition at line 86 of file nullstream.c.
| #define CVS_REVISION "$Revision: 1.23 $" |
Definition at line 87 of file nullstream.c.
| #define CVS_SOURCE "$Source: /usr/local/cvs/lscsoft/lalapps/src/inspiral/nullstream.c,v $" |
Definition at line 88 of file nullstream.c.
| #define CVS_DATE "$Date: 2007/07/18 22:48:40 $" |
Definition at line 89 of file nullstream.c.
| #define PROGRAM_NAME "nullstream" |
Definition at line 90 of file nullstream.c.
| #define CVS_NAME_STRING "$Name: $" |
Definition at line 91 of file nullstream.c.
Definition at line 95 of file nullstream.c.
| #define ADD_PROCESS_PARAM | ( | pptype, | |||
| format, | |||||
| ppvalue | ) |
Value:
this_proc_param = this_proc_param->next = (ProcessParamsTable *) calloc( 1, sizeof(ProcessParamsTable) ); LALSnprintf( this_proc_param->program, LIGOMETA_PROGRAM_MAX, "%s", PROGRAM_NAME ); LALSnprintf( this_proc_param->param, LIGOMETA_PARAM_MAX, "--%s", long_options[option_index].name ); LALSnprintf( this_proc_param->type, LIGOMETA_TYPE_MAX, "%s", pptype ); LALSnprintf( this_proc_param->value, LIGOMETA_VALUE_MAX, format, ppvalue );
Definition at line 747 of file nullstream.c.
| #define USAGE1 |
Value:
"lalapps_nullstream [options]\n"" --help display this message\n"" --verbose print progress information\n"" --version print version information and exit\n"" --debug-level LEVEL set the LAL debug level to LEVEL\n"" --ifo-tag STRING set STRING to the ifo-tag of the bank file\n"" --user-tag STRING set STRING to tag the file names\n""\n"
Definition at line 758 of file nullstream.c.
| #define USAGE2 |
Value:
" --cohbank-file COHBANKFILE read template bank parameters from COHBANKFILE\n"" --sample-rate RATE set data sample rate to RATE\n"" --segment-length LEN set LEN to same value used in inspiral.c\n"" --dynamic-range-exponent N set N to same value used in inspiral.c\n"" [--h1-slide H1_SLIDE Slide H1 data by multiples of H1_SLIDE]\n"" [--h2-slide H2_SLIDE Slide H2 data by multiples of H2_SLIDE]\n"" --frame-type TAG input data is contained in frames of type TAG\n""\n"
Definition at line 767 of file nullstream.c.
| #define USAGE3 |
Value:
" --write-events write events\n"" --write-nullstat-series write null statistic time series\n"" --output-path write files here\n"" --h1-framefile frame data for H1\n"" --h2-framefile frame data for H2\n"" --h1-xml-file H1 inspiral triggers\n"" --h2-xml-file H2 inspiral triggers\n""\n"
Definition at line 776 of file nullstream.c.
| RCSID | ( | "$Id: nullstream. | c, | |
| v 1.23 2007/07/18 22:48:40 emessarit Exp $" | ||||
| ) |
| int arg_parse_check | ( | int | argc, | |
| char * | argv[], | |||
| MetadataTable | procparams | |||
| ) |
Definition at line 233 of file FittingFactors.c.
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
MAIN function of SideBandMCMC code Compute the posterior pdfs of the orbital and nuisance parameters of a binary signal in Fstat form.
..
variable declarations
the status must be initially blank; this can be done by making it static:
static LALStatus status;
other variables:
ExampleOutput output; ExampleInput input; ExampleParams params;
parse arguments, if desired
for example:
program = *argv; while ( --argc > 0 ) { ++argv; if ( ! strcmp( *argv, "-d" ) ) { --argc; ++argv; lalDebugLevel = atoi( *argv ); continue; } if ( ! strcmp( *argv, "-v" ) ) { verbose = 1; continue; } if ( ! strcmp( *argv, "-h" ) ) { fprintf( stderr, usage, program ); return 0; } fprintf( stderr, "no such option %s\n", *argv ); fprintf( stderr, usage, program ); return FAIL_ARGS; }
/** test response to invalid data
these tests must be wrapped so they are not done when debugging is disabled:
ifndef LAL_NDEBUG if ( ! lalNoDebug ) { LALExample( &status, NULL, &input, ¶ms ); if ( status.statusCode != EXAMPLEH_ENULL || strcmp( status.statusDescription, EXAMPLEH_MSGENULL ) ) { fprintf( stderr, "incorrect error code %d and message %s\n", status.statusCode, status.statusDescription ); fprintf( stderr, "expecting error code %d and message %s\n", EXAMPLEH_ENULL, EXAMPLEH_MSGENULL ); return FAIL_CODE; }
fputs( "PASS: Test response to invalid data\n", stderr ); } endif
test response to valid data
for example:
LALExample( &status, &output, &input, ¶m ); if ( status.statusCode ) { fprintf( stderr, "received error code %d and message %s\n", status.statusCode, status.statusDescription ); return FAIL_ESUB; }
(perform checks on the contents of output too!)
during default operation, output to the screen should be minimal:
for ( i = 0; i < 1048576; ++i ) printf( "%d\n", i ); !!! BAD !!!
but it is OK to indicate that tests have passed:
fputs( "PASS: Test response to valid data\n", stderr );
check for memory leaks and return success:
LALCheckMemoryLeaks(); fputs( "PASS: All tests\n" );
Definition at line 145 of file nullstream.c.
| INT4 sampleRate = -1 |
Definition at line 103 of file nullstream.c.
| INT4 numPointsSeg = -1 |
Definition at line 104 of file nullstream.c.
| REAL4 dynRangeExponent = -1 |
Definition at line 105 of file nullstream.c.
| char ifoframefile[LAL_NUM_IFO][256] |
Definition at line 109 of file nullstream.c.
Definition at line 111 of file nullstream.c.
Definition at line 112 of file nullstream.c.
Definition at line 113 of file nullstream.c.
Definition at line 114 of file nullstream.c.
Definition at line 115 of file nullstream.c.
Definition at line 116 of file nullstream.c.
Definition at line 119 of file nullstream.c.
| int bankDuration = 0 |
Definition at line 120 of file nullstream.c.
| CHAR* cohbankFileName = NULL |
Definition at line 121 of file nullstream.c.
| CHAR* xmlFileNameH1 = NULL |
Definition at line 122 of file nullstream.c.
| CHAR* xmlFileNameH2 = NULL |
Definition at line 123 of file nullstream.c.
| int nullStatOut = 0 |
Definition at line 124 of file nullstream.c.
| int eventsOut = 0 |
Definition at line 125 of file nullstream.c.
| REAL4 nullStatThresh = -1 |
Definition at line 126 of file nullstream.c.
Definition at line 127 of file nullstream.c.
| CHAR outputPath[FILENAME_MAX] |
Definition at line 128 of file nullstream.c.
Definition at line 129 of file nullstream.c.
| INT8 gpsStartTimeNS = 0 |
Definition at line 131 of file nullstream.c.
Definition at line 132 of file nullstream.c.
| INT8 gpsEndTimeNS = 0 |
Definition at line 133 of file nullstream.c.
Definition at line 134 of file nullstream.c.
| int gpsStartTimeTemp = 0 |
Definition at line 135 of file nullstream.c.
| int gpsEndTimeTemp = 0 |
Definition at line 136 of file nullstream.c.
Definition at line 138 of file nullstream.c.
| LALLeapSecAccuracy accuracy = LALLEAPSEC_LOOSE |
Definition at line 139 of file nullstream.c.
Definition at line 141 of file nullstream.c.
Definition at line 142 of file nullstream.c.
1.5.2