Skip to content
Snippets Groups Projects
Commit 690f6977 authored by Chad Hanna's avatar Chad Hanna
Browse files

Makefile.s6_replay: add a makefile for the S6 replay offline analysis

parent aea931cf
No related branches found
No related tags found
No related merge requests found
#
# Template bank parameters
#
# The filtering start frequency
LOW_FREQUENCY_CUTOFF = 40.0
# The maximum frequency to filter to
HIGH_FREQUENCY_CUTOFF = 1024.0
# Controls the number of templates in each SVD sub bank
NUM_SPLIT_TEMPLATES = 100
# Controls the overlap from sub bank to sub bank - helps mitigate edge effects
# in the SVD. Redundant templates will be removed
OVERLAP = 20
# The approximant that you wish to filter with
APPROXIMANT = TaylorF2
#
# Triggering parameters
#
# The detectors to analyze
IFOS = H1 L1
# The GPS start time of the S6 replay
START = 967161687
# The GPS end time of the S6 replay
STOP = 968371287
# A user tag for the run
TAG = offline_s6_replay
# A web directory for output
WEBDIR = ~/public_html/$(TAG)
# The number of sub banks to process in parallel for each gstlal_inspiral job
NUMBANKS = 5,6,7
# The control peak time for the composite detection statistic. If set to 0 the
# statistic is disabled
PEAK = 0
# The length of autocorrelation chi-squared in sample points
AC_LENGTH = 351
# The minimum number of samples to include in a given time slice
SAMPLES_MIN = 1024 # default value
# The maximum number of samples to include in the 256 Hz or above time slices
SAMPLES_MAX_256 = 1024 # default value
#
# additional options, e.g.,
#
#ADDITIONAL_DAG_OPTIONS = "--blind-injections BNS-MDC1-WIDE.xml"
#
# Injections
#
# The seed is the string before the suffix _injections.xml
# Change as appropriate, whitespace is important
INJECTIONS := S6_bns_injs.xml
#
# Segment and frame type info
#
SEG_SERVER=https://segdb.ligo.caltech.edu
VETO_DEF_FILE=H1L1V1-S6_CBC_LOWMASS_D_OFFLINE-961545543-0.xml
SEG_SERVER=https://segdb.ligo.caltech.edu
VETO_SERVER=https://www.lsc-group.phys.uwm.edu/ligovirgo/cbc/public/segments/S6/
#LIGO_FRAME_TYPE='$*_LDAS_C02_L2'
LIGO_SEGMENTS="$*:DMT-SCIENCE:4"
LIGO_VETOES="$*:DMT-INJECTION_BURST,$*:DMT-INJECTION_INSPIRAL"
# The LIGO and Virgo frame types
LIGO_FRAME_TYPE_SUFFIX='LDAS_C02_L2'
# The Channel names. FIXME sadly you have to change the CHANNEL_NAMES string if
# you want to analyze a different set of IFOS
H1_CHANNEL=LDAS-STRAIN
L1_CHANNEL=LDAS-STRAIN
CHANNEL_NAMES:=--channel-name=H1=$(H1_CHANNEL) --channel-name=L1=$(L1_CHANNEL)
#
# Get some basic definitions. NOTE this comes from the share directory probably.
#
include Makefile.offline_analysis_rules
#
# Workflow
#
all : dag
$(INJECTIONS):
lalapps_inspinj --min-mass1 1.0 --max-mass1 3.0 --min-mass2 1.0 --max-mass2 3.0 --min-mtotal 2.0 --max-mtotal 6.0 --gps-start-time ${START} --gps-end-time ${STOP} --disable-spin --m-distr gaussian --mean-mass1 1.4 --mean-mass2 1.4 --stdev-mass1 0.01 --stdev-mass2 0.01 --d-distr uniform --i-distr uniform --min-distance 5000 --max-distance 45000 --waveform TaylorT4threePointFivePN --l-distr random --f-lower 25 --time-step 20 --t-distr uniform --time-interval 3 --seed 51056 --output $@
%_segmentspadded.xml: frame.cache
ligolw_segment_query --segment-url=${SEG_SERVER} -q --gps-start-time ${START} --gps-end-time ${STOP} --include-segments=$(LIGO_SEGMENTS) --result-name=datasegments > $@
ligolw_segments_compat $@ $@
gstlal_cache_to_segments $*_frame.cache $*_nogaps.xml
gstlal_segments_operations --segment-file1 $@ --segment-file2 $*_nogaps.xml --intersection --output-file $@
#-rm -vf $*_nogaps.xml
gstlal_segments_trim --segment-name datasegments --min-length 512 --output $@ $@
segments.xml.gz: $(SEGMENTS_FILES)
ligolw_add $(SEGMENTS_FILES) --output $@
%_vetoespadded.xml:
ligolw_segment_query --segment-url=${SEG_SERVER} -q --gps-start-time ${START} --gps-end-time ${STOP} --include-segments=$(LIGO_VETOES) --result-name=vetoes > $@
gstlal_segments_trim --segment-name vetoes --output $@ $@
vetoes.xml.gz: $(VETOES_FILES)
ligolw_add $(VETOES_FILES) --output $@
H1-TMPLTBANK-871147516-2048.xml :
cp ../online/bank/H1-TMPLTBANK-871147516-2048.xml .
%_split_bank.cache : H1-TMPLTBANK-871147516-2048.xml
mkdir -p $*_split_bank
gstlal_bank_splitter --f-low $(LOW_FREQUENCY_CUTOFF) --group-by-chi --output-path $*_split_bank --approximant $(APPROXIMANT) --output-cache $@ --overlap $(OVERLAP) --instrument $* --n $(NUM_SPLIT_TEMPLATES) --sort-by mchirp --add-f-final --max-f-final $(HIGH_FREQUENCY_CUTOFF) $<
plots :
mkdir plots
$(WEBDIR) :
mkdir -p $(WEBDIR)
tisi.xml :
ligolw_tisi --instrument=H1=0:0:0 --instrument=H2=0:0:0 --instrument=L1=0:0:0 --instrument=V1=0:0:0 tisi0.xml
ligolw_tisi --instrument=H1=0:0:0 --instrument=H2=0:0:0 --instrument=L1=3.14159:3.14159:3.14159 --instrument=V1=7.892:7.892:7.892 tisi1.xml
ligolw_add --output $@ tisi0.xml tisi1.xml
dag : segments.xml.gz vetoes.xml.gz frame.cache tisi.xml plots $(WEBDIR) $(INJECTIONS) $(BANK_CACHE_FILES)
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) --num-banks $(NUMBANKS) --fir-stride 4 --web-dir $(WEBDIR) --time-slide-file tisi.xml $(INJECTION_LIST) --bank-cache $(BANK_CACHE_STRING) --tolerance 0.9999 --overlap $(OVERLAP) --flow $(LOW_FREQUENCY_CUTOFF) $(CHANNEL_NAMES) --autocorrelation-length $(AC_LENGTH) --samples-min $(SAMPLES_MIN) --samples-max-256 $(SAMPLES_MAX_256) $(ADDITIONAL_DAG_OPTIONS)
V1_frame.cache:
# FIXME force the observatory column to actually be instrument
ligo_data_find -o V -t $(VIRGO_FRAME_TYPE) -l -s $(START) -e $(STOP) --url-type file | awk '{ print $$1" V1_"$$2" "$$3" "$$4" "$$5}' > $@
%_frame.cache:
# FIXME horrible hack to get the observatory, not guaranteed to work
$(eval OBS:=$*)
$(eval OBS:=$(subst 1,$(empty),$(OBS)))
$(eval OBS:=$(subst 2,$(empty),$(OBS)))
# FIXME force the observatory column to actually be instrument
ligo_data_find -o $(OBS) -t $*_$(LIGO_FRAME_TYPE_SUFFIX) -l -s $(START) -e $(STOP) --url-type file | awk '{ print $$1" $*_"$$2" "$$3" "$$4" "$$5}' > $@
frame.cache: $(FRAME_CACHE_FILES)
cat $(FRAME_CACHE_FILES) > frame.cache
clean:
-rm -rvf *.sub *.dag* *.cache *.sh logs *.sqlite plots *.html Images *.css *.js
-rm -rvf lalapps_run_sqlite/ ligolw_* gstlal_*
-rm -vf segments.xml.gz tisi.xml H*.xml L*.xml V*.xml ?_injections.xml ????-*_split_bank-*.xml vetoes.xml.gz
-rm -vf *marginalized*.xml.gz *-ALL_LLOID*.xml.gz
-rm -vf tisi0.xml tisi1.xml
-rm -rf *_split_bank
-rm -rf S6_bns_injs.xml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment