# Dag Generator for Doing Faithfulness Comparisons¶

## Introduction¶

This page describes how to use the faithfulness dag generator within PyCBC.

## How to generate a workflow¶

### Creating a configuration (.ini) file¶

All the choices when setting up a faithsim are contained in a single configuration file.

Below is an example.

[inspinj]
min-mass1 =  1
max-mass1 =  100
min-spin1 = 0
max-spin1 = 0
min-mass2 = 1
max-mass2 = 100
min-spin2 = 0
max-spin2 = 0
max-mtotal = 25
min-mtotal = 2
f-lower = 30
enable-spin =
aligned =
waveform = IMRPhenomB
disable-milkyway =
i-distr = uniform
l-distr = random
min-distance = 1000
d-distr = uniform
max-distance = 1000
gps-start-time = 1000000000
gps-end-time =   1000001000
time-interval = 0.
time-step = 1.
seed = 123434
m-distr = componentMass

[executables]
faithsim = /home/ahnitz/src/pc10/pycbc/bin/pycbc_faithsim

[workflow]
templates-per-job = 100
log-path = /usr1/ahnitz/

[faithsim-flatIMRC]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = IMRPhenomC
waveform2-start-frequency=14
filter-low-frequency=15
filter-sample-rate=4096
filter-waveform-length=1024

[faithsim-flatF2]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = TaylorF2
waveform2-start-frequency = 14
waveform2-spin-order = 5
filter-low-frequency=15
filter-sample-rate=4096
filter-waveform-length=1024

[faithsim-flatSEOBNRv1]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = SEOBNRv1
waveform2-start-frequency = 14
filter-low-frequency=15
filter-sample-rate = 16384
filter-waveform-length=1024

[faithsim-flatEOBNRv2]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = EOBNRv2
waveform2-start-frequency = 14
filter-low-frequency=15
filter-sample-rate = 8192
filter-waveform-length=1024

[faithsim-flatEOBNRv2HM]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = EOBNRv2HM
waveform2-start-frequency = 14
filter-low-frequency=15
filter-sample-rate = 8192
filter-waveform-length=1024

[faithsim-flatT1]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = TaylorT1
waveform2-start-frequency=14
filter-low-frequency=15
filter-sample-rate=4096
filter-waveform-length=1024

[faithsim-flatT2]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = TaylorT2
waveform2-start-frequency=14
filter-low-frequency=15
filter-sample-rate=4096
filter-waveform-length=1024

[faithsim-flatT3]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = TaylorT3
waveform2-start-frequency=14
filter-low-frequency=15
filter-sample-rate=4096
filter-waveform-length=1024

[faithsim-flatTRD]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = PhenSpinTaylorRD
waveform2-start-frequency=14
filter-low-frequency=15
filter-sample-rate=4096
filter-waveform-length=1024

[faithsim-flatT4]
psd = aLIGOZeroDetHighPower
waveform1-approximant = IMRPhenomB
waveform1-start-frequency=14
waveform2-approximant = TaylorT4
waveform2-start-frequency=14
filter-low-frequency=15
filter-sample-rate=4096
filter-waveform-length=1024


There are four sections that must be present [inspinj], [executables], [workflow], and [faithsim-XXX].

1. inspinj

This section sets the paramaters of all of the injection waveforms. The arguments in the configuration file are fed directly to the lalapps_inspinj program to create an injection file. The same arguments are available, and the same restrictions apply. The number of injections can be set by using the gps start and end time options along with the time step. Note, however, that the waveform name is required but does not determine the actual approximants that will be compared. That is set in the [banksim] section.

2. executables

This section lists the location of the pycbc_faithsim script. Make note that the script is copied to the executables folder and that is the version that will be used.

3. workflow

This section has options that configure the workflow. The required options are ‘log-path’ and ‘templates-per-job’. The ‘log-path’ specifies the directory to store condor log files. The ‘templates-per-job’ section determines how many faithfulness calculations each job will do. The injection file is split into smaller portions to match this restriction. This option is directly proportional to the running time of each job.

Faith simulations running on LDG clusters must include the ‘accounting-group’ option in the workflow section. The value must be choosen according to the Accounting information web page.

4. faithsim-XXX Multiple sections with a a name of the form ‘faithsim-USER_STRING’ can exist. The generator will create jobs that correspond to each of these sections and each will generate an independent results file file labeled with the same USER_STRING.

These sections corresponds to the arguments sent to the banksim executable. The two approximants to compare, along with their PN order paramters (if relevant), are set here. Note that the option filter-waveform-length must be set to a value greater than the duration of the longest generated approximant.

### Generating the workflow¶

Once a configuration file as been made, create a workspace directory and place the file into it. Running the following command will generate a dag that will submit the required jobs.

pycbc_make_faithsim --conf YOUR_INI_FILE.ini


The workflow can then be submitted by running the generated shell script.

sh submit.sh


### Understanding the results¶

The main results of the faithsim are result files, one for each faithsim section in the file. These are whitespace separated ASCII files.

Some basic plots are also generated automatically and placed into the ‘plots’ folder.

The pycbc_faithsim_plots script located in the scripts folder is an example of how to read the results files.