26 #include <lal/LALStdlib.h>
27 #include <lal/PrintFTSeries.h>
28 #include <lal/Calibration.h>
30 #define TESTSTATUS( pstat ) \
31 if ( (pstat)->statusCode ) { REPORTSTATUS( pstat ); return 1; } \
34 #define TESTSTATUSERR( pstat, code ) \
35 if ( (pstat)->statusCode != code ) { REPORTSTATUS( pstat ); return 1; } \
38 const char *
usage =
"Usage: %s [options]\nOptions:\n"
39 "\t-h\t\tprint this message and exit\n"
40 "\t-d lvl\t\tset debug level to lvl\n"
41 "\t-v\t\tverbose output\n";
47 int main(
int argc,
char *argv[] )
49 enum { TransferLength = 16384 };
55 REAL8 poles[] = { 0.3, 0.5 };
56 REAL8 zeros[] = { 0.1, 0.2, 0.4 };
65 pvec.
length =
sizeof( poles ) /
sizeof( *poles );
67 zvec.
length =
sizeof( zeros ) /
sizeof( *zeros );
69 fvec.
length =
sizeof( fdata ) /
sizeof( *fdata );
76 strncpy( fser.
name,
"transfer",
sizeof( fser.
name ) );
80 while ( ++argv && --argc > 0 )
82 if ( ! strcmp( *argv,
"-d" ) )
86 else if ( ! strcmp( *argv,
"-v" ) )
90 else if ( ! strcmp( *argv,
"-h" ) )
97 fprintf( stderr,
"invalid option %s\n", *argv );
103 calrec.
zeros = &zvec;
104 calrec.
poles = &pvec;
114 badcalrec.
zeros = NULL;
119 badcalrec.
poles = NULL;
128 fputs(
"PASS: Test response to invalid data\n", stderr );
134 fputs(
"PASS: Test response to valid data\n", stderr );
137 fputs(
"PASS: All tests\n", stderr );
int main(int argc, char *argv[])
#define TESTSTATUS(pstat)
#define TESTSTATUSERR(pstat, code)
void LALCheckMemoryLeaks(void)
#define CALIBRATIONH_ENULL
Null pointer.
void LALComputeTransfer(LALStatus *status, CalibrationRecord *calrec)
UNDOCUMENTED.
double REAL8
Double precision real floating-point number (8 bytes).
float complex COMPLEX8
Single-precision floating-point complex number (8 bytes total)
void LALCPrintFrequencySeries(COMPLEX8FrequencySeries *series, const CHAR *filename)
See DATATYPE-FrequencySeries types for documentation.
Vector of type COMPLEX8, see DATATYPE-Vector types for more details.
UINT4 length
Number of elements in array.
COMPLEX8 * data
Pointer to the data array.
COMPLEX8FrequencySeries * transfer
LAL status structure, see The LALStatus structure for more details.
This structure stores units in the mksA system (plus Kelvin, Strain, and ADC Count).
Epoch relative to GPS epoch, see LIGOTimeGPS type for more details.
Vector of type REAL8, see DATATYPE-Vector types for more details.
REAL8 * data
Pointer to the data array.
UINT4 length
Number of elements in array.