From 5b20c0eca2ee778f02f634095ecc17ea2a352b74 Mon Sep 17 00:00:00 2001
From: Chad Hanna <chad.hanna@ligo.org>
Date: Fri, 22 Feb 2019 13:52:46 -0500
Subject: [PATCH] Add some online configuration files

---
 .../share/O3/online/svd/Makefile.bbh_svd      | 73 +++++++++++++++++++
 .../share/O3/online/svd/Makefile.bns_svd      | 72 ++++++++++++++++++
 .../share/O3/online/svd/Makefile.imbh_svd     | 72 ++++++++++++++++++
 .../share/O3/online/svd/Makefile.nsbh_svd     | 72 ++++++++++++++++++
 4 files changed, 289 insertions(+)
 create mode 100644 gstlal-inspiral/share/O3/online/svd/Makefile.bbh_svd
 create mode 100644 gstlal-inspiral/share/O3/online/svd/Makefile.bns_svd
 create mode 100644 gstlal-inspiral/share/O3/online/svd/Makefile.imbh_svd
 create mode 100644 gstlal-inspiral/share/O3/online/svd/Makefile.nsbh_svd

diff --git a/gstlal-inspiral/share/O3/online/svd/Makefile.bbh_svd b/gstlal-inspiral/share/O3/online/svd/Makefile.bbh_svd
new file mode 100644
index 0000000000..283f3dfd5d
--- /dev/null
+++ b/gstlal-inspiral/share/O3/online/svd/Makefile.bbh_svd
@@ -0,0 +1,73 @@
+############################
+# Template bank parameters #
+############################
+
+# The frequency at which to begin generating a template
+LOW_FREQUENCY_CUTOFF = 15.0
+
+# The frequency at which to stop generating a template
+HIGH_FREQUENCY_CUTOFF = 1024
+
+# The sample rate, note that this is usually exactly = 2 * HIGH_FREQUENCY_CUTOFF
+SAMPLE_RATE = 2048
+
+# The number of templaes that go into each sub bank.  The total number of templates in a file is given by NUM_SPLIT_TEMPLATES * NUMBANKS
+NUM_SPLIT_TEMPLATES = 500
+
+# How many effective spin bins to use.  If this is a nonspinning bank, then use
+# 1.  For a fully spinning bank 20 is a good number.  In this example we have
+# spin magnitudes up to 0.05 so we choose 3.
+NUM_CHI_BINS = 20
+
+# This determines how many overlap tempates are used the boundaries of each sub
+# bank.  NOTE that the overlap templates are only used to help compute the SVD,
+# they are discarded in the final single inspiral table.  The analysis does not
+# contain duplicate templates at the end.
+OVERLAP = 50
+
+# NOTE 1000 is used in place of "infinty" it is possible to specify additiona
+# approximantes. The format is (chirp mass start):approximant:(chirp mass end)
+# which allows the user to specify different chirp masses for each approximant
+APPROXIMANT1 = 0.00:1000:SEOBNRv4_ROM
+
+# This determines how many sub banks go into each file.  The interpretation is
+# that the number of times you specify a given integer in this list will
+# determin the frequency at which than number of sub banks is put into a file.
+# The order matters, it goes from lowest to highest chirp mass.  Examples:
+#
+# NUMBANKS = 3,4,5 
+# 
+# Approximately 1/3 of the files would contain 3 sub banks, 1/3 would contain 4 sub banks and 1/3 would contain 5 sub banks.  The lowest mass templates would be grouped into 3 sub banks and the highest mass templates would be grouped into 5 sub banks.
+#
+# NUMBANKS = 3,4,4,5
+#
+# Here 1/4 would have 3 sub banks, 1/2 would have 4 and 1/4 would have 5.  Again, the lowest mass templates would have three sub banks. The in-the-middle mass templates would have 4 and the highest mass templates would have 5.
+#
+NUMBANKS = 4,5,6,7
+
+# The reference PSD
+PSD=/home/gstlalcbc/observing/2/catalog/runs/O2_chunk_21_run_1_180725/gstlal_median_of_psds/11866/H1L1V1-REFERENCE_PSD-1186624818-687900.xml.gz
+
+# The template bank file that you want to split up and decompose.
+BANK=/home/gstlalcbc/engineering/14/bank/hyper/bbh_hyper.xml.gz
+
+
+# Condor information
+ACCOUNTING_GROUP=ligo.dev.o3.cbc.em.gstlalonline
+ACCOUNTING_USER=chad.hanna
+
+all : bank.dag
+
+%_split_bank.cache : $(BANK)
+	mkdir -p $*_split_bank
+	gstlal_bank_splitter --f-low $(LOW_FREQUENCY_CUTOFF) --group-by-chi $(NUM_CHI_BINS) --output-path $*_split_bank --approximant $(APPROXIMANT1) --output-cache $@ --overlap $(OVERLAP) --instrument $* --n $(NUM_SPLIT_TEMPLATES) --sort-by mchirp --max-f-final $(HIGH_FREQUENCY_CUTOFF) $(BANK)
+
+%_bank.dag : %_split_bank.cache $(PSD)
+	gstlal_inspiral_svd_bank_pipe --autocorrelation-length 351 --instrument $* --reference-psd $(PSD) --bank-cache $< --overlap $(OVERLAP) --flow $(LOW_FREQUENCY_CUTOFF) --output-name $@ --num-banks $(NUMBANKS) --samples-max-256 2048 --samples-min 2048 --condor-command 'accounting_group = $(ACCOUNTING_GROUP)' --condor-command 'accounting_group_user = $(ACCOUNTING_USER)'
+
+bank.dag : H1_bank.dag L1_bank.dag V1_bank.dag
+	cat $^ > bank.dag
+	rm -f $^
+
+clean :
+	rm -rf *.sub* *.dag* *.cache *.sh logs gstlal_svd_bank* *split_bank*
diff --git a/gstlal-inspiral/share/O3/online/svd/Makefile.bns_svd b/gstlal-inspiral/share/O3/online/svd/Makefile.bns_svd
new file mode 100644
index 0000000000..ee5d63dc44
--- /dev/null
+++ b/gstlal-inspiral/share/O3/online/svd/Makefile.bns_svd
@@ -0,0 +1,72 @@
+############################
+# Template bank parameters #
+############################
+
+# The frequency at which to begin generating a template
+LOW_FREQUENCY_CUTOFF = 15.0
+
+# The frequency at which to stop generating a template
+HIGH_FREQUENCY_CUTOFF = 1024
+
+# The sample rate, note that this is usually exactly = 2 * HIGH_FREQUENCY_CUTOFF
+SAMPLE_RATE = 2048
+
+# The number of templaes that go into each sub bank.  The total number of templates in a file is given by NUM_SPLIT_TEMPLATES * NUMBANKS
+NUM_SPLIT_TEMPLATES = 500
+
+# How many effective spin bins to use.  If this is a nonspinning bank, then use
+# 1.  For a fully spinning bank 20 is a good number.  In this example we have
+# spin magnitudes up to 0.05 so we choose 3.
+NUM_CHI_BINS = 3
+
+# This determines how many overlap tempates are used the boundaries of each sub
+# bank.  NOTE that the overlap templates are only used to help compute the SVD,
+# they are discarded in the final single inspiral table.  The analysis does not
+# contain duplicate templates at the end.
+OVERLAP = 50
+
+# NOTE 1000 is used in place of "infinty" it is possible to specify additiona
+# approximantes. The format is (chirp mass start):approximant:(chirp mass end)
+# which allows the user to specify different chirp masses for each approximant
+APPROXIMANT1 = 0.00:1000:TaylorF2
+
+# This determines how many sub banks go into each file.  The interpretation is
+# that the number of times you specify a given integer in this list will
+# determin the frequency at which than number of sub banks is put into a file.
+# The order matters, it goes from lowest to highest chirp mass.  Examples:
+#
+# NUMBANKS = 3,4,5 
+# 
+# Approximately 1/3 of the files would contain 3 sub banks, 1/3 would contain 4 sub banks and 1/3 would contain 5 sub banks.  The lowest mass templates would be grouped into 3 sub banks and the highest mass templates would be grouped into 5 sub banks.
+#
+# NUMBANKS = 3,4,4,5
+#
+# Here 1/4 would have 3 sub banks, 1/2 would have 4 and 1/4 would have 5.  Again, the lowest mass templates would have three sub banks. The in-the-middle mass templates would have 4 and the highest mass templates would have 5.
+#
+NUMBANKS = 3,4
+
+# The reference PSD
+PSD=/home/gstlalcbc/observing/2/catalog/runs/O2_chunk_21_run_1_180725/gstlal_median_of_psds/11866/H1L1V1-REFERENCE_PSD-1186624818-687900.xml.gz
+
+# The template bank file that you want to split up and decompose.
+BANK=/home/gstlalcbc/engineering/14/bank/hyper/bns_hyper.xml.gz
+
+# Condor information
+ACCOUNTING_GROUP=ligo.dev.o3.cbc.em.gstlalonline
+ACCOUNTING_USER=chad.hanna
+
+all : bank.dag
+
+%_split_bank.cache : $(BANK)
+	mkdir -p $*_split_bank
+	gstlal_bank_splitter --f-low $(LOW_FREQUENCY_CUTOFF) --group-by-chi $(NUM_CHI_BINS) --output-path $*_split_bank --approximant $(APPROXIMANT1) --output-cache $@ --overlap $(OVERLAP) --instrument $* --n $(NUM_SPLIT_TEMPLATES) --sort-by mchirp --max-f-final $(HIGH_FREQUENCY_CUTOFF) $(BANK)
+
+%_bank.dag : %_split_bank.cache $(PSD)
+	gstlal_inspiral_svd_bank_pipe --autocorrelation-length 351 --instrument $* --reference-psd $(PSD) --bank-cache $< --overlap $(OVERLAP) --flow $(LOW_FREQUENCY_CUTOFF) --output-name $@ --num-banks $(NUMBANKS) --samples-max-256 2048 --samples-min 2048 --condor-command 'accounting_group = $(ACCOUNTING_GROUP)' --condor-command 'accounting_group_user = $(ACCOUNTING_USER)'
+
+bank.dag : H1_bank.dag L1_bank.dag V1_bank.dag
+	cat $^ > bank.dag
+	rm -f $^
+
+clean :
+	rm -rf *.sub* *.dag* *.cache *.sh logs gstlal_svd_bank* *split_bank*
diff --git a/gstlal-inspiral/share/O3/online/svd/Makefile.imbh_svd b/gstlal-inspiral/share/O3/online/svd/Makefile.imbh_svd
new file mode 100644
index 0000000000..134deb0032
--- /dev/null
+++ b/gstlal-inspiral/share/O3/online/svd/Makefile.imbh_svd
@@ -0,0 +1,72 @@
+############################
+# Template bank parameters #
+############################
+
+# The frequency at which to begin generating a template
+LOW_FREQUENCY_CUTOFF = 10.0
+
+# The frequency at which to stop generating a template
+HIGH_FREQUENCY_CUTOFF = 1024
+
+# The sample rate, note that this is usually exactly = 2 * HIGH_FREQUENCY_CUTOFF
+SAMPLE_RATE = 2048
+
+# The number of templaes that go into each sub bank.  The total number of templates in a file is given by NUM_SPLIT_TEMPLATES * NUMBANKS
+NUM_SPLIT_TEMPLATES = 500
+
+# How many effective spin bins to use.  If this is a nonspinning bank, then use
+# 1.  For a fully spinning bank at low mass 20 is a good number.  
+# In this example we have high mass.  num chi bins of 4 gives about a 4x4 grid of chirpmass and chi
+NUM_CHI_BINS = 4
+
+# This determines how many overlap tempates are used the boundaries of each sub
+# bank.  NOTE that the overlap templates are only used to help compute the SVD,
+# they are discarded in the final single inspiral table.  The analysis does not
+# contain duplicate templates at the end.
+OVERLAP = 50
+
+# NOTE 1000 is used in place of "infinty" it is possible to specify additiona
+# approximantes. The format is (chirp mass start):approximant:(chirp mass end)
+# which allows the user to specify different chirp masses for each approximant
+APPROXIMANT1 = 0.00:1000:SEOBNRv4_ROM
+
+# This determines how many sub banks go into each file.  The interpretation is
+# that the number of times you specify a given integer in this list will
+# determin the frequency at which than number of sub banks is put into a file.
+# The order matters, it goes from lowest to highest chirp mass.  Examples:
+#
+# NUMBANKS = 3,4,5 
+# 
+# Approximately 1/3 of the files would contain 3 sub banks, 1/3 would contain 4 sub banks and 1/3 would contain 5 sub banks.  The lowest mass templates would be grouped into 3 sub banks and the highest mass templates would be grouped into 5 sub banks.
+#
+# NUMBANKS = 3,4,4,5
+#
+# Here 1/4 would have 3 sub banks, 1/2 would have 4 and 1/4 would have 5.  Again, the lowest mass templates would have three sub banks. The in-the-middle mass templates would have 4 and the highest mass templates would have 5.
+#
+NUMBANKS = 6,7
+
+# The reference PSD
+PSD=/home/gstlalcbc/observing/2/catalog/runs/O2_chunk_21_run_1_180725/gstlal_median_of_psds/11866/H1L1V1-REFERENCE_PSD-1186624818-687900.xml.gz
+
+# The template bank file that you want to split up and decompose.
+BANK=/home/gstlalcbc/engineering/14/bank/hyper/imbh_hyper.xml.gz
+
+# Condor information
+ACCOUNTING_GROUP=ligo.dev.o3.cbc.em.gstlalonline
+ACCOUNTING_USER=chad.hanna
+
+all : bank.dag
+
+%_split_bank.cache : $(BANK)
+	mkdir -p $*_split_bank
+	gstlal_bank_splitter --f-low $(LOW_FREQUENCY_CUTOFF) --group-by-chi $(NUM_CHI_BINS) --output-path $*_split_bank --approximant $(APPROXIMANT1) --output-cache $@ --overlap $(OVERLAP) --instrument $* --n $(NUM_SPLIT_TEMPLATES) --sort-by mchirp --max-f-final $(HIGH_FREQUENCY_CUTOFF) $(BANK)
+
+%_bank.dag : %_split_bank.cache $(PSD)
+	gstlal_inspiral_svd_bank_pipe --autocorrelation-length 351 --instrument $* --reference-psd $(PSD) --bank-cache $< --overlap $(OVERLAP) --flow $(LOW_FREQUENCY_CUTOFF) --output-name $@ --num-banks $(NUMBANKS) --samples-max-256 2048 --samples-min 2048 --condor-command 'accounting_group = $(ACCOUNTING_GROUP)' --condor-command 'accounting_group_user = $(ACCOUNTING_USER)'
+
+bank.dag : H1_bank.dag L1_bank.dag V1_bank.dag
+	cat $^ > bank.dag
+	rm -f $^
+
+clean :
+	rm -rf *.sub* *.dag* *.cache *.sh logs gstlal_svd_bank* *split_bank*
diff --git a/gstlal-inspiral/share/O3/online/svd/Makefile.nsbh_svd b/gstlal-inspiral/share/O3/online/svd/Makefile.nsbh_svd
new file mode 100644
index 0000000000..816315888b
--- /dev/null
+++ b/gstlal-inspiral/share/O3/online/svd/Makefile.nsbh_svd
@@ -0,0 +1,72 @@
+############################
+# Template bank parameters #
+############################
+
+# The frequency at which to begin generating a template
+LOW_FREQUENCY_CUTOFF = 15.0
+
+# The frequency at which to stop generating a template
+HIGH_FREQUENCY_CUTOFF = 1024
+
+# The sample rate, note that this is usually exactly = 2 * HIGH_FREQUENCY_CUTOFF
+SAMPLE_RATE = 2048
+
+# The number of templaes that go into each sub bank.  The total number of templates in a file is given by NUM_SPLIT_TEMPLATES * NUMBANKS
+NUM_SPLIT_TEMPLATES = 500
+
+# How many effective spin bins to use.  If this is a nonspinning bank, then use
+# 1.  For a fully spinning bank 20 is a good number.  In this example we have
+# spin magnitudes up to 0.05 so we choose 3.
+NUM_CHI_BINS = 20
+
+# This determines how many overlap tempates are used the boundaries of each sub
+# bank.  NOTE that the overlap templates are only used to help compute the SVD,
+# they are discarded in the final single inspiral table.  The analysis does not
+# contain duplicate templates at the end.
+OVERLAP = 50
+
+# NOTE 1000 is used in place of "infinty" it is possible to specify additiona
+# approximantes. The format is (chirp mass start):approximant:(chirp mass end)
+# which allows the user to specify different chirp masses for each approximant
+APPROXIMANT1 = 0.00:1000:SEOBNRv4_ROM
+
+# This determines how many sub banks go into each file.  The interpretation is
+# that the number of times you specify a given integer in this list will
+# determin the frequency at which than number of sub banks is put into a file.
+# The order matters, it goes from lowest to highest chirp mass.  Examples:
+#
+# NUMBANKS = 3,4,5 
+# 
+# Approximately 1/3 of the files would contain 3 sub banks, 1/3 would contain 4 sub banks and 1/3 would contain 5 sub banks.  The lowest mass templates would be grouped into 3 sub banks and the highest mass templates would be grouped into 5 sub banks.
+#
+# NUMBANKS = 3,4,4,5
+#
+# Here 1/4 would have 3 sub banks, 1/2 would have 4 and 1/4 would have 5.  Again, the lowest mass templates would have three sub banks. The in-the-middle mass templates would have 4 and the highest mass templates would have 5.
+#
+NUMBANKS = 3,4,5
+
+# The reference PSD
+PSD=/home/gstlalcbc/observing/2/catalog/runs/O2_chunk_21_run_1_180725/gstlal_median_of_psds/11866/H1L1V1-REFERENCE_PSD-1186624818-687900.xml.gz
+
+# The template bank file that you want to split up and decompose.
+BANK=/home/gstlalcbc/engineering/14/bank/hyper/nsbh_hyper.xml.gz
+
+# Condor information
+ACCOUNTING_GROUP=ligo.dev.o3.cbc.em.gstlalonline
+ACCOUNTING_USER=chad.hanna
+
+all : bank.dag
+
+%_split_bank.cache : $(BANK)
+	mkdir -p $*_split_bank
+	gstlal_bank_splitter --f-low $(LOW_FREQUENCY_CUTOFF) --group-by-chi $(NUM_CHI_BINS) --output-path $*_split_bank --approximant $(APPROXIMANT1) --output-cache $@ --overlap $(OVERLAP) --instrument $* --n $(NUM_SPLIT_TEMPLATES) --sort-by mchirp --max-f-final $(HIGH_FREQUENCY_CUTOFF) $(BANK)
+
+%_bank.dag : %_split_bank.cache $(PSD)
+	gstlal_inspiral_svd_bank_pipe --autocorrelation-length 351 --instrument $* --reference-psd $(PSD) --bank-cache $< --overlap $(OVERLAP) --flow $(LOW_FREQUENCY_CUTOFF) --output-name $@ --num-banks $(NUMBANKS) --samples-max-256 2048 --samples-min 2048 --condor-command 'accounting_group = $(ACCOUNTING_GROUP)' --condor-command 'accounting_group_user = $(ACCOUNTING_USER)'
+
+bank.dag : H1_bank.dag L1_bank.dag V1_bank.dag
+	cat $^ > bank.dag
+	rm -f $^
+
+clean :
+	rm -rf *.sub* *.dag* *.cache *.sh logs gstlal_svd_bank* *split_bank*
-- 
GitLab