Newer
Older

Patrick Godwin
committed
all : dag
.PHONY: launch
launch : {{ workflow }}_inspiral_dag.dag
condor_submit_dag $<
.PHONY: dag
dag : {{ workflow }}_inspiral_dag.dag
@echo ""
.PHONY: summary
summary :
mkdir -p {{ config.summary.webdir }}
gstlal_inspiral_summary_page \
--title gstlal-{{ config.start }}-{{ config.stop }}-closed-box \
--webserver-dir {{ config.summary.webdir }} \
--output-user-tag ALL_COMBINED \
--output-user-tag PRECESSION_COMBINED \
{% for inj_name in config.filter.injections.keys() %}
--output-user-tag {{ inj_name.upper() }}_INJECTION \
--output-user-tag {{ inj_name.upper() }}_INJECTION_PRECESSION \
{% endfor %}
--glob-path plots
Shio Sakon
committed
mkdir -p {{ config.summary.webdir }}/OPEN-BOX
gstlal_inspiral_summary_page \
--title gstlal-{{ config.start }}-{{ config.stop }}-open-box \
--webserver-dir {{ config.summary.webdir }}/OPEN-BOX \
--output-user-tag ALL_COMBINED \
--output-user-tag PRECESSION_COMBINED \
{% for inj_name in config.filter.injections.keys() %}
--output-user-tag {{ inj_name.upper() }}_INJECTION \
--output-user-tag {{ inj_name.upper() }}_INJECTION_PRECESSION \
{% endfor %}
Shio Sakon
committed
--glob-path plots
chmod a-r {{ config.summary.webdir }}/OPEN-BOX
.PHONY: unlock
unlock :
chmod a+r {{ config.summary.webdir }}/OPEN-BOX

Patrick Godwin
committed

Patrick Godwin
committed
{% if config.segments.backend == 'gwosc' %}

Patrick Godwin
committed
segments.xml.gz : CAT1_vetoes.xml.gz
gstlal_query_gwosc_segments -o $@ {{ config.start }} {{ config.stop }}{% for instrument in config.ifos %} {{ instrument }}{% endfor %}
gstlal_segments_operations --segment-name vetoes --output-segment-name datasegments --union --output-file CAT1_vetoes_renamed.xml.gz $< $<
gstlal_segments_operations --diff --output-file $@ $@ CAT1_vetoes_renamed.xml.gz
gstlal_segments_trim --trim 0 --gps-start-time {{ config.start }} --gps-end-time {{ config.stop }} --min-length 512 --output $@ $@
rm CAT1_vetoes_renamed.xml.gz
@echo ""

Patrick Godwin
committed
vetoes.xml.gz : {{ config.segments.vetoes.category }}_vetoes.xml.gz

Patrick Godwin
committed
cp $< $@
@echo ""

Patrick Godwin
committed
{{ config.segments.vetoes.category }}_vetoes.xml.gz :
gstlal_query_gwosc_veto_segments -o $@ {{ config.start }} {{ config.stop }} {% for instrument in config.ifos %} {{ instrument }}{% endfor %} --category {{ config.segments.vetoes.category }} --cumulative

Patrick Godwin
committed
@echo ""

Patrick Godwin
committed
{% elif config.segments.backend == 'dqsegdb' %}
segments.xml.gz : CAT1_vetoes.xml.gz
gstlal_query_dqsegdb_segments -o $@ {{ config.start }} {{ config.stop }}{% for instrument in config.ifos %} {{ instrument }}{% endfor %} {% for instrument, flag in config.segments.science.items() %} -f {{ "{}:{}".format(instrument, flag) }}{% endfor %}
gstlal_segments_operations --segment-name vetoes --output-segment-name datasegments --union --output-file CAT1_vetoes_renamed.xml.gz $< $<
gstlal_segments_operations --diff --output-file $@ $@ CAT1_vetoes_renamed.xml.gz
gstlal_segments_trim --trim 0 --gps-start-time {{ config.start }} --gps-end-time {{ config.stop }} --min-length 512 --output $@ $@
rm CAT1_vetoes_renamed.xml.gz
@echo ""
vetoes.xml.gz : {{ config.segments.vetoes.category }}_vetoes.xml.gz
cp $< $@
@echo ""
{{ config.segments.vetoes.category }}_vetoes.xml.gz : {{ config.segments.vetoes.veto_definer.file }}
gstlal_query_dqsegdb_veto_segments -o $@ {{ config.start }} {{ config.stop }} {% for instrument in config.ifos %} {{ instrument }}{% endfor %} --category {{ config.segments.vetoes.category }} --cumulative --veto-definer-file $<
@echo ""
{{ config.segments.vetoes.veto_definer.file }} :
git archive --remote=git@git.ligo.org:detchar/veto-definitions.git {{ config.segments.vetoes.veto_definer.version }}:cbc/{{ config.segments.vetoes.veto_definer.epoch }} $@ | tar -x
ligolw_no_ilwdchar $@
{% endif %}

Patrick Godwin
committed
tisi.xml : inj_tisi.xml

Rachael Huxford
committed
lalburst_gen_timeslides {% for instrument, slides in config.filter.time_slides.items() %} --instrument={{ instrument }}={{ slides }}{% endfor %} bg_tisi.xml

Patrick Godwin
committed
ligolw_add --output $@ bg_tisi.xml $<
@echo ""
inj_tisi.xml :

Rachael Huxford
committed
lalburst_gen_timeslides {% for instrument in config.ifos %} --instrument={{ instrument }}=0:0:0{% endfor %} $@

Patrick Godwin
committed
@echo ""
{% if config.data.template_bank is mapping %}
{{ config.svd.option_file }} :{% for bank_file in config.data.template_bank.values() %} {{ bank_file }}{% endfor %}

Patrick Godwin
committed
{% else %}
{{ config.svd.option_file }} : {{ config.data.template_bank }}

Patrick Godwin
committed
{% endif %}
mkdir -p split_bank
{% if config.svd.sub_banks %}
{% for bank_name, params in config.svd.sub_banks.items() %}
gstlal_inspiral_bank_splitter \
--f-low {{ params.f_low }} \
{% if params.num_mu_bins %}
--group-by-mu {{ params.num_mu_bins }} \
{% else %}

Patrick Godwin
committed
--group-by-chi {{ params.num_chi_bins }} \
{% endif %}

Patrick Godwin
committed
--output-path split_bank \
{% for approx in config.svd.approximant %}
--approximant {{ approx }} \
{% endfor %}
--overlap {{ params.overlap }} \
--instrument {% for instrument in config.ifos %}{{ instrument }}{% endfor %} \
--n {{ params.num_split_templates }} \
{% if params.sort_by %}
--sort-by {{ params.sort_by }} \
{% else %}
--sort-by {{ config.svd.sort_by }} \

Patrick Godwin
committed
--f-final {{ config.svd.max_f_final }} \
--num-banks {{ params.num_banks }} \
--stats-file $@ \

Patrick Godwin
committed
--bank-name {{ bank_name }} \

Patrick Godwin
committed
{{ config.data.template_bank[bank_name] }}
{% endfor %}
{% else %}
gstlal_inspiral_bank_splitter \
--f-low {{ config.svd.f_low }} \
{% if config.svd.num_mu_bins %}
--group-by-mu {{ config.svd.num_mu_bins }} \
{% else %}

Patrick Godwin
committed
--group-by-chi {{ config.svd.num_chi_bins }} \
{% endif %}

Patrick Godwin
committed
--output-path split_bank \
{% for approx in config.svd.approximant %}
--approximant {{ approx }} \
{% endfor %}
--overlap {{ config.svd.overlap }} \
--instrument {% for instrument in config.ifos %}{{ instrument }}{% endfor %} \
--n {{ config.svd.num_split_templates }} \
--sort-by {{ config.svd.sort_by }} \

Patrick Godwin
committed
--f-final {{ config.svd.max_f_final }} \
--num-banks {{ config.svd.num_banks }} \
--stats-file $@ \
$<
{% endif %}
gstlal_inspiral_set_svdbin_option --config config.yml

Patrick Godwin
committed
@echo ""
%_inspiral_dag.dag : vetoes.xml.gz segments.xml.gz tisi.xml plots {% for inj in config.filter.injections.values() %} {{ inj.file }}{% endfor %} {{ config.svd.option_file }}

Patrick Godwin
committed
gstlal_inspiral_workflow create -c config.yml --workflow $*

Patrick Godwin
committed
{% if config.injections.sets %}
{% for inj_name, params in config.injections.sets.items() %}
{{ params.output_tag }}.xml.gz :
gstlal_lvc_rates_injections \

Patrick Godwin
committed
--gps-start-time {{ config.start + params.time.shift }} \
--gps-end-time {{ config.stop }} \
--snr-calculation INJ_PARAMS \
--mass-distribution {{ params.mass_distribution }} \
--spin-distribution ALIGNED_ALIGNED \
--max-redshift {{ params.max_redshift }} \
{% for param in ['mass1', 'mass2', 'mass', 'spin1', 'spin2', 'spin'] %}
{% if params[param] %}

Patrick Godwin
committed
{% for stat, val in params[param].items() %}
--{{ stat }}-{{ param }} {{ val }} \
{% endfor %}

Patrick Godwin
committed
{% endfor %}

Patrick Godwin
committed
--waveform {{ params.waveform }} \

Patrick Godwin
committed
--time-step {{ params.time.step }} \
--time-interval {{ params.time.interval }} \
--random-seed {{ params.random_seed }} \
--h1-reference-spectrum-file {{ config.injections.h1_reference_spectrum_file }} \
--l1-reference-spectrum-file {{ config.injections.l1_reference_spectrum_file }} \
--v1-reference-spectrum-file {{ config.injections.v1_reference_spectrum_file }} \
--output-tag {{ params.output_tag }}
mv {{ params.output_tag }}-{{ config.start + params.time.shift }}-{{ config.stop }}.xml.gz {{ params.output_tag }}.xml.gz

Patrick Godwin
committed
ligolw_no_ilwdchar $@
@echo ""
{% endfor %}

Patrick Godwin
committed
{% endif %}
{% if config.injections.combine %}
{{ config.injections.combined_file }} : {% for inj in config.injections.sets.values() %} {{ inj.output_tag }}.xml.gz{% endfor %}

Patrick Godwin
committed
gstlal_inspiral_combine_injection_sets $^ --single-output -o $(basename {{ config.injections.combined_file }})
rm injection_str.txt
{% endif %}

Patrick Godwin
committed
plots :
mkdir -p $@
clean :

Patrick Godwin
committed
rm -rf segments.xml.gz *tisi.xml
rm -rf split_bank *vetoes.xml.gz {{ config.svd.option_file }}

Patrick Godwin
committed
rm -rf reference_psd median_psd
rm -rf filter rank plots
rm -rf logs *inspiral_dag.dag* *inspiral_dag.sh *.sub _condor_stdout

Patrick Godwin
committed
rm -rf {% for inj in config.filter.injections.values() %} {{ inj.file }}{% endfor %}
{% if config.injections.sets %}
rm -rf {% for inj in config.injections.sets.values() %} {{ inj.output_tag }}.xml.gz{% endfor %}

Patrick Godwin
committed
{% endif %}

Patrick Godwin
committed
clean-lite :
rm -rf logs/* *inspiral_dag.dag* *inspiral_dag.sh *.sub