gstlal-inspiral  0.4.2
 All Classes Namespaces Files Functions Variables Pages
Makefile.IMBH_example
1 # Template bank parameters
2 HIGH_FREQUENCY_CUTOFF = 4096
3 LOW_FREQUENCY_CUTOFF = 20
4 NUM_SPLIT_TEMPLATES = 100
5 OVERLAP = 10
6 
7 # controls triggers
8 IFOS = H1 L1 V1
9 START = 966384015
10 STOP = 967384015
11 TAG = IMBH_50-50_test
12 WEBDIR = ~/public_html/MDC_new/${START}-${STOP}-${TAG}
13 NUMBANKS = 4
14 PEAK = 0
15 AC_LENGTH = 351
16 # additional options, e.g.,
17 #ADDITIONAL_DAG_OPTIONS = "--blind-injections BNS-MDC1-WIDE.xml"
18 
19 # Injections
20 # The seed is the string before the suffix _injections.xml
21 # Change as appropriate, whitespace is important
22 INJECTIONS := IMBHB-MDC-50-50.xml.gz
23 
24 # Segment and frame type info
25 SEG_SERVER=https://segdb.ligo.caltech.edu
26 LIGO_FRAME_TYPE='$*_T1200307_V4_EARLY_GAUSSIAN'
27 LIGO_SEGMENTS="$*:CBC-MDC1_SCIENCE_EARLY_GAUSSIAN"
28 VIRGO_FRAME_TYPE='V1_T1300121_V1_EARLY_GAUSSIAN'
29 CHANNEL_NAMES:=--channel-name=H1=GAUSSIAN --channel-name=L1=GAUSSIAN --channel-name=V1=GAUSSIAN
30 
31 # Get some basic definitions
32 include Makefile.offline_analysis_rules
33 
34 #
35 # Workflow
36 #
37 
38 
39 all : dag
40 
41 H1-SBANK_IMBH-0-1.xml.gz:
42  lalapps_cbc_sbank --aligned-spin --approximant=IMRPhenomB --mass1-min 4 --mass1-max 200 --mtotal-min 40 --mtotal-max 400 --mratio-min 1 --mratio-max 10 --spin1-min 0 --spin1-max 0 --spin2-min 0 --spin2-max 0 --noise-model aLIGOZeroDetHighPower --flow 20 --instrument H1 --gps-start-time 0 --gps-end-time 1 --verbose --match-min 0.99 --user-tag IMBH
43 
44 %_split_bank.cache : H1-SBANK_IMBH-0-1.xml.gz
45  mkdir -p $*_split_bank
46  gstlal_bank_splitter --bank-program lalapps_cbc_sbank --output-path $*_split_bank --output-cache $@ --overlap $(OVERLAP) --instrument $* --n $(NUM_SPLIT_TEMPLATES) --sort-by mchirp --add-f-final --max-f-final $(HIGH_FREQUENCY_CUTOFF) $<
47 
48 plots :
49  mkdir plots
50 
51 $(WEBDIR) :
52  mkdir $(WEBDIR)
53 
54 tisi.xml :
55  ligolw_tisi --instrument=H1=0:0:0 --instrument=H2=0:0:0 --instrument=L1=0:0:0 --instrument=V1=0:0:0 tisi0.xml
56  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
57  ligolw_add --output $@ tisi0.xml tisi1.xml
58 
59 dag : segments.xml frame.cache tisi.xml plots $(WEBDIR) $(INJECTIONS) $(BANK_CACHE_FILES)
60  gstlal_inspiral_pipe --data-source frames --gps-start-time $(START) --gps-end-time $(STOP) --frame-cache frame.cache --frame-segments-file segments.xml --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) $(ADDITIONAL_DAG_OPTIONS)
61 
62 %_segmentspadded.xml:
63  ligolw_segment_query --segment-url=${SEG_SERVER} -q --gps-start-time ${START} --gps-end-time ${STOP} --include-segments=$(LIGO_SEGMENTS) --result-name=datasegments > $@
64 
65 V1_frame.cache:
66  ligo_data_find -o V -t $(VIRGO_FRAME_TYPE) -l -s $(START) -e $(STOP) --url-type file > $@
67 
68 %_frame.cache:
69  #FIXME horrible hack to get the observatory, not guaranteed to work
70  $(eval OBS:=$*)
71  $(eval OBS:=$(subst 1,$(empty),$(OBS)))
72  $(eval OBS:=$(subst 2,$(empty),$(OBS)))
73  ligo_data_find -o $(OBS) -t $(LIGO_FRAME_TYPE) -l -s $(START) -e $(STOP) --url-type file > $@
74 
75 frame.cache: $(FRAME_CACHE_FILES)
76  cat $(FRAME_CACHE_FILES) > frame.cache
77 
78 segments.xml: $(SEGMENTS_FILES) frame.cache
79  ligolw_add --output segdb.xml $(SEGMENTS_FILES)
80  ligolw_cut --delete-column segment:segment_def_cdb --delete-column segment:creator_db --delete-column segment_definer:insertion_time segdb.xml
81  gstlal_cache_to_segments frame.cache nogaps.xml
82  gstlal_segments_operations --segment-file1 segdb.xml --segment-file2 nogaps.xml --intersection --output-file $@
83  -rm -vf nogaps.xml segdb.xml
84  gstlal_segments_trim --trim 8 --min-length 512 --output $@ $@
85 
86 clean :
87  -rm -rvf *.sub *.dag* *.cache *.sh logs *.sqlite plots $(WEBDIR) *.html Images *.css *.js
88  -rm -rvf lalapps_run_sqlite/ ligolw_* gstlal_*
89  -rm -vf segments.xml tisi.xml H*.xml L*.xml V*.xml ?_injections.xml ????-*_split_bank-*.xml
90  -rm -vf *marginalized*.xml.gz *-ALL_LLOID*.xml.gz
91  -rm -vf tisi0.xml tisi1.xml
92  -rm -rvf *split_bank*