#include <errno.h>#include <unistd.h>#include <sys/types.h>#include <fcntl.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <math.h>#include <glob.h>#include <time.h>#include <getopt.h>#include <lal/LALDatatypes.h>#include <lal/LALConstants.h>#include <lal/Random.h>#include "GenerateBinaryMesh_v1.h"#include "GenerateRandomBinaryInput_v1.h"Include dependency graph for GenerateRandomBinaryInput_v1.c:

Go to the source code of this file.
| int GenRandomParams | ( | RandomParameters * | ) |
Definition at line 379 of file GenerateRandomBinaryInput_v1.c.
| int OutputRandomConfigFile | ( | char * | , | |
| RandomParameters * | , | |||
| RandomParameters * | ||||
| ) |
Definition at line 786 of file GenerateRandomBinaryInput_v1.c.
| int ReadCommandLine | ( | int | argc, | |
| char * | argv[] | |||
| ) |
| int ReadOrbitalParams | ( | char * | , | |
| RandomParameters * | ||||
| ) |
Definition at line 257 of file GenerateRandomBinaryInput_v1.c.
| int AddRandomParams | ( | RandomParameters * | ) |
Definition at line 177 of file GenerateRandomBinaryInput_v1.c.
| int InitialiseRandParams | ( | RandomParameters * | ) |
Definition at line 349 of file GenerateRandomBinaryInput_v1.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 97 of file GenerateRandomBinaryInput_v1.c.
| INT4 lalDebugLevel = 3 |
DECLARE AND SET GLOBAL DEBUG LEVEL.
see the section (currently 7.4.1) of the LSD on "Status-reporting objects" for a list of predefined debug levels
Definition at line 47 of file GenerateRandomBinaryInput_v1.c.
Definition at line 50 of file GenerateRandomBinaryInput_v1.c.
Definition at line 50 of file GenerateRandomBinaryInput_v1.c.
Definition at line 50 of file GenerateRandomBinaryInput_v1.c.
Definition at line 50 of file GenerateRandomBinaryInput_v1.c.
Definition at line 51 of file GenerateRandomBinaryInput_v1.c.
Definition at line 51 of file GenerateRandomBinaryInput_v1.c.
Definition at line 51 of file GenerateRandomBinaryInput_v1.c.
Definition at line 51 of file GenerateRandomBinaryInput_v1.c.
Definition at line 51 of file GenerateRandomBinaryInput_v1.c.
Definition at line 51 of file GenerateRandomBinaryInput_v1.c.
Definition at line 51 of file GenerateRandomBinaryInput_v1.c.
Definition at line 51 of file GenerateRandomBinaryInput_v1.c.
Definition at line 52 of file GenerateRandomBinaryInput_v1.c.
Definition at line 52 of file GenerateRandomBinaryInput_v1.c.
Definition at line 53 of file GenerateRandomBinaryInput_v1.c.
Definition at line 53 of file GenerateRandomBinaryInput_v1.c.
Definition at line 54 of file GenerateRandomBinaryInput_v1.c.
Definition at line 54 of file GenerateRandomBinaryInput_v1.c.
Definition at line 55 of file GenerateRandomBinaryInput_v1.c.
| CHAR primarystampsfile[256] |
Definition at line 55 of file GenerateRandomBinaryInput_v1.c.
| CHAR secondarystampsfile[256] |
Definition at line 55 of file GenerateRandomBinaryInput_v1.c.
| CHAR primarytemplatefile[256] |
Definition at line 56 of file GenerateRandomBinaryInput_v1.c.
Definition at line 56 of file GenerateRandomBinaryInput_v1.c.
| CHAR primaryoutputfile[256] |
Definition at line 57 of file GenerateRandomBinaryInput_v1.c.
| CHAR secondaryoutputfile[256] |
Definition at line 57 of file GenerateRandomBinaryInput_v1.c.
| CHAR primarynoisedir[256] |
Definition at line 58 of file GenerateRandomBinaryInput_v1.c.
| CHAR secondarynoisedir[256] |
Definition at line 58 of file GenerateRandomBinaryInput_v1.c.
| CHAR primarysftbase[256] |
Definition at line 59 of file GenerateRandomBinaryInput_v1.c.
| CHAR secondarysftbase[256] |
Definition at line 59 of file GenerateRandomBinaryInput_v1.c.
Definition at line 60 of file GenerateRandomBinaryInput_v1.c.
Definition at line 60 of file GenerateRandomBinaryInput_v1.c.
Definition at line 60 of file GenerateRandomBinaryInput_v1.c.
Definition at line 60 of file GenerateRandomBinaryInput_v1.c.
Definition at line 61 of file GenerateRandomBinaryInput_v1.c.
Definition at line 61 of file GenerateRandomBinaryInput_v1.c.
Definition at line 62 of file GenerateRandomBinaryInput_v1.c.
Definition at line 63 of file GenerateRandomBinaryInput_v1.c.
Definition at line 63 of file GenerateRandomBinaryInput_v1.c.
Definition at line 64 of file GenerateRandomBinaryInput_v1.c.
Definition at line 64 of file GenerateRandomBinaryInput_v1.c.
Definition at line 67 of file GenerateRandomBinaryInput_v1.c.
Definition at line 68 of file GenerateRandomBinaryInput_v1.c.
Definition at line 69 of file GenerateRandomBinaryInput_v1.c.
Definition at line 70 of file GenerateRandomBinaryInput_v1.c.
| BOOLEAN periodflag = 0 |
Definition at line 71 of file GenerateRandomBinaryInput_v1.c.
Definition at line 72 of file GenerateRandomBinaryInput_v1.c.
Definition at line 73 of file GenerateRandomBinaryInput_v1.c.
Definition at line 74 of file GenerateRandomBinaryInput_v1.c.
Definition at line 75 of file GenerateRandomBinaryInput_v1.c.
Definition at line 76 of file GenerateRandomBinaryInput_v1.c.
| BOOLEAN cosiotaflag = 0 |
Definition at line 77 of file GenerateRandomBinaryInput_v1.c.
Definition at line 78 of file GenerateRandomBinaryInput_v1.c.
Definition at line 79 of file GenerateRandomBinaryInput_v1.c.
| BOOLEAN tstartflag = 0 |
Definition at line 80 of file GenerateRandomBinaryInput_v1.c.
Definition at line 81 of file GenerateRandomBinaryInput_v1.c.
Definition at line 82 of file GenerateRandomBinaryInput_v1.c.
| BOOLEAN stampsflag = 0 |
Definition at line 83 of file GenerateRandomBinaryInput_v1.c.
| BOOLEAN allskyflag = 0 |
Definition at line 84 of file GenerateRandomBinaryInput_v1.c.
Definition at line 85 of file GenerateRandomBinaryInput_v1.c.
| char* optarg |
Definition at line 176 of file GeneralMeshTest.c.
| int optind |
Definition at line 149 of file packages/support/src/getopt.c.
| int opterr |
Definition at line 169 of file packages/support/src/getopt.c.
| int optopt |
Definition at line 175 of file packages/support/src/getopt.c.
1.5.2