##--------------------------------
# general options

# NOTE NOTE NOTE : use the correct gpstime below for next gwtc run. Though this won't affect the results, it would be good to use gpstime consistent with allsky
start: 1368195220 # start of chunk 0
stop: 1389455118 # end of chunk 16

instruments: H1L1
min-instruments: 2

##--------------------------------
# data product options

data:
  template-bank: reassigned_H1L1V1-O4_MANIFOLD_BANK-0-2000000000.xml
  data-dir: /home/gstlalcbc.offline/observing/4/a/runs/gwtc4_ranks/trigs.imbh_241112/input_data/
  chunks:
    chunk1:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk1_imbh_1368975618_1370097052/input_data/ # location of mass model, etc
      filter-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk1_imbh_1368975618_1370097052/filter_data/ # location of filter data products
    chunk2:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk2_imbh_1370097052_1371306087/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk2_imbh_1370097052_1371306087/filter_data/
    chunk3:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk3_imbh_1371306087_1372546081/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk3_imbh_1371306087_1372546081/filter_data/
    chunk4:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk4_imbh_1372546081_1373711624/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk4_imbh_1372546081_1373711624/filter_data/
    chunk5:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk5_imbh_1373711624_1374936316/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk5_imbh_1373711624_1374936316/filter_data/
    chunk6:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk6_imbh_1374936316_1376144770/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk6_imbh_1374936316_1376144770/filter_data/
    chunk7:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk7_imbh_1376144770_1377355516/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk7_imbh_1376144770_1377355516/filter_data/
    chunk8:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk8_imbh_1377355516_1378565116/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk8_imbh_1377355516_1378565116/filter_data/
    chunk9:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk9_imbh_1378565116_1379774716/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk9_imbh_1378565116_1379774716/filter_data/
    chunk10:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk10_imbh_1379774716_1380984316/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk10_imbh_1379774716_1380984316/filter_data/
    chunk11:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk11_imbh_1380984316_1382195103/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk11_imbh_1380984316_1382195103/filter_data/
    chunk12:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk12_imbh_1382195103_1383404656/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk12_imbh_1382195103_1383404656/filter_data/
    chunk13:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk13_imbh_1383404656_1384588801/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk13_imbh_1383404656_1384588801/filter_data/
    chunk14:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk14_imbh_1384588801_1385822808/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk14_imbh_1384588801_1385822808/filter_data/
    chunk15:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk15_imbh_1385822808_1387206946/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk15_imbh_1385822808_1387206946/filter_data/
    chunk16:
      data-dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk16_imbh_1387206946_1389455118/input_data/
      filter_dir: /home/gstlalcbc.offline/observing/4/IMBH/a/runs_final/chunk16_imbh_1387206946_1389455118/filter_data/
  rank-dir: /home/gstlalcbc.offline/observing/4/a/runs/gwtc4_ranks/trigs.imbh_241112/rank # location for rank data products to be stored

##--------------------------------
# data source options

source:
  frame-segments-file: segments.xml.gz
  frame-segments-name: datasegments
  #x509-proxy: x509_proxy

##----------------------------------
segments:
  backend: dqsegdb
  science:
    H1: DMT-ANALYSIS_READY:1
    L1: DMT-ANALYSIS_READY:1
  vetoes:
    category: CAT1
    veto-definer:
      file: H1L1-HOFT_C00_O4_CBC.xml
      version: CAT1-HL-20230801-R1
      epoch: O4

##--------------------------------
# psd options

psd:
  fft-length: 4
  sample-rate: 4096

##--------------------------------
## svd bank options

svd:
  f-low: 20.0
  num-chi-bins: 1
  approximant:
    - 0:1.73:TaylorF2
    - 1.73:1000:SEOBNRv4_ROM
  tolerance: 0.9999
  max-f-final: 1024.0
  num-split-templates: 200
  overlap: 30
  num-banks: 2
  samples-min: 2048
  samples-max-64: 2048
  samples-max-256: 2048
  samples-max: 4096
  autocorrelation-length: 351
  sort-by: mchirp
  option-file: svd_manifest.json


##--------------------------------
## filtering options

filter:
  group-svd: False
  fir-stride: 1
  min-instruments: 2
  coincidence-threshold: 0.01
  ht-gate-threshold: 0.8:15.0-45.0:100.0
  veto-segments-file: vetoes.xml.gz
  time-slide-file: tisi.xml
  #injection-time-slide-file: inj_tisi.xml
  time-slides:
    H1: 0:0:0
    L1: 0.62831:0.62831:0.62831

##--------------------------------
## injection options

#injections:
#  filter:
#    IMBH:
#      file: injections.xml.gz
#      range: 0.01:1000.0
 #     pregenerated: True


##--------------------------------
## prior options

prior:
  mass-model: mass_model/mass_model_combined_IMBHreassigned_allskyfull_BANK.h5
  df: analytic
  dtdphi-file: inspiral_dtdphi_pdf.h5
  #svd-bank: /home/gstlalcbc.offline/observing/4/a/runs/svd_bank_ref
  #seed-likelihood:
    #verbose: True
    # If this option is given, the numerator will be rewritten
    # with the provided mass-model, df, dtdphi, idq
    # Provide mass-model, df again even if provided in prior
    #mass-model:
    #dtdphi-file:
    #idq-file:


##--------------------------------
## ranking options

rank:
  ranking-stat-samples: 1048576
  calc-pdf-jobs: 4
  calc-pdf-cores: 1
  marg-pdf-files: 32
  merge-level-one-max-files: 50
  merge-level-two-max-files: 10
  add-level-one-max-files: 500
  add-level-two-max-files: 100
  allow-impossible-inj-candidates: False
  #use-bankchisq: False
  delete-triggers: False

##--------------------------------
## summary options

summary:
  plot_bin_background: True
  webdir: ~/public_html/observing/4/a/runs/gwtc4_ranks/241112/trigs.imbh_241112/trigs.imbh_241112

##--------------------------------
## condor options

condor:
  profile: ldas
  accounting-group: ligo.dev.o4.cbc.uber.gstlaloffline
  accounting-group-user: leo.tsukada
  singularity-image: /home/gstlalcbc.offline/observing/4/a/builds/gstlal-gwtc4-rank/
