# Configurations for "fg21sim"
# -*- mode: conf -*-
#
# Syntax: `ConfigObj`, https://github.com/DiffSK/configobj
#
# There are various configuration options that specify the input data
# and/or templates required by the simulations, the properties of the input
# data, the output products, as well as some parameters affecting the
# simulation behaviors.
#
# This file contains the options corresponding the extragalactic emission
# components, which currently includes the following components:
# - clusters: halos
# - pointsources


[extragalactic]

  # Extended emissions from the clusters of galaxies
  # The configurations in this ``[[clusters]]`` section may also be
  # used by the following ``[[halos]]`` section.
  [[clusters]]
  # The clusters catalog derived from the Hubble Volume Project (CSV file)
  catalog = string(default=None)
  # Output the effective/inuse clusters catalog data (CSV file)
  catalog_outfile = string(default=None)

  # Minimum mass change of the main cluster to be regarded as a merger
  # event instead of an accretion event.
  # Unit: [Msun]
  merger_mass_min = float(default=1e12, min=1e10, max=1e14)

  # Mass ratio of the main and sub clusters, below which is regarded as
  # a major merger event.
  ratio_major = float(default=3.0, min=1.0, max=10.0)

  # The merger timescale, which roughly describes the duration of the
  # merger-induced disturbance (~2-3 Gyr).  This timescale is much longer
  # the merger crossing time (~1 Gyr), and is also longer than the lifetime
  # of radio halos.
  # Unit: [Gyr]
  tau_merger = float(default=3.0, min=1.0, max=5.0)

  # The fraction that a cluster hosts a radio halo
  halo_fraction = float(default=None, min=0.0, max=1.0)

  # Resolution for simulating each cluster templates, which are finally
  # mapped to the all-sky HEALPix map if used.
  # Unit: [arcsec]
  resolution = float(default=30.0, min=5.0)

  # Filename prefix for this component
  prefix = string(default="cluster")
  # Whether save this component to disk
  save = boolean(default=True)
  # Output directory to save the simulated results
  output_dir = string(default=None)


  # Emission of giant radio halos from galaxy clusters
  [[halos]]
  # Maximum redshift until where to tracing the cluster merging history
  # (e.g., when calculating the electron spectrum)
  zmax = float(default=3.0, min=0.0)
  # Redshift bin size for, e.g., calculating acceleration coefficients
  zbinsize = float(default=0.01, min=0.0, max=0.1)

  # Mass threshold of the sub-cluster to be regarded as a significant
  # merger. (unit: Msun)
  merger_mass_th = float(default=1e13, min=1e12)

  # Radius of the giant radio halo in clusters (unit: kpc)
  # XXX: currently only support a constant radius of halos
  radius = float(default=500.0, min=100.0)

  # Magnetic field scaling relation for clusters
  # Reference: Cassano et al. 2012, A&A, 548, A100, Eq.(1)
  #
  # The mean magnetic field assumed
  b_mean = float(default=1.9, min=0.1, max=10)
  # The index of the scaling relation
  b_index = float(default=1.5, min=0.0, max=3.0)

  # Fraction of the turbulence energy in the form of magneto-sonic waves.
  eta_t = float(default=0.3, min=0.0, max=1.0)

  # Ratio of the total energy injected in cosmic-ray electrons during the
  # cluster life to the present-day total thermal energy of the cluster.
  eta_e = float(default=0.003, min=0.0, max=0.1)

  # Minimum and maximum Lorentz factor (i.e., energy) of the relativistic
  # electron spectrum.
  pmin = float(default=1e1)
  pmax = float(default=1e5)

  # Number of points for the grid used during solving the Fokker-Planck
  # equation to calculate the electron spectrum.
  pgrid_num = integer(default=100, min=10)

  # Number of grid points used as the buffer region near the lower
  # boundary, and the value within this buffer region will be fixed to
  # avoid unphysical pile-up of low-energy electrons.
  buffer_np = integer(default=5, min=0)

  # Time step for solving the Fokker-Planck equation (unit: Gyr)
  time_step = float(default=0.01, min=1e-5, max=1.0)

  # Index of the power-law spectrum assumed for the injected electrons.
  injection_index = float(default=2.5)


  # Extragalactic point sources
  [[pointsources]]
  # Whether save this point source catelogue to disk
  save = boolean(default=True)
  # Output directory to save the simulated catelogues
  output_dir = string(default="PS_tables")
  # PS components to be simulated
  pscomponents = string_list(default=list())
  # Resolution [arcmin]
  resolution = float(default=0.6, min=0.0)

    [[[starforming]]]
    # Number of samples
    numps = integer(default=1000)
    # Prefix
    prefix = string(default="SF")

    [[[starbursting]]]
    # Number of samples
    numps = integer(default=1000)
    # Prefix
    prefix = string(default="SB")

    [[[radioquiet]]]
    # Number of samples
    numps = integer(default=1000)
    # Prefix
    prefix = string(default="RQ")

    [[[FRI]]]
    # Number of samples
    numps = integer(default=1000)
    # Prefix
    prefix = string(default="FRI")

    [[[FRII]]]
    # Number of samples
    numps = integer(default=1000)
    # Prefix
    prefix = string(default="FRII")