Calibrate1800SFTs.c File Reference

#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <glob.h>
#include <lal/LALDatatypes.h>
#include <lal/LALBarycenter.h>
#include <lal/LALInitBarycenter.h>
#include <lal/LALDemod.h>

Include dependency graph for Calibrate1800SFTs.c:

Go to the source code of this file.

Data Structures

struct  CommandLineArgsTag
struct  headertag
struct  ResponseFunctionTag
struct  SensingFunctionTag
struct  FactorsTag

Defines

#define MAXFILES   70000
#define MAXFILENAMELENGTH   256
#define MAXLINESRS   4000000
#define MAXLINESF   100000
#define cmul(a, b)
#define cdiv(a, b)

Typedefs

typedef ResponseFunctionTag Response
typedef SensingFunctionTag Sensing

Functions

int ReadCommandLine (int argc, char *argv[], struct CommandLineArgsTag *CLA)
int ReadSFTDirectory (struct CommandLineArgsTag CLA)
int ReadCalibrationFiles (struct CommandLineArgsTag CLA)
int ComputeInitialRSFunctions ()
int CalibrateSfts (struct CommandLineArgsTag CLA)
int Freemem ()
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

char * optarg
int optind
int opterr
int optopt
CommandLineArgsTag CommandLineArgs
headertag header
FactorsTag Factors
COMPLEX8 tmpa
COMPLEX8 tmpb
COMPLEX8 tmpc
REAL4 tmpx
REAL4 tmpy
INT4 SFTno
INT4 RealSFTno
INT4 lalDebugLevel = 3
 DECLARE AND SET GLOBAL DEBUG LEVEL.
REAL4p
REAL4pC
char filelist [MAXFILES][MAXFILENAMELENGTH]
Sensing Sraw
Sensing So
Response Rraw
Response Ro


Define Documentation

#define MAXFILES   70000

Definition at line 43 of file Calibrate1800SFTs.c.

#define MAXFILENAMELENGTH   256

Definition at line 44 of file Calibrate1800SFTs.c.

#define MAXLINESRS   4000000

Definition at line 46 of file Calibrate1800SFTs.c.

#define MAXLINESF   100000

Definition at line 47 of file Calibrate1800SFTs.c.

#define cmul ( a,
 ) 

Value:

( tmpa = (a), tmpb = (b),   tmpc.re = tmpa.re * tmpb.re - tmpa.im * tmpb.im,   tmpc.im = tmpa.re * tmpb.im + tmpa.im * tmpb.re,   tmpc )

Definition at line 105 of file Calibrate1800SFTs.c.

#define cdiv ( a,
 ) 

Value:

( tmpa = (a), tmpb = (b),   fabs( tmpb.re ) >= fabs( tmpb.im ) ?     ( tmpx = tmpb.im / tmpb.re,       tmpy = tmpb.re + tmpx * tmpb.im,       tmpc.re = ( tmpa.re + tmpx * tmpa.im ) / tmpy,       tmpc.im = ( tmpa.im - tmpx * tmpa.re ) / tmpy,       tmpc ) :     ( tmpx = tmpb.re / tmpb.im,       tmpy = tmpb.im + tmpx * tmpb.re,       tmpc.re = ( tmpa.re * tmpx + tmpa.im ) / tmpy,       tmpc.im = ( tmpa.im * tmpx - tmpa.re ) / tmpy,       tmpc ) )

Definition at line 111 of file Calibrate1800SFTs.c.


Typedef Documentation

typedef struct ResponseFunctionTag Response

typedef struct SensingFunctionTag Sensing


Function Documentation

int ReadCommandLine ( int  argc,
char *  argv[],
struct CommandLineArgsTag CLA 
)

Definition at line 624 of file Calibrate1800SFTs.c.

int ReadSFTDirectory ( struct CommandLineArgsTag  CLA  ) 

Definition at line 590 of file Calibrate1800SFTs.c.

int ReadCalibrationFiles ( struct CommandLineArgsTag  CLA  ) 

Definition at line 483 of file Calibrate1800SFTs.c.

int ComputeInitialRSFunctions (  ) 

Definition at line 385 of file Calibrate1800SFTs.c.

int CalibrateSfts ( struct CommandLineArgsTag  CLA  ) 

Definition at line 173 of file Calibrate1800SFTs.c.

int Freemem (  ) 

Definition at line 728 of file Calibrate1800SFTs.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, &params ); 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, &param ); 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 133 of file Calibrate1800SFTs.c.


Variable Documentation

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.

struct CommandLineArgsTag CommandLineArgs

struct headertag header

struct FactorsTag Factors

COMPLEX8 tmpa

Definition at line 102 of file Calibrate1800SFTs.c.

COMPLEX8 tmpb

Definition at line 102 of file Calibrate1800SFTs.c.

COMPLEX8 tmpc

Definition at line 102 of file Calibrate1800SFTs.c.

REAL4 tmpx

Definition at line 103 of file Calibrate1800SFTs.c.

REAL4 tmpy

Definition at line 103 of file Calibrate1800SFTs.c.

INT4 SFTno

Definition at line 126 of file Calibrate1800SFTs.c.

INT4 RealSFTno

Definition at line 126 of file Calibrate1800SFTs.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 127 of file Calibrate1800SFTs.c.

REAL4* p

Definition at line 128 of file Calibrate1800SFTs.c.

REAL4 * pC

Definition at line 128 of file Calibrate1800SFTs.c.

char filelist[MAXFILES][MAXFILENAMELENGTH]

Definition at line 129 of file Calibrate1800SFTs.c.

Sensing Sraw

Definition at line 130 of file Calibrate1800SFTs.c.

Sensing So

Definition at line 130 of file Calibrate1800SFTs.c.

Response Rraw

Definition at line 131 of file Calibrate1800SFTs.c.

Response Ro

Definition at line 131 of file Calibrate1800SFTs.c.


Generated on Sun Sep 7 03:07:33 2008 for LAL by  doxygen 1.5.2