#include <getopt.h>#include <math.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <lal/LALComplex.h>#include <lal/LALFrameIO.h>#include <lal/FrameCache.h>#include <lal/FrameStream.h>#include <lal/BandPassTimeSeries.h>#include <lal/Date.h>#include <lal/TimeSeries.h>#include <lal/FrequencySeries.h>#include <lal/ResampleTimeSeries.h>#include <lal/Audio.h>#include <lal/Window.h>#include <lal/RealFFT.h>#include <lal/TimeFreqFFT.h>#include <lal/Units.h>#include <lal/LALCalibration.h>#include <lal/LIGOMetadataTables.h>#include <lal/LIGOMetadataUtils.h>#include <lal/LIGOLwXML.h>#include <lal/LIGOLwXMLRead.h>#include <lal/FindChirp.h>#include <lal/GenerateBurst.h>Include dependency graph for view.c:

Go to the source code of this file.
Defines | |
| #define | LAL_USE_COMPLEX_SHORT_MACROS |
Enumerations | |
| enum | { ASCII_OUTPUT, WAVE_OUTPUT, AU_OUTPUT, PSD_OUTPUT } |
| enum | { READ_INPUT, ZERO_INPUT, IMPULSE_INPUT } |
Functions | |
| int | verbose (const char *fmt,...) |
| int | usage (const char *program) |
| int | parseopts (int argc, char **argv) |
| int | dbg_tsdump (REAL4TimeSeries *series, const char *fname) |
| int | dbg_fsdump (COMPLEX8FrequencySeries *series, const char *fname) |
| int | dbg_specdump (REAL4FrequencySeries *series, const char *fname) |
| REAL4TimeSeries * | setdata (int intype, const char *channel, LIGOTimeGPS *start, REAL8 duration, REAL8 samplerate) |
| REAL4TimeSeries * | getdata (const char *path, int cachefileflg, const char *channel, LIGOTimeGPS *start, REAL8 duration) |
| COMPLEX8FrequencySeries * | getresp (const char *calibfile, const char *channel, LIGOTimeGPS *epoch, REAL4 deltaF, UINT4 seglen, REAL8 dynrange) |
| int | inspinj (REAL4TimeSeries *series, const char *inspinjfile, const char *calfile) |
| int | burstinj (REAL4TimeSeries *series, const char *burstinjfile, const char *calfile) |
| int | resample (REAL4TimeSeries *series, REAL8 srate) |
| int | filter (REAL4TimeSeries *series, REAL8 minfreq, REAL8 maxfreq) |
| int | calibrate (REAL4TimeSeries *tseries, const char *calfile, REAL8 fmin) |
| REAL4FrequencySeries * | powerspec (REAL4TimeSeries *series, REAL8 segdur, LIGOTimeGPS *epoch, const char *calibfile, int intype) |
| int | output_psd (const char *outfile, REAL4FrequencySeries *series) |
| int | output (const char *outfile, int outtype, REAL4TimeSeries *series) |
| 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 | |
| LIGOTimeGPS | start_ |
| REAL8 | minfreq_ |
| REAL8 | maxfreq_ |
| REAL8 | srate_ |
| REAL8 | duration_ = 16.0 |
| const char * | channel_ = NULL |
| const char * | datafile_ = NULL |
| const char * | calibfile_ = NULL |
| const char * | inspinjfile_ = NULL |
| const char * | burstinjfile_ = NULL |
| const char * | outfile_ = NULL |
| UINT4 | numave_ = 0 |
| REAL8 | dynrange_ = 1 |
| int | texactflg_ = 0 |
| int | cachefileflg_ = -1 |
| int | calibflg_ = 0 |
| int | outtype_ = ASCII_OUTPUT |
| int | intype_ = READ_INPUT |
| int | verboseflg_ = 0 |
| int | debugflg_ = 0 |
| char * | optarg |
| int | optind |
| anonymous enum |
| anonymous enum |
| int usage | ( | const char * | program | ) |
| int dbg_tsdump | ( | REAL4TimeSeries * | series, | |
| const char * | fname | |||
| ) |
| int dbg_fsdump | ( | COMPLEX8FrequencySeries * | series, | |
| const char * | fname | |||
| ) |
| int dbg_specdump | ( | REAL4FrequencySeries * | series, | |
| const char * | fname | |||
| ) |
| REAL4TimeSeries * setdata | ( | int | intype, | |
| const char * | channel, | |||
| LIGOTimeGPS * | start, | |||
| REAL8 | duration, | |||
| REAL8 | samplerate | |||
| ) |
| REAL4TimeSeries * getdata | ( | const char * | path, | |
| int | cachefileflg, | |||
| const char * | channel, | |||
| LIGOTimeGPS * | start, | |||
| REAL8 | duration | |||
| ) |
| COMPLEX8FrequencySeries * getresp | ( | const char * | calibfile, | |
| const char * | channel, | |||
| LIGOTimeGPS * | epoch, | |||
| REAL4 | deltaF, | |||
| UINT4 | seglen, | |||
| REAL8 | dynrange | |||
| ) |
| int inspinj | ( | REAL4TimeSeries * | series, | |
| const char * | inspinjfile, | |||
| const char * | calfile | |||
| ) |
| int burstinj | ( | REAL4TimeSeries * | series, | |
| const char * | burstinjfile, | |||
| const char * | calfile | |||
| ) |
| int resample | ( | REAL4TimeSeries * | series, | |
| REAL8 | srate | |||
| ) |
| int filter | ( | REAL4TimeSeries * | series, | |
| REAL8 | minfreq, | |||
| REAL8 | maxfreq | |||
| ) |
| int calibrate | ( | REAL4TimeSeries * | tseries, | |
| const char * | calfile, | |||
| REAL8 | fmin | |||
| ) |
| REAL4FrequencySeries * powerspec | ( | REAL4TimeSeries * | series, | |
| REAL8 | segdur, | |||
| LIGOTimeGPS * | epoch, | |||
| const char * | calibfile, | |||
| int | intype | |||
| ) |
| int output_psd | ( | const char * | outfile, | |
| REAL4FrequencySeries * | series | |||
| ) |
| int output | ( | const char * | outfile, | |
| int | outtype, | |||
| REAL4TimeSeries * | series | |||
| ) |
| 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" );
| const char* calibfile_ = NULL |
| const char* inspinjfile_ = NULL |
| const char* burstinjfile_ = NULL |
| int texactflg_ = 0 |
| int cachefileflg_ = -1 |
| int verboseflg_ = 0 |
| char* optarg |
Definition at line 176 of file GeneralMeshTest.c.
| int optind |
Definition at line 149 of file packages/support/src/getopt.c.
1.5.2