gstlal-inspiral  0.4.2
 All Classes Namespaces Files Functions Variables Pages
Makefile.spinning_BNS
1 #
2 # Template bank parameters
3 #
4 
5 # The filtering start frequency
6 LOW_FREQUENCY_CUTOFF = 30.0
7 # The maximum frequency to filter to
8 HIGH_FREQUENCY_CUTOFF = 1024.0
9 # Controls the number of templates in each SVD sub bank
10 NUM_SPLIT_TEMPLATES = 100
11 # Controls the overlap from sub bank to sub bank - helps mitigate edge effects
12 # in the SVD. Redundant templates will be removed
13 OVERLAP = 10
14 # The program used to make the template bank. This will be searched for in the
15 # process param table in order to extract some metadata
16 BANK_PROGRAM = pycbc_aligned_bank_cat
17 # The approximant that you wish to filter with
18 APPROXIMANT = TaylorF2
19 
20 #
21 # Triggering parameters
22 #
23 
24 # The detectors to analyze
25 IFOS = H1 L1
26 # The GPS start time
27 START = 966384015
28 # The GPS end time
29 STOP = 967384015
30 # A user tag for the run
31 TAG = test
32 # A web directory for output
33 WEBDIR = ~/public_html/MDC/BNS/Summer2014/recolored/spin/$(START)-$(STOP)-$(TAG)
34 # The number of sub banks to process in parallel for each gstlal_inspiral job
35 NUMBANKS = 16
36 # The control peak time for the composite detection statistic. If set to 0 the
37 # statistic is disabled
38 PEAK = 0
39 # The length of autocorrelation chi-squared in sample points
40 AC_LENGTH = 351
41 # The minimum number of samples to include in a given time slice
42 SAMPLES_MIN = 512
43 # The maximum number of samples to include in the 256 Hz or above time slices
44 SAMPLES_MAX_256 = 512
45 
46 #
47 # additional options, e.g.,
48 #
49 
50 #ADDITIONAL_DAG_OPTIONS = "--blind-injections BNS-MDC1-WIDE.xml"
51 
52 #
53 # Injections
54 #
55 
56 # The seed is the string before the suffix _injections.xml
57 # Change as appropriate, whitespace is important
58 INJECTIONS := BNS-SpinMDC-ISOTROPIC.xml BNS-SpinMDC-ALIGNED.xml
59 # NOTE you shouldn't need to change these next two lines
60 comma:=,
61 INJECTION_REGEX = $(subst $(space),$(comma),$(INJECTIONS))
62 
63 #
64 # Segment and frame type info
65 #
66 
67 # The LIGO and Virgo frame types
68 LIGO_FRAME_TYPE='T1200307_V4_EARLY_RECOLORED_V2'
69 VIRGO_FRAME_TYPE='T1300121_V1_EARLY_RECOLORED_V2'
70 # The Channel names. FIXME sadly you have to change the CHANNEL_NAMES string if
71 # you want to analyze a different set of IFOS
72 H1_CHANNEL=LDAS-STRAIN
73 L1_CHANNEL=LDAS-STRAIN
74 V1_CHANNEL=h_16384Hz
75 CHANNEL_NAMES:=--channel-name=H1=$(H1_CHANNEL) --channel-name=L1=$(L1_CHANNEL)
76 
77 #
78 # Get some basic definitions. NOTE this comes from the share directory probably.
79 #
80 
81 include Makefile.offline_analysis_rules
82 
83 #
84 # Workflow
85 #
86 
87 all : dag
88 
89 BNS_Spin0.4_30Hz_earlyaLIGO.xml:
90  gsiscp sugar-dev1.phy.syr.edu:/home/jveitch/public_html/bns/mdc/spin/tmpltbank/BNS_Spin0.4_30Hz_earlyaLIGO.xml .
91 
92 $(INJECTIONS):
93  gsiscp sugar-dev1.phy.syr.edu:/home/jveitch/public_html/bns/mdc/spin/"{$(INJECTION_REGEX)}" .
94 
95 %_split_bank.cache : BNS_Spin0.4_30Hz_earlyaLIGO.xml
96  mkdir -p $*_split_bank
97  gstlal_bank_splitter --f-low $(LOW_FREQUENCY_CUTOFF) --group-by-chi --output-path $*_split_bank --approximant $(APPROXIMANT) --bank-program $(BANK_PROGRAM) --output-cache $@ --overlap $(OVERLAP) --instrument $* --n $(NUM_SPLIT_TEMPLATES) --sort-by mchirp --add-f-final --max-f-final $(HIGH_FREQUENCY_CUTOFF) $<
98 
99 plots :
100  mkdir plots
101 
102 $(WEBDIR) :
103  mkdir -p $(WEBDIR)
104 
105 tisi.xml :
106  ligolw_tisi --instrument=H1=0:0:0 --instrument=H2=0:0:0 --instrument=L1=0:0:0 --instrument=V1=0:0:0 tisi0.xml
107  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
108  ligolw_add --output $@ tisi0.xml tisi1.xml
109 
110 dag : segments.xml.gz vetoes.xml.gz frame.cache tisi.xml plots $(WEBDIR) $(INJECTIONS) $(BANK_CACHE_FILES)
111  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)
112 
113 V1_frame.cache:
114  # FIXME force the observatory column to actually be instrument
115  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}' > $@
116 
117 %_frame.cache:
118  # FIXME horrible hack to get the observatory, not guaranteed to work
119  $(eval OBS:=$*)
120  $(eval OBS:=$(subst 1,$(empty),$(OBS)))
121  $(eval OBS:=$(subst 2,$(empty),$(OBS)))
122  # FIXME force the observatory column to actually be instrument
123  ligo_data_find -o $(OBS) -t $(LIGO_FRAME_TYPE) -l -s $(START) -e $(STOP) --url-type file | awk '{ print $$1" $*_"$$2" "$$3" "$$4" "$$5}' > $@
124 
125 frame.cache: $(FRAME_CACHE_FILES)
126  cat $(FRAME_CACHE_FILES) > frame.cache
127 
128 segments.xml.gz: frame.cache
129  # These segments come from the MDC set
130  gsiscp pcdev3.cgca.uwm.edu:/home/channa/public_html/SELECTED_SEGS.xml.gz $@
131  gstlal_cache_to_segments frame.cache nogaps.xml
132  gstlal_segments_operations --segment-file1 $@ --segment-file2 nogaps.xml --intersection --output-file $@
133  -rm -vf nogaps.xml
134  gstlal_segments_trim --trim 8 --gps-start-time $(START) --gps-end-time $(STOP) --min-length 2048 --output $@ $@
135 
136 vetoes.xml.gz:
137  gsiscp pcdev3.cgca.uwm.edu:/home/channa/public_html/COMBINED_CAT_4_VETO_SEGS.xml.gz $@
138  gstlal_segments_trim --gps-start-time $(START) --gps-end-time $(STOP) --segment-name vetoes --output $@ $@
139 
140 clean:
141  -rm -rvf *.sub *.dag* *.cache *.sh logs *.sqlite plots *.html Images *.css *.js
142  -rm -rvf lalapps_run_sqlite/ ligolw_* gstlal_*
143  -rm -vf segments.xml.gz tisi.xml H*.xml L*.xml V*.xml ?_injections.xml ????-*_split_bank-*.xml vetoes.xml.gz
144  -rm -vf *marginalized*.xml.gz *-ALL_LLOID*.xml.gz
145  -rm -vf tisi0.xml tisi1.xml
146  -rm -rf *_split_bank
147  -rm -rf BNS_Spin0.4_30Hz_earlyaLIGO.xml
148  -rm -rf $(INJECTIONS)