Metadata-Version: 2.2
Name: obdeect-dev
Version: 0.2.1
Summary: Ray tracing for imaging atmospheric Cherenkov telescopes
Author: obdeect contributors
License: BSD 3-Clause License
         
         Copyright (c) 2026, obdeect contributors, Gernot Maier (DESY)
         All rights reserved.
         
         Redistribution and use in source and binary forms, with or without
         modification, are permitted provided that the following conditions are met:
         
         1. Redistributions of source code must retain the above copyright notice, this
            list of conditions and the following disclaimer.
         
         2. Redistributions in binary form must reproduce the above copyright notice,
            this list of conditions and the following disclaimer in the documentation
            and/or other materials provided with the distribution.
         
         3. Neither the name of the copyright holder nor the names of its
            contributors may be used to endorse or promote products derived from
            this software without specific prior written permission.
         
         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
         AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
         IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
         DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
         FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
         DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
         SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
         CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
         OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
         OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
         
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.14
Requires-Dist: matplotlib>=3.8
Requires-Dist: numpy>=2.3
Provides-Extra: dev
Requires-Dist: nanobind>=3.1; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Description-Content-Type: text/markdown

# obdeect

<p align="center">
  <img src="docs/_static/images/obdeect_21ratio_small.jpg" alt="Obdeect optical ray tracing for imaging atmospheric Cherenkov telescopes" width="800">
</p>

`obdeect` is a C++20 optical ray tracer for imaging atmospheric Cherenkov
telescopes. The C++ core uses only the standard library. Python compiles
optical models from the simulation models, traces photons, and plots results;
simtools uses it as a ray-tracing backend.

See the [user guide](docs/USER_GUIDE.md), the [physics](docs/PHYSICS.md) of the
photon path, and the [validation](docs/VALIDATION.md) against sim_telarray.

## User Installation

Install from PyPI with:

```sh
python -m venv .venv
source .venv/bin/activate
python -m pip install obdeect-dev
```

(requires python 3.14 or higher)

Verify the installation by compiling an optical model from a
[simulation-models](https://gitlab.cta-observatory.org/cta-science/simulations/simulation-model/simulation-models)
checkout and tracing a star:

```sh
obdeect compile --simulation-models ../simulation-models --model MSTN-01 \
  --version 7.0.0 --seed 1 --zenith-deg 20 --output mst.json
obdeect trace --model mst.json --seed 2 --photons 10000 --field-deg 0.5 0
```

## Developer Installation

```sh
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
cmake --preset debug
cmake --build --preset debug --target clean  # optional: clean the build directory before building
cmake --build --preset debug
```

The C++ tests are in `build/debug/tests/`.

Test your installation with:

```sh
ctest --test-dir build/debug --output-on-failure
python -m pytest python/tests
```

## License and Citation

BSD-3-Clause license. Citation metadata is in [CITATION.cff](CITATION.cff).

## Generative AI disclosure

Generative AI tools (mostly ChatGPT 5.6) were used to write the entire code of this project. All AI-assisted outputs were reviewed, validated, and, where necessary, modified by the authors to ensure accuracy and reliability.
