Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInspiral 5.0.3.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
BasicInjectTest.c File Reference

Injects inspiral signals into detector noise. More...

Detailed Description

Injects inspiral signals into detector noise.

Author
Creighton, T. D.

Usage

BasicInjectTest [-s sourcefile] [-r respfile] [-o outfile] [-e seed]
[-i infile | -n sec nsec npt dt sigma] [-d debuglevel]
int s
double i
double e
static const INT4 r
int n
char * outfile

Description

This program generates inspiral waveforms with specified parameters, and injects them into ADC data. The following option flags are accepted:

  • [-s] Reads source information from the file sourcefile. If absent, it injects a single 1.4 \(M_\odot\)–1.4 \(M_\odot\) inspiral, optimally oriented, at a distance of \(10^{-5}\) solar Schwarzschild radii ( \(0.00002GM_\odot/c^2\)).
  • [-r] Reads a detector response function from the file respfile. If absent, it generates raw dimensionless strain.
  • [-i] Reads ADC input from the file infile. This takes precedence over the -n option, below.
  • [-n] Generates random ADC input data starting from a GPS epoch of sec seconds plus nsec nanoseconds, with npt data sampled at dt second intervals, with white Gaussian noise having standard deviation sigma. If neither -i (above) nor -n are given, the program assumes -n 0 0 1048576 9.765625e-4 0.0.
  • [-o] Writes injected ADC data to the file outfile. If absent, the routines are exercised, but no output is written.
  • [-d] Sets the debug level to debuglevel. If not specified, level 0 is assumed.
  • [-r] Sets the random number seed to randomseed. If not specified, the seed is gerenated from the current time.
Format for sourcefile:
The source file consists of any number of lines of data, each specifying a chirp waveform. Each line must begin with a character code (CHAR equal to one of 'i', 'f', or 'c'), followed by 6 whitespace-delimited numerical fields: the GPS epoch of the chirp (INT8 nanoseconds), the two binary masses (REAL4 \(M_\odot\)), the distance to the source (REAL4 kpc), and the source's inclination and phase at coalescence (REAL4 degrees). The character codes have the following meanings:
  • ['i'] The epoch represents the GPS time of the start of the chirp waveform.
  • ['f'] The epoch represents the GPS time of the end of the chirp waveform.
  • ['c'] The epoch represents the GPS time when the binaries would coalesce in the point-mass approximation.
Thus a typical input line for two \(1.4M_\odot\) objects at 11\,000\,kpc inclined \(30^\circ\) with an initial phase of \(45^\circ\), coalescing at 315\,187\,245 GPS seconds, will have the following line in the input file:
c 315187245000000000 1.4 1.4 11000.0 30.0 45.0
c
Format for respfile:
The response function \(R(f)\) gives the real and imaginary components of the transformation from ADC output \(o\) to tidal strain \(h\) via \(\tilde{h}(f)=R(f)\tilde{o}(f)\). It is inverted internally to give the detector transfer function \(T(f)=1/R(f)\). The format respfile is a header specifying the GPS epoch \(t_0\) at which the response was taken (INT8 nanoseconds), the lowest frequency \(f_0\) at which the response is given (REAL8 Hz), and the frequency sampling interval \(\Delta f\) (REAL8 Hz):
# epoch = \(t_0\)
# f0 = \(f_0\)
# deltaF = \(\Delta f\)

followed by two columns of REAL4 data giving the real and imaginary components of \(R(f_0+k\Delta f)\).

Format for infile:
The input file consists of a header giving the GPS epoch \(t_0\) of the first time sample (INT8 nanoseconds) and the sampling interval \(\Delta t\) (REAL8 seconds):
# epoch = \(t_0\)
# deltaT = \(\Delta t\)

followed by a single column of ADC data. The ADC data should be integers in the range of an INT2 (from \(-32768\) to \(32767\)), but is assumed to be written in floating-point notation in accordance with frame format.

The output file outfile containing injected data is written in the same format.

Definition in file BasicInjectTest.c.

Go to the source code of this file.

Macros

Error Codes
#define BASICINJECTTESTC_ENORM   0
 Normal exit. More...
 
#define BASICINJECTTESTC_ESUB   1
 Subroutine failed. More...
 
#define BASICINJECTTESTC_EARG   2
 Error parsing arguments. More...
 
#define BASICINJECTTESTC_EVAL   3
 Input argument out of valid range. More...
 
#define BASICINJECTTESTC_EFILE   4
 Could not open file. More...
 
#define BASICINJECTTESTC_EINPUT   5
 Error reading file. More...
 
#define BASICINJECTTESTC_EMEM   6
 Out of memory. More...
 

Macro Definition Documentation

◆ BASICINJECTTESTC_ENORM

#define BASICINJECTTESTC_ENORM   0

Normal exit.

Definition at line 131 of file BasicInjectTest.c.

◆ BASICINJECTTESTC_ESUB

#define BASICINJECTTESTC_ESUB   1

Subroutine failed.

Definition at line 132 of file BasicInjectTest.c.

◆ BASICINJECTTESTC_EARG

#define BASICINJECTTESTC_EARG   2

Error parsing arguments.

Definition at line 133 of file BasicInjectTest.c.

◆ BASICINJECTTESTC_EVAL

#define BASICINJECTTESTC_EVAL   3

Input argument out of valid range.

Definition at line 134 of file BasicInjectTest.c.

◆ BASICINJECTTESTC_EFILE

#define BASICINJECTTESTC_EFILE   4

Could not open file.

Definition at line 135 of file BasicInjectTest.c.

◆ BASICINJECTTESTC_EINPUT

#define BASICINJECTTESTC_EINPUT   5

Error reading file.

Definition at line 136 of file BasicInjectTest.c.

◆ BASICINJECTTESTC_EMEM

#define BASICINJECTTESTC_EMEM   6

Out of memory.

Definition at line 137 of file BasicInjectTest.c.