Skip to content

Configuration Reference

Thor uses YAML configuration files. This page documents all available options.

File Structure

# Global settings
## Required
dataset_type: 'shellmodel'
driver_type: 'mcrtsimulation'

## Optional
device: "cpu"          # options: "cpu" or "gpu"
log_level: info        # options: trace, debug, info, warn, error
log_dir: "./logs"

# Dataset section (name must match dataset_type)
shellmodel:
  # ...

Global Settings

Parameter Type Default Description
dataset_type string required Dataset geometry type
driver_type string required Simulation driver
device string "cpu" Compute device
log_level string "debug" Logging verbosity
log_dir string "./logs" Log output directory

Dataset Types

  • shellmodel - Spherical shell
  • powerlaw_shellmodel - Power-law shell profiles
  • unigrid - Uniform Cartesian grid
  • infiniteslab - Infinite slab
  • pointcloud_voronoi - Voronoi tessellation (experimental)
  • pointcloud_voronoi_tree - Tree-accelerated Voronoi (incomplete)
  • pointcloud_sph - SPH interpolation (incomplete)

Driver Types

  • mcrtsimulation - Monte Carlo Radiative Transfer
  • raytracer - Forward ray tracing (projections, absorption spectra, tracers, etc)

MCRT Simulation Settings

mcrtsimulation:
  outputpath: output
  overwrite: true
  linename: Lya

  # Photon control
  nphotons_max: 100000
  nphotons_step_max: 100000
  nsteps_per_photon_max: 10000000

  # Physics
  xcrit: 3.0
  acc_scheme: Smith15
  interactor: ResonantWithDustInteractor

  # Stepping
  max_step: 1.0
  min_step: 0.0

  # Boundary conditions
  pbc: false
  allow_outofbox: false

  # Emission model
  emissionmodel:
    # ...

  # Output processors
  outputprocessors:
    # ...

MCRT Parameters

Parameter Type Default Description
outputpath string "output" Output directory
overwrite bool false Overwrite existing output
linename string "Lya" Emission line name
nphotons_max int - Max photons in memory
nphotons_step_max int - Max photons spawned per step
nsteps_per_photon_max int - Max steps per photon
xcrit float 0.0 Forced critical frequency for line wings
acc_scheme string "Smith15" Acceleration scheme
interactor string - Interaction model
max_step float - Maximum step length
pbc bool false Periodic boundary conditions
use_peeling bool false Enable peeling photons

Acceleration Schemes

Only use values other than none with Lyman-alpha.

Value Description
none No acceleration
Smith15 Smith et al. 2015
Laursen09 Laursen et al. 2009

Interactors

Value Description
SimpleInteractor Basic resonant scattering
ResonantWithDustInteractor Includes dust absorption
ResonantDoubletInteractor Doublet lines (e.g., MgII)

Emission Models

Single Source

emissionmodel:
  mode: "singlesource"
  singlesource:
    nphotons: 1000
    lum_total: 1e42
    position: [0.5, 0.5, 0.5]
    forced_weight: 1.0  # optional

List Source

emissionmodel:
  mode: "listsource"
  listsource:
    loader: gadget
    nphotons_per_source_min: 1
    nphotons_per_source_max: 1000

Dataset Source

emissionmodel:
  mode: "datasetsource"
  datasetsource:
    # Uses emission field from dataset loader

Output Processors

We allow for different raw and processed outputs. The most commonly used output format for now is the raw Monte Carlo photon output.

outputprocessors:
  - type: "photon"
    active: true

  - type: "histogram1d"
    field: "dlambda"
    weight: "weight"
    left: -1.5
    right: 1.5
    nbins: 30
    assess_convergence: true
    convergence_threshold: 0.1

Photon Output

Writes escaped photon data to HDF5.

Parameter Type Description
active bool Enable this processor

Histogram 1D

Experimental

This feature is experimental and may change.

Bins photon field values into a histogram (e.g., spectrum).

Parameter Type Description
field string Field to histogram (e.g., "dlambda")
weight string Weight field (e.g., "weight")
left float Left bin edge
right float Right bin edge
nbins int Number of bins
assess_convergence bool Check convergence
convergence_threshold float Convergence tolerance

Dataset-Specific Configuration

See Datasets for detailed configuration of each dataset type.