Skip to content
gammasimPublic

About

Smulations for imaging atmospheric Cherenkov telescopes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

obdeect

Obdeect optical ray tracing for imaging atmospheric Cherenkov telescopes

DOI

obdeect is a simulation chain for imaging atmospheric Cherenkov telescopes.

The chain is made of modules that exchange photons as photon streams:

Component Package Command
atmospheric propagation obdeect-propagation obdeect propagation ...
gamma-ray showers obdeect-shower obdeect shower ...
light sources obdeect-sources obdeect sources ...
ray tracing obdeect-ray-tracing obdeect ray-tracing ...
camera simulation (in development) obdeect-camera obdeect camera ...
photon stream obdeect-stream obdeect stream ...

simtools configures and runs the chain.

Install

pip install obdeect             # all components at one version
pip install obdeect-sources     # one component (also installs obdeect-stream)
obdeect --version               # installed components and photon-stream format version

Requires Python 3.14 or higher.

Example

Light of a point source 10 km above the telescope, propagated through the atmosphere, traced through a telescope optical model, and simulated by the native camera or written as sim_telarray input:

obdeect sources run point-source --observation-level 2156 --spectrum fixed:wavelength_nm=400 \
    --position 0,0,10000 --photons 1e8 --events 5 --telescope-radius 12.5 \
  | obdeect propagation run --transmission atm.dat --site-altitude 2156 --seed 1 \
      --pathlen "$(obdeect propagation pathlen telescope.json)" -i - -o - \
  | obdeect ray-tracing trace-stream --model telescope.json --seed 7 \
      --pointing-zenith-deg 0 --pointing-azimuth-deg 0 \
  > light.pst
obdeect camera run camera.json light.pst --seed 3 --nsb --output events.npz \
    --pointing-zenith-deg 0 --pointing-azimuth-deg 0 --eventio events.simtel
obdeect stream to-simtel --camera-map cam.txt --bypass-optics 1 light.pst > sim.simtel

telescope.json is an optical model (obdeect ray-tracing compile) and camera.json a native camera model (obdeect camera check validates it); simtools writes both. Sources that emit inside the telescope skip the stages before their frame; a flasher on the dish writes camera-frame photons, which go straight to the camera:

obdeect sources run flasher --type dish --position 0,0,-1.6 --camera-radius 0.9 \
    --observation-level 2156 --spectrum fixed:wavelength_nm=400 --photons 1e6 \
  | obdeect stream to-simtel --camera-map cam.txt --bypass-optics 1 > flasher.simtel

--bypass-optics selects the sim_telarray Bypass_Optics mode the file is written for: 1 for single-mirror and 2 for dual-mirror telescopes (camera-frame photons), 3 for the camera-only mode, which keeps the telescope heights. obdeect stream to-simtel prints the mode of each telescope. See docs/user-guide/pipelines.md for the other sources and CORSIKA input.

Build from source

cmake -S . -B build && cmake --build build && ctest --test-dir build
pip install ./src/stream ./src/propagation ./src/shower ./src/sources ./src/ray_tracing ./src/camera
for c in stream propagation shower sources ray_tracing camera; do pytest src/$c/python/tests; done

Requires Python 3.14 or higher, a C++20 compiler, and CMake 3.20 or higher.

License

BSD-3-Clause. See LICENSE and CITATION.cff.

About

Smulations for imaging atmospheric Cherenkov telescopes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages