This tutorial will help you to setup and run a offline gravitational wave search for binary neutron stars. The information contained within this document can easily be modified to perform a wide range of searches.
The offline analysis has a somewhat involved setup procedure. This documentation covers all of it. The analysis itself is performed by a pipeline contained within a dag (Directed Acyclic Graph) that is managed by condor. The dag and job sub files are produced by running gstlal_inspiral_pipe. This program requires several input files that are produced in several steps, all of which are detailed below. These input files are:
The offline analysis has a somewhat involved setup procedure which is usually performed with use of a Makefile. This documentation covers everything needed to set up a offline search. The analysis itself is performed by a pipeline contained within a dag (Directed Acyclic Graph) that is managed by condor. The dag and job sub files are produced by running gstlal_inspiral_pipe. This program requires several input files that are produced in several steps, all of which are detailed below. These input files are:
* segments.xml.gz
* vetoes.xml.gz
...
...
@@ -25,12 +25,12 @@ The offline analysis has a somewhat involved setup procedure. This documentation
The steps to produce the full analysis dag file are:
1. Analysis variables defined at the top of offline Makefile
2. Generate frame cache, segments, vetoes, and tisi files
3. Generate/copy template bank and then split this into sub-banks
4. Run gstlal_inspiral_pipe to produce offline analysis dag
1. Set analysis variables defined at top of offline Makefile.
2. Generate frame cache, segments, vetoes, and tisi files.
3. Generate/copy template bank and then split this into sub-banks.
4. Run gstlal_inspiral_pipe to produce offline analysis dag and sub files.
The information contained within this page is based off the O2 BNS test dag, an offline analysis focused on 100,000s centered around GW170817. The dag used to perform the analysis can be produced using a `Makefile <https://git.ligo.org/lscsoft/gstlal/blob/master/gstlal-inspiral/share/O3/offline/O2/Makefile.BNS_HL_test_dag_O2>`_ that generates most of the required files. This tutorial will just cover the HL detector pair configuration, though a HLV Makefile can be found `here <https://git.ligo.org/lscsoft/gstlal/blob/master/gstlal-inspiral/share/O3/offline/O2/Makefile.BNS_HLV_test_dag_O2>`_. In this tutorial we detail each stage of the Makefile needed to run an offline analysis.
The information contained within this page is based off the O2 BNS HL test dag, an offline analysis focused on 100,000s centered around GW170817. The dag used to perform the analysis can be produced using a `Makefile <https://git.ligo.org/lscsoft/gstlal/blob/master/gstlal-inspiral/share/O3/offline/O2/Makefile.BNS_HL_test_dag_O2>`_ that generates most of the required files. This tutorial will just cover the HL detector pair configuration, though a HLV Makefile can be found `here <https://git.ligo.org/lscsoft/gstlal/blob/master/gstlal-inspiral/share/O3/offline/O2/Makefile.BNS_HLV_test_dag_O2>`_. In this tutorial we detail each stage of the Makefile needed to run an offline analysis.
Analysis variables defined at the top of offline Makefile
@@ -43,7 +43,7 @@ An accounting tag used to measure LDG computational use. See https://ldas-gridmo
GROUP_USER=albert.einstein
This should be your alber.einstein user idenification. This is only needed if using a shared account. ::
This should be your albert.einstein user idenification. This is only needed if using a shared account. ::
IFOS = H1 L1
MIN_IFOS = 2
...
...
@@ -53,7 +53,7 @@ Define which detectors to include within the analysis. H1, L1, and V1 are curren
START = 1187000000
STOP = 1187100000
Set start and stop time of the analysis in GPS seconds. The times stated here are 100,000s around GW170817. See https://www.gw-openscience.org/gps/ for conversions. ::
Set start and stop time of the analysis in GPS seconds. The times stated here are 100,000s around GW170817. See https://www.gw-openscience.org/gps/ for GPS time conversions. ::
TAG = BNS_test_dag
RUN = run_1
...
...
@@ -63,11 +63,13 @@ Set output directory for summary page of results. ::
MCHIRP_INJECTIONS := 0.5:100.0:1_injections.xml
Used to specify injection file, and chirpmass range over which to filter it. Multiple injection files can be given at once, these should be space separated, with no whitespace at the end of the line. ::
Used to specify injection file, and chirpmass range over which to filter it. Multiple injection files can be given at once, these should be space separated, with no whitespace at the end of the line.
**NOTE, an injection file must be passed to gstlal_inspiral_pipe, it is unable to run without one.** ::
Veto definer file. Used to determine what data to veto. See https://git.ligo.org/detchar/veto-definitions/tree/master/cbc for all veto definer files. ::
Veto definer file. Used to determine which data to veto. See https://git.ligo.org/detchar/veto-definitions/tree/master/cbc for all veto definer files. ::
# GSTLAL_SEGMENTS Options
SEG_SERVER=https://segments.ligo.org
...
...
@@ -84,25 +86,24 @@ Veto definer file. Used to determine what data to veto. See https://git.ligo.org
H1_CHANNEL=DCH-CLEAN_STRAIN_C02
L1_CHANNEL=DCH-CLEAN_STRAIN_C02
Gravitational wave data segment, frame type, and channel name information. See https://wiki.ligo.org/LSC/JRPComm/ for full information about all observing runs. ::
Gravitational wave data segment, frame type, and channel name information. See https://wiki.ligo.org/LSC/JRPComm/ for full details about all observing runs. ::
include /path/to/Makefile.offline_analysis_rules
Full path to [Makefile.offline_analysis_rules](https://git.ligo.org/lscsoft/gstlal/blob/master/gstlal-inspiral/share/Makefile.offline_analysis_rules). This file contains sets of rules for string parsing/manipulation used within the main Makefile and an up-to-date version must be included.
Generate segments, vetoes, frame cache, and tisi files
Generate frame cache, segments, vetoes, and tisi files
The frame.cache file contains the full paths to the Gravitational Wave data .gwf files using the following format:
Detector site identifier, frame type, start GPS time, duration, full path to file ::
H H1__H1_CLEANED_HOFT_C02 1186998263 4096 file://localhost/hdfs/frames/O2/hoft_C02_clean/H1/H-H1_CLEANED_HOFT_C02-11869/H-H1_CLEANED_HOFT_C02-1186998263-4096.gwf
If the .gwf data files are stored locally, then you can produce individual detector frame cache files with::
The segments.xml.gz file contains a list of all data segments that should be analysed. The vetoes.xml.gz file contains a list of all data segments that should be ignored. ::
...
...
@@ -137,7 +138,6 @@ This returns an initial segments list. This command makes use of some Makefile v
This queries the ligo segment server for all veto types (CAT1, CAT2, and CAT3) that are defined within the veto definer file ::
Include gating times into CAT3 veto times files. ::
Include gating times into CAT3 veto times files. The gating files contain aditional times to veto that are not included within the veto definer file. The ascii files are converted into readable xml files with lauras_txt_files_to_xml. ::
The next step is to acquire a template bank that will be used to filter the data. The BNS Makefile produces its own BNS template bank containing ~13,500 templates (parameters are shown below) but there are also existing template bank that can be used. If you are using a pre-existing template bank, then much of the next two sections can be ignored/removed. ::
The next step is to acquire a template bank that will be used to filter the data. The BNS Makefile produces its own BNS template bank containing ~13,500 templates (parameters are shown below) but there are also existing template bank that can be used. If you are using a pre-existing template bank, then much of the next two sections can be ignored/removed, though some parameters are still used.
**Note. lalapps_tmpltbank is deprecated code and should not be used for actual analyses. It is used here as it is faster to run than more modern codes such as `lalapps_cbc_sbank <https://lscsoft.docs.ligo.org/lalsuite/lalapps/namespacelalapps__cbc__sbank.html>`_. ** ::
############################
# Template bank parameters #
...
...
@@ -220,63 +222,63 @@ The next step is to acquire a template bank that will be used to filter the data
Template bank parameters. The bank is then produced with this command::
lalapps_tmpltbank is a rather old program and newer ones exist, such as lalapps_cbc_sbank. Which ever program you use to generate the bank, gstlal_inspiral_add_template_ids needs to be run on it in order to work with the mass model used in the main analysis. ::
After obtaining a bank gstlal_inspiral_add_template_ids needs to be run on it in order to work with the mass model used in the main analysis. ::
mkdir -p $*_split_bank
gstlal_bank_splitter \
--f-low $(LOW_FREQUENCY_CUTOFF) \
--group-by-chi $(NUM_CHI_BINS) \
--output-path $*_split_bank \
--approximant $(APPROXIMANT1) \
--approximant $(APPROXIMANT2) \
--output-cache $@ \
--overlap $(OVERLAP) \
--instrument $* \
--n $(NUM_SPLIT_TEMPLATES) \
--sort-by mchirp \
--max-f-final $(HIGH_FREQUENCY_CUTOFF) \
--write-svd-caches \
--num-banks $(NUMBANKS) \
H1-TMPLTBANK-$(START)-2048.xml
--f-low $(LOW_FREQUENCY_CUTOFF) \
--group-by-chi $(NUM_CHI_BINS) \
--output-path $*_split_bank \
--approximant $(APPROXIMANT1) \
--approximant $(APPROXIMANT2) \
--output-cache $@ \
--overlap $(OVERLAP) \
--instrument $* \
--n $(NUM_SPLIT_TEMPLATES) \
--sort-by mchirp \
--max-f-final $(HIGH_FREQUENCY_CUTOFF) \
--write-svd-caches \
--num-banks $(NUMBANKS) \
H1-TMPLTBANK-$(START)-2048.xml
This program needs to be run on the template bank being used to split it up into sub banks that will be passed to the singular value decompositon code within the pipeline.
...
...
@@ -286,35 +288,35 @@ Run gstlal_inspiral_pipe to produce offline analysis dag
The final stage of the Makefile that produces the analysis dag. ::
gstlal_inspiral_pipe \
--data-source frames \
--gps-start-time $(START) \
--gps-end-time $(STOP) \
--frame-cache frame.cache \
--frame-segments-file segments.xml.gz \
--vetoes vetoes.xml.gz \
--frame-segments-name datasegments \
--control-peak-time $(PEAK) \
--template-bank H1-TMPLTBANK-$(START)-2048.xml \
--num-banks $(NUMBANKS) \
--fir-stride 1 \
--web-dir $(WEBDIR) \
--time-slide-file tisi.xml \
--inj-time-slide-file inj_tisi.xml \
$(INJECTION_LIST) \
--bank-cache $(BANK_CACHE_STRING) \
--tolerance 0.9999 \
--overlap $(OVERLAP) \
--flow $(LOW_FREQUENCY_CUTOFF) \
$(CHANNEL_NAMES) \
--autocorrelation-length $(AC_LENGTH) \
$(ADDITIONAL_DAG_OPTIONS) \
$(CONDOR_COMMANDS) \
--ht-gate-threshold-linear 0.8:15.0-45.0:100.0 \
--request-cpu 2 \
--request-memory 5GB \
--min-instruments $(MIN_IFOS) \
--ranking-stat-samples 4194304 \
--mass-model=ligo
--data-source frames \
--gps-start-time $(START) \
--gps-end-time $(STOP) \
--frame-cache frame.cache \
--frame-segments-file segments.xml.gz \
--vetoes vetoes.xml.gz \
--frame-segments-name datasegments \
--control-peak-time $(PEAK) \
--template-bank H1-TMPLTBANK-$(START)-2048.xml \
--num-banks $(NUMBANKS) \
--fir-stride 1 \
--web-dir $(WEBDIR) \
--time-slide-file tisi.xml \
--inj-time-slide-file inj_tisi.xml \
$(INJECTION_LIST) \
--bank-cache $(BANK_CACHE_STRING) \
--tolerance 0.9999 \
--overlap $(OVERLAP) \
--flow $(LOW_FREQUENCY_CUTOFF) \
$(CHANNEL_NAMES) \
--autocorrelation-length $(AC_LENGTH) \
$(ADDITIONAL_DAG_OPTIONS) \
$(CONDOR_COMMANDS) \
--ht-gate-threshold-linear 0.8:15.0-45.0:100.0 \
--request-cpu 2 \
--request-memory 5GB \
--min-instruments $(MIN_IFOS) \
--ranking-stat-samples 4194304 \
--mass-model=ligo
sed -i '1s/^/JOBSTATE_LOG logs\/trigger_pipe.jobstate.log\n/' trigger_pipe.dag