{# Template of ini file for Parameter Estimation. This is a jinja template. The
explanation on jinja is here http://jinja.pocoo.org . #}

{% set engine = 'lalinferencenest' %}
{% set nparallel = '4' %}
{% set roq = 'True' %}
{% set roqdir = '/home/cbc/ROQ_data/IMRPhenomPv2/' %}
{% set approx = 'IMRPhenomPv2pseudFourPN' %}
{% set neff = '1000' %}

{# IMRPhenomPv2_ROQ can not be applied for large massratio #}
{% if q <= 0.143 %}
    {% set approx = 'SEOBNRv4_ROM' %}
    {% set roqdir = '/home/cbc/ROQ_data/SEOBNRv4ROQ/' %}
{% endif %}

{# SEOBNRv4 for large massratio is not ROQed. #}
{# Change to non-ROQ run but use mcmc with 10 chains to make the run fast #}
{% if q <= 0.0588 %}
    {% set engine = 'lalinferencemcmc' %}
    {% set nparallel = '10' %}
    {% set roq = 'False' %}
    {% set neff = '300' %}
{% endif %}


[analysis]
ifos={{ ifos | safe }}
engine={{ engine }}
nparallel={{ nparallel }}
service-url={{ service_url }}
roq={{ roq }}
coherence-test=False
upload-to-gracedb=False
singularity=False
osg=False


[paths]
webdir={{ webdir }}
roq_b_matrix_directory={{ roqdir }}


[input]
# max-psd-length and padding are never used, but lalinference_pipe needs them.
max-psd-length=10000
padding=16
gps-start-time = {{ gps_start_time }}
gps-end-time = {{ gps_end_time }}
psd-start-time = {{ psd_start_time }}
psd-length = {{ psd_length }}
{# FIXME: it would be better to determine trigger time as well here, but
current lalinference_pipe automatically determines it from coinc.xml. #}
events=all
analyse-all-time=False
timeslides=False
ignore-science-segments=True
ignore-gracedb-psd=True


[condor]
{# paths to executables #}
{% for path in paths %}
{{ path.name }}={{ path.path }}
{% endfor %}

mpirun=mpirun
accounting_group=ligo.dev.o3.cbc.pe.lalinference


[datafind]
url-type=file
types = {{ types | safe }}


[data]
channels = {{ channels | safe }}


[lalinference]
flow = {{ flow | safe }}


[engine]
srate={{ srate }}
fref=100
seglen={{ seglen }}
approx={{ approx }}
amporder=0
neff={{ neff }}
nlive=512
tolerance=0.1
ntemps=8
margphi=
resume=
adapt-temps=
progress=


[mpi]
mpi_task_count=8
machine-count=8
machine-memory=4000


[skyarea]
maxpts=2000


[resultspage]
skyres=0.5


[bayeswave]
{# FIXME: We should use Bayeswave PSD with the following settings
in the future.
Niter=100000
Nchain=10
Nbayesline=20000
#}


[segfind]


[segments]


[ppanalysis]


[singularity]


[ligo-skymap-from-samples]
enable-multiresolution=

[ligo-skymap-plot]
