Skip to content
Snippets Groups Projects
Select Git revision
  • c2c825b8f16db8c04208381f2adfd91e69e4f1d8
  • master default protected
  • ci-executor-docker
  • python312-pyobject_head_init
  • python3.12-imp
  • requires.private
  • osg_dag_workflow
  • O3_precessionHM
  • stream_api
  • O3b_online
  • GEO_KAGRA_O3
  • calib_errors
  • refactor_and_cleanup
  • source-model-test-runs
  • online-dev
  • O3a_offline
  • python3
  • O3b_early_warning
  • cherry-pick-6b4b1bb2
  • latency_debugging
  • latency_test_prebugfix
  • gstlal-calibration-1.3.0-v1
  • o3a_catalog
  • gstlal-inspiral-1.7.3-v1
  • gstlal-inspiral-1.7.2-v1
  • gstlal-calibration-1.2.12-v1
  • gstlal-burst-0.2.0-v1
  • gstlal-calibration-1.2.11-v2
  • gstlal-calibration-1.2.11-v1
  • gstlal-inspiral-1.6.8-v1
  • gstlal-inspiral-1.6.7-v1
  • gstlal-inspiral-1.6.6-v2
  • gstlal-inspiral-1.6.6-v1
  • gstlal-ugly-1.6.5-v1
  • gstlal-ugly-1.6.4-v1
  • gstlal-inspiral-1.6.5-v1
  • gstlal-inspiral-1.6.5-v2
  • gstlal-calibration-1.2.10-v1
  • spiir-O3-v2
  • spiir-O3
  • spiir-ER14-v3
41 results

Makefile.O2_offline_dag

Blame
  • Forked from lscsoft / GstLAL
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Makefile.O2_offline_dag 10.78 KiB
    # condor commands
    # Set the accounting tag from https://ldas-gridmon.ligo.caltech.edu/ldg_accounting/user
    ACCOUNTING_TAG=ligo.dev.o2.cbc.bbh.gstlaloffline
    GROUP_USER=albert.einstein
    CONDOR_COMMANDS:=--condor-command=accounting_group=$(ACCOUNTING_TAG) --condor-command=accounting_group_user=$(GROUP_USER)
    
    ############################
    # Template bank parameters #
    ############################
    
    # Low frequency cut off for the template bank placement
    LOW_FREQUENCY_CUTOFF = 15.0
    # Highest frequency at which to compute the metric
    HIGH_FREQUENCY_CUTOFF = 1024.0
    # Controls the number of templates in each SVD sub bank
    NUM_SPLIT_TEMPLATES = 500
    # Number of bins of chi to uniformly bin templates into
    NUM_CHI_BINS = 20
    # Controls the overlap from sub bank to sub bank - helps mitigate edge effects
    # in the SVD.  Redundant templates will be removed
    OVERLAP = 50
    # The approximant that you wish to filter with for BANK_MCHIRP1 and BANK_MCHIRP2, respectively.
    MCHIRP_SPLIT = 1.73
    APPROXIMANT1 = 0.00:$(MCHIRP_SPLIT):TaylorF2
    APPROXIMANT2 = $(MCHIRP_SPLIT):1000.0:SEOBNRv4_ROM
    
    #########################
    # Triggering parameters #
    #########################
    
    # The detectors to analyze
    IFOS = H1 L1
    # Minimum number of detecors working to use
    MIN_IFOS = 2
    # The GPS start time for analysis
    START = 
    # The GPS end time for analysis
    STOP = 
    # A user tag for the run
    TAG = O2_C00
    # Run number
    RUN = run_1
    # A web directory for output (note difference between cit+uwm and Atlas)
    # cit & uwm
    WEBDIR = ~/public_html/observing/$(TAG)/$(START)-$(STOP)-$(RUN)
    # Atlas
    #WEBDIR = ~/WWW/LSC/testing/$(TAG)/$(START)-$(STOP)-test_dag-$(RUN)
    # The number of sub banks in each SVD bank file
    NUMBANKS = 2
    # 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 = 2048
    # The maximum number of samples to include in the 256 Hz or above time slices
    SAMPLES_MAX_256 = 2048
    
    #############################
    # additional options, e.g., #
    #############################
    
    #ADDITIONAL_DAG_OPTIONS = "--samples-min $(SAMPLES_MIN) --samples-max-256 $(SAMPLES_MAX_256) --blind-injections BNS-MDC1-WIDE.xml"
    ADDITIONAL_DAG_OPTIONS:=--samples-min $(SAMPLES_MIN) --samples-max-256 $(SAMPLES_MAX_256)
    
    ##############
    # Injections #
    ##############
    
    # Change as appropriate, whitespace is important (Given by O2_injection_gen)
    MCHIRP_INJECTIONS := Mc_min_1:Mc_max_1:injections_0000.xml Mc_min_2:Mc_max_2:injections_0001.xml
    
    #######################
    # GSTLAL VETO Options #
    #######################
    
    # Vetoes file names
    # Obtain veto definer from here: https://code.pycbc.phy.syr.edu/detchar/veto-definitions/blob/master/cbc/O2/
    # commit: e698d6f9f488120334a8f820d8f316c1c5c45913
    VETODEF = H1L1-HOFT_C00_O2_CBC.xml
    
    vetoes_suffix := _vetoes.xml
    VETOES_FILES  := $(addsuffix $(vetoes_suffix),$(IFOS))
    
    CAT1_vetoes_suffix := _CAT1_vetoes.xml
    CAT1_VETOES_FILES  := $(addsuffix $(CAT1_vetoes_suffix),$(IFOS))
    
    ###############################
    # Segment and frame type info #
    ###############################
    
    # Info from https://wiki.ligo.org/viewauth/LSC/JRPComm/ObsRun2
    # Select correct calibration type
    # GSTLAL_SEGMENTS Options
    SEG_SERVER=https://segments.ligo.org
    # C00
    LIGO_SEGMENTS="$*:DMT-ANALYSIS_READY:1"
    # C01
    #LIGO_SEGMENTS="$*:DCS-ANALYSIS_READY_C01:1"
    # C02
    #LIGO_SEGMENTS="$*:DCS-ANALYSIS_READY_C02:1"
    SEGMENT_TRIM = 0
    SEGMENT_MIN_LENGTH = 512
    
    # The LIGO frame types
    # C00
    HANFORD_FRAME_TYPE='H1_HOFT_C00'
    LIVINGSTON_FRAME_TYPE='L1_HOFT_C00'
    # C01
    #HANFORD_FRAME_TYPE='H1_HOFT_C01'
    #LIVINGSTON_FRAME_TYPE='L1_HOFT_C01'
    # C02
    #HANFORD_FRAME_TYPE='H1_HOFT_C02'
    #LIVINGSTON_FRAME_TYPE='L1_HOFT_C02'
    
    # The Channel names. FIXME sadly you have to change the CHANNEL_NAMES string if
    # you want to analyze a different set of IFOS
    # C00
    H1_CHANNEL=GDS-CALIB_STRAIN
    L1_CHANNEL=GDS-CALIB_STRAIN
    # C01
    #H1_CHANNEL=DCS-CALIB_STRAIN_C01
    #L1_CHANNEL=DCS-CALIB_STRAIN_C01
    # C02 TBD
    #H1_CHANNEL=
    #L1_CHANNEL=
    CHANNEL_NAMES:=--channel-name=H1=$(H1_CHANNEL) --channel-name=L1=$(L1_CHANNEL)
    
    ###################################################################################
    # Get some basic definitions.  NOTE this comes from the share directory probably. #
    ###################################################################################
    
    # Set to correct location
    include /PATH/TO/gstlal/gstlal-inspiral/share/Makefile.offline_analysis_rules
    
    ############
    # Workflow #
    ############
    
    all : dag SNR_sed
    	echo "Submit with: condor_submit_dag -maxjob 3000 trigger_pipe.dag"
    
    SNR_sed : gstlal_inspiral_injection_snr.sub
    	sed -i 's@environment = GST_REGISTRY_UPDATE=no;@environment = "GST_REGISTRY_UPDATE=no LD_PRELOAD=${MKLROOT}/lib/intel64/libmkl_core.so"@g' gstlal_inspiral_injection_snr.sub
    
    # Run inspiral pipe to produce dag
    dag : segments.xml.gz vetoes.xml.gz frame.cache inj_tisi.xml 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) \
    		--template-bank gstlal_bank.xml.gz \
    		--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 \
    		--singles-threshold 100.0 \
    		--request-cpu 2 \
    		--request-memory 5GB \
    		--min-instruments $(MIN_IFOS)
    	sed -i '1s/^/JOBSTATE_LOG logs\/trigger_pipe.jobstate.log\n/' trigger_pipe.dag
    
    # Produce split banks
    %_split_bank.cache : gstlal_bank.xml.gz
    	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) \
    		$<
    
    # Copy acrross and produce template bank file
    gstlal_bank.xml.gz : SBANK_COMBINED-SBANK_O2_V4.xml.gz SBANK_COMBINED-SBANK_O2_F2.xml.gz
    	# Useing original online bank from cit:/home/gstlalcbc/observing/2/online/Makefile.bank
    	ligolw_add --ilwdchar-compat --output gstlal_bank.xml.gz SBANK_COMBINED-SBANK_O2_V4.xml.gz SBANK_COMBINED-SBANK_O2_F2.xml.gz
    
    SBANK_COMBINED-SBANK_O2_V4.xml.gz :
    	gsiscp atlas4.atlas.aei.uni-hannover.de:/home/sprivite/O2/banks/O2-projected-PSD/15Hz/v4rom-4M-400M-0p97-0p2s-mindur-nhood15s-layered-pipe/reconverge/resim/SBANK_COMBINED-SBANK_O2_V4.xml.gz $@
    
    SBANK_COMBINED-SBANK_O2_F2.xml.gz :
    	gsiscp atlas4.atlas.aei.uni-hannover.de:/home/sprivite/O2/banks/O2-projected-PSD/15Hz/f2-2M-4M-0p97-0p2s-mindur-nhood15s-nbanks25-layered-pipe/SBANK_COMBINED-SBANK_O2_F2.xml.gz $@
    
    # Produce time slides file
    tisi.xml : inj_tisi.xml
    	lalapps_gen_timeslides --instrument=H1=0:0:0 --instrument=L1=25.13274:25.13274:25.13274 bg_tisi.xml
    	ligolw_add --ilwdchar-compat --output $@ bg_tisi.xml $<
    
    # Produce injection time slide file
    inj_tisi.xml :
    	lalapps_gen_timeslides --instrument=H1=0:0:0 --instrument=L1=0:0:0 $@
    
    # Produce veto file
    vetoes.xml.gz : $(VETOES_FILES)
    	ligolw_add --ilwdchar-compat --output $@ $(VETOES_FILES)
    	ligolw_cut --ilwdchar-compat --delete-column segment:segment_def_cdb --delete-column segment:creator_db --delete-column segment_definer:insertion_time $@
    
    %_vetoes.xml : $(VETODEF)
    	ligolw_segments_from_cats_dqsegdb --segment-url=$(SEG_SERVER) --veto-file=$(VETODEF) --gps-start-time $(START) --gps-end-time $(STOP) --cumulative-categories
    	gstlal_segments_operations --union --segment-name VETO_CAT3_CUMULATIVE --output-file $@ --output-segment-name vetoes $*-VETOTIME_CAT3-*.xml $*-VETOTIME_CAT3-*.xml
    
    # Produce segments file
    segments.xml.gz : $(SEGMENTS_FILES) frame.cache CAT1_vetoes.xml.gz
    	ligolw_add --ilwdchar-compat --output segdb.xml $(SEGMENTS_FILES)
    	ligolw_cut --ilwdchar-compat --delete-column segment:segment_def_cdb --delete-column segment:creator_db --delete-column segment_definer:insertion_time segdb.xml
    	gstlal_segments_operations --diff --output-file $@ segdb.xml CAT1_vetoes.xml.gz
    	gstlal_segments_trim --trim $(SEGMENT_TRIM) --gps-start-time $(START) --gps-end-time $(STOP) --min-length $(SEGMENT_MIN_LENGTH) --output $@ $@
    
    # Produce CAT1 veto file
    CAT1_vetoes.xml.gz : $(CAT1_VETOES_FILES)
    	ligolw_add --ilwdchar-compat --output $@ $(CAT1_VETOES_FILES)
    	ligolw_cut --ilwdchar-compat --delete-column segment:segment_def_cdb --delete-column segment:creator_db --delete-column segment_definer:insertion_time $@
    
    %_CAT1_vetoes.xml : $(VETODEF)
    	ligolw_segments_from_cats_dqsegdb --segment-url=$(SEG_SERVER) --veto-file=$(VETODEF) --gps-start-time $(START) --gps-end-time $(STOP) --cumulative-categories
    	gstlal_segments_operations --union --segment-name VETO_CAT1_CUMULATIVE --output-file $@ --output-segment-name datasegments $*-VETOTIME_CAT1-*.xml $*-VETOTIME_CAT1-*.xml
    
    # Produce frame cache files
    frame.cache : $(FRAME_CACHE_FILES)
    	cat $(FRAME_CACHE_FILES) > frame.cache
    	# FIXME since these frame types were made incorrectly, make sure ligolw_path_to_cache reads ifo names properly
    	sed -i s/H\ $(LIGO_FRAME_TYPE)/H\ H1_$(LIGO_FRAME_TYPE)/g frame.cache
    	sed -i s/L\ $(LIGO_FRAME_TYPE)/L\ L1_$(LIGO_FRAME_TYPE)/g frame.cache
    
    H1_frame.cache :
    	# FIXME force the observatory column to actually be instrument
    	gw_data_find -o H -t $(HANFORD_FRAME_TYPE) -l  -s $(START) -e $(STOP) --url-type file | awk '{ print $$1" $*_"$$2" "$$3" "$$4" "$$5}' > $@
    
    L1_frame.cache :
    	# FIXME force the observatory column to actually be instrument
    	gw_data_find -o L -t $(LIVINGSTON_FRAME_TYPE) -l  -s $(START) -e $(STOP) --url-type file | awk '{ print $$1" $*_"$$2" "$$3" "$$4" "$$5}' > $@
    
    # Produce padded segments files
    %_segmentspadded.xml :
    	ligolw_segment_query_dqsegdb --segment-url=${SEG_SERVER} -q --gps-start-time ${START} --gps-end-time ${STOP} --include-segments=$(LIGO_SEGMENTS) --result-name=datasegments > $@
    
    # Make webpage directory and copy files across
    $(WEBDIR) : $(MAKEFILE_LIST)
    	mkdir -p $(WEBDIR)/OPEN-BOX
    	cp $(MAKEFILE_LIST) $@
    
    # Makes local plots directory
    plots :
    	mkdir plots
    
    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 H1-*.xml H1_*.xml L1-*.xml L1_*xml V1-*.xml V1_*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 nogaps.xml segdb.xml
    	-rm -rf bank_aligned_spin.xml.gz
    	-rm -rf CAT1*.xml.gz