Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALApps 10.1.0.1-8a6b96f
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
inspfrinj.c File Reference

Prototypes

int arg_parse_check (int argc, char *argv[], ProcessParamsTable *procparams)
 
int main (int argc, char *argv[])
 
static void print_usage (char *program)
 

Detailed Description

Name

lalapps_inspfrinj — performs inspiral injections into frame data.

Synopsis
lalapps_inspfrinj [options]
[--help ]
[--verbose ]
[--version ]
--gps-start-time SEC
[--gps-start-time-ns NS ]
--gps-end-time SEC
[--gps-end-time-ns NS ]
[--frame-cache FRAME_CACHE
--channel-name CHAN ]
[--ifo IFO
--sample-rate SAMPLE_RATE ]
--calibration-cache CAL_CACHE
--calibrated-data TYPE
[--num-resp-points N ]
--injection-file FILE
[--inject-overhead ]
[--inject-safety SEC ]
[--write-raw-data ]
[--write-inj-only ]
[--write-raw-plus-inj ]
--output-frame-length OUTPUT_LENGTH
[--output-file-name OUTPUT_NAME ]
#define TYPE
#define IFO
#define STRING(a)
int verbose
Definition: chirplen.c:77
sigmaKerr data[0]
char * ifo
Definition: gwf2xml.c:57
#define SEC
Definition: inspawgfile.c:65
CHAR comment[LIGOMETA_COMMENT_MAX]
Definition: inspfrinj.c:350
char name[LIGOMETA_SOURCE_MAX]
Definition: inspinj.c:561
ns
help
list points
injection
time
start
int N
@ user
Definition: randombank.c:85
char * channel
int output(const char *outfile, int outtype, REAL4TimeSeries *series)
Definition: view.c:603

Description

lalapps_frinspinj generates injections and stores them as frame files. This code is essentially a copy of those parts of lalapps_inspiral responsible for reading in the data and performing the injections. The injection details are either read in from frame files containin an injection channel or from the sim_inspiral table of a LIGO lightweight xml file or Is a sim_inspiral table is given, the injections are generated using LALFindChirpInjectSignals. The injection data is output to frame files. The length of the output frames is specified by output-frame-length.

The code is capable of generating both calibrated and uncalibrated injections. To obtain calibrated h(t) injections the option calibrated-data must be specified (at present the code only works for real_4 data). Alternatively, if a CAL_CACHE is given, then uncalibrated injections will be produced using the a response function generated from the calibration data in the cache. The calibration coefficients will by default be averaged over the duration of the data. When working with uncalibrated data, the number of points used to determine the response function will have an effect, albeit minor, on the injection signals. By default, the value num-resp-points is set to 4194304. This matches the value used by lalapps_inspiral when working with 256 second segments and a channel sampled at 16384 Hz.

If input data is given by a FRAME_CACHE, the code will read in this data. In this case, the sample rate and ifo will be determined from the data and channel name respectively. The output frames can contain any of the following: raw data, injection only and raw plus injection.

If no input data is provided, then the IFO and SAMPLE_RATE must be given on the command line. Since no input data is read in, the output data can only contain the injection only channel.

The output of lalapps_frinspinj is an xml file and one or several frame files. The xml file contains process, process_params, search_summary and sim_inspiral tables and is named (unless set on the command line):

IFO-INSPFRINJ_USERTAG-GPSSTARTTIME-DURATION.xml\

where GPSSTARTTIME and DURATION are the start time and duration passed to the code. If –output-file-name is set to OUTPUT on the command line, the xml will be named

OUTPUT_USERTAG-GPSSTARTTIME-DURATION.xml.\

The sim_inspiral table contains a list of all injections which were performed into the specified data. The length of output frame files is specified by output-frame-length. Unless otherwise set on the command line, output frames are named:

IFO-INSPFRINJ_USERTAG-FRAMESTARTTIME-FRAMELENGTH.gwf\

The channels stored in the output frame are determined by which of –write-raw-data, –write-inj-only and –write-raw-plus-inj are selected. The channel names are CHAN, CHAN_INSP_INJ_ONLY and CHAN_RAW_PLUS_INSP_INJ. In the case where no input data is given, the single output channel name is IFO:STRAIN_INSP_INJ_ONLY.

Options
  • –help: Optional. Print a help message and exit.

  • –verbose: Optional. Print out the author, CVS version and tag information and exit.

  • –version: Optional. Print out the author, CVS version and tag information and exit.
  • –user-tag USERTAG: Optional. Set the user tag for this job to be USERTAG. May also be specified on the command line as -userTag for LIGO database compatibility. This will affect the naming of the output file.

  • –comment string: Optional. Add string to the comment field in the process table. If not specified, no comment is added.

  • –gps-start-time GPS seconds: Required. Start time, GPS seconds.

  • –gps-start-time-ns GPS seconds: Optional. Start time, GPS nanoseconds. If not specified, then set to zero.

  • –gps-end-time GPS seconds: Required. End time, GPS seconds.

  • –gps-end-time-ns GPS seconds: Optional. Start time, GPS nanoseconds. If not specified, then set to zero.

  • –frame-cache FRAME_CACHE: Optional. Name of the frame cache file. If this is not specified then the code will not read in any input data. Hence it will be unable to produce the raw or raw_plus_inj frames.

  • –channel-name CHAN: Optional. Input data channel name. This must be specified if the frame-cache file is specified.
  • –ifo IFO: Optional. Set input interferometer name to IFO. This information is required unless a channel-name is specified (in this case the IFO is obtained from the channel name).

  • –sample-rate SAMPLE_RATE: Optional. Set the sample rate (in Hz) at which the injections should be produced. This is required unless a frame cache is given (in this case, the sample rate of the injections matches the input data).

  • –calibration-cache CAL_CACHE: Optional. Specify the CAL_CACHE to obtain the calibration information.

  • –calibrated-data TYPE: Optional. Use calibrated data as input/output. This will produce strain data injections. This option must be specified if no calibration cache is given.
  • –num-resp-points N: Optional. The number of points used to generate the response function. If generating uncalibrated injections, this can actually change slightly the injection data. If not specified, then set to default value of 4194304.
  • –injection-channel INJ: Optional. If this option is specified, the code will read in injection data from the INJ channel and add it to the raw data. Either this option or –injection-file must be specified.
  • –injection-file FILE: Optional. Read in the injection data from FILE. This should contain a sim_inspiral table with a list of injections. Either this option or –injection-channel must be specified.

  • –inject-overhead: Optional. Perform the injections directly overhead the interferometer and optimally oriented.

  • –inject-safety SEC: Optional. Inject signals whose end time is up to SEC after the gps end time.
  • –write-raw-data: Optional. Write out a frame containing the raw data. This can only be done if the raw data has been read in from frames.

  • –write-inj-only: Optional. Write out a frame containing only the injection data.

  • –write-raw-plus-inj: Optional. Write out a frame containing the raw data with the injections added.
  • –output-frame-length OUTPUT_LENGTH: Required. Specify the length of the output frames to be output_length seconds.

  • –output-file-name OUTPUT_NAME : Optional. Set the output file name. This overrides the default file naming convention given above.

Example
lalapps_frinspinj --gps-start-time 732758030 --gps-end-time 732760078 \
--frame-cache cache/L-732758022-732763688.cache --channel-name L1:LSC-AS_Q\
--calibration-cache cache_files/L1-CAL-V03-729273600-734367600.cache \
--injection-file HL-INJECTIONS_4096-729273613-5094000.xml \
--inject-safety 50 --output-frame-length 16 \
--write-raw-data --write-inj-only --write-raw-plus-inj
#define L(i, j)

Author
Steve Fairhurst

Definition in file inspfrinj.c.

Go to the source code of this file.

Macros

#define CVS_ID_STRING   "$Id$"
 
#define CVS_NAME_STRING   "$Name$"
 
#define CVS_REVISION   "$Revision$"
 
#define CVS_SOURCE   "$Source$"
 
#define CVS_DATE   "$Date$"
 
#define PROGRAM_NAME   "inspiral"
 
#define ADD_PROCESS_PARAM(pptype, format, ppvalue)
 

Enumerations

enum  { undefined , real_4 , real_8 }
 

Variables

int vrbflg
 defined in lal/lib/std/LALError.c More...
 
INT8 gpsStartTimeNS = 0
 
LIGOTimeGPS gpsStartTime
 
INT8 gpsEndTimeNS = 0
 
LIGOTimeGPS gpsEndTime
 
INT8 inputLengthNS = 0
 
INT4 numRespPoints = -1
 
CHARfqChanName = NULL
 
CHARfrInCacheName = NULL
 
CHARinjCacheName = NULL
 
CHAR ifo [3]
 
CHAR outfileName [FILENAME_MAX]
 
enum { ... }  calData = undefined
 
INT4 sampleRate = -1
 
INT4 frameLength = -1
 
INT4 injectSafety = 0
 
UINT4 numFiles = 0
 
CHARcalCacheName = NULL
 
CHARcalFileName = NULL
 
CHARinjectionFile = NULL
 
CHARinjChanName = NULL
 
REAL4 injFlow = 0
 
int injectOverhead = 0
 
SimInspiralTableinjections = NULL
 
SimInspiralTablethisInj = NULL
 
CHARuserTag = NULL
 
int writeRawData = 0
 
int writeInjOnly = 0
 
int writeRawPlusInj = 0
 
int writeReal8Frame = 0
 
int outCompress = 0
 
CHAR comment [LIGOMETA_COMMENT_MAX]
 

Macro Definition Documentation

◆ CVS_ID_STRING

#define CVS_ID_STRING   "$Id$"

Definition at line 295 of file inspfrinj.c.

◆ CVS_NAME_STRING

#define CVS_NAME_STRING   "$Name$"

Definition at line 296 of file inspfrinj.c.

◆ CVS_REVISION

#define CVS_REVISION   "$Revision$"

Definition at line 297 of file inspfrinj.c.

◆ CVS_SOURCE

#define CVS_SOURCE   "$Source$"

Definition at line 298 of file inspfrinj.c.

◆ CVS_DATE

#define CVS_DATE   "$Date$"

Definition at line 299 of file inspfrinj.c.

◆ PROGRAM_NAME

#define PROGRAM_NAME   "inspiral"

Definition at line 300 of file inspfrinj.c.

◆ ADD_PROCESS_PARAM

#define ADD_PROCESS_PARAM (   pptype,
  format,
  ppvalue 
)
Value:
this_proc_param = this_proc_param->next = (ProcessParamsTable *) \
calloc( 1, sizeof(ProcessParamsTable) ); \
snprintf( this_proc_param->program, LIGOMETA_PROGRAM_MAX, "%s", \
snprintf( this_proc_param->param, LIGOMETA_PARAM_MAX, "--%s", \
long_options[option_index].name ); \
snprintf( this_proc_param->type, LIGOMETA_TYPE_MAX, "%s", pptype ); \
snprintf( this_proc_param->value, LIGOMETA_VALUE_MAX, format, ppvalue );
#define PROGRAM_NAME
Definition: inspfrinj.c:300

Definition at line 914 of file inspfrinj.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
undefined 
real_4 
real_8 

Definition at line 325 of file inspfrinj.c.

Function Documentation

◆ arg_parse_check()

int arg_parse_check ( int  argc,
char argv[],
ProcessParamsTable procparams 
)

Definition at line 976 of file inspfrinj.c.

◆ main()

int main ( int  argc,
char argv[] 
)

Definition at line 352 of file inspfrinj.c.

◆ print_usage()

static void print_usage ( char program)
static

Definition at line 929 of file inspfrinj.c.

Variable Documentation

◆ vrbflg

int vrbflg
extern

defined in lal/lib/std/LALError.c

◆ gpsStartTimeNS

INT8 gpsStartTimeNS = 0

Definition at line 313 of file inspfrinj.c.

◆ gpsStartTime

LIGOTimeGPS gpsStartTime

Definition at line 314 of file inspfrinj.c.

◆ gpsEndTimeNS

INT8 gpsEndTimeNS = 0

Definition at line 315 of file inspfrinj.c.

◆ gpsEndTime

LIGOTimeGPS gpsEndTime

Definition at line 316 of file inspfrinj.c.

◆ inputLengthNS

INT8 inputLengthNS = 0

Definition at line 317 of file inspfrinj.c.

◆ numRespPoints

INT4 numRespPoints = -1

Definition at line 318 of file inspfrinj.c.

◆ fqChanName

CHAR* fqChanName = NULL

Definition at line 319 of file inspfrinj.c.

◆ frInCacheName

CHAR* frInCacheName = NULL

Definition at line 320 of file inspfrinj.c.

◆ injCacheName

CHAR* injCacheName = NULL

Definition at line 321 of file inspfrinj.c.

◆ ifo

CHAR ifo[3]

Definition at line 322 of file inspfrinj.c.

◆ outfileName

CHAR outfileName[FILENAME_MAX]

Definition at line 323 of file inspfrinj.c.

◆ 

enum { ... } calData

◆ sampleRate

INT4 sampleRate = -1

Definition at line 327 of file inspfrinj.c.

◆ frameLength

INT4 frameLength = -1

Definition at line 328 of file inspfrinj.c.

◆ injectSafety

INT4 injectSafety = 0

Definition at line 329 of file inspfrinj.c.

◆ numFiles

UINT4 numFiles = 0

Definition at line 330 of file inspfrinj.c.

◆ calCacheName

CHAR* calCacheName = NULL

Definition at line 332 of file inspfrinj.c.

◆ calFileName

CHAR* calFileName = NULL

Definition at line 333 of file inspfrinj.c.

◆ injectionFile

CHAR* injectionFile = NULL

Definition at line 334 of file inspfrinj.c.

◆ injChanName

CHAR* injChanName = NULL

Definition at line 335 of file inspfrinj.c.

◆ injFlow

REAL4 injFlow = 0

Definition at line 337 of file inspfrinj.c.

◆ injectOverhead

int injectOverhead = 0

Definition at line 338 of file inspfrinj.c.

◆ injections

SimInspiralTable* injections = NULL

Definition at line 339 of file inspfrinj.c.

◆ thisInj

SimInspiralTable* thisInj = NULL

Definition at line 340 of file inspfrinj.c.

◆ userTag

CHAR* userTag = NULL

Definition at line 343 of file inspfrinj.c.

◆ writeRawData

int writeRawData = 0

Definition at line 344 of file inspfrinj.c.

◆ writeInjOnly

int writeInjOnly = 0

Definition at line 345 of file inspfrinj.c.

◆ writeRawPlusInj

int writeRawPlusInj = 0

Definition at line 346 of file inspfrinj.c.

◆ writeReal8Frame

int writeReal8Frame = 0

Definition at line 347 of file inspfrinj.c.

◆ outCompress

int outCompress = 0

Definition at line 348 of file inspfrinj.c.

◆ comment

Definition at line 350 of file inspfrinj.c.