▐▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▌
▐ ▌
▐ ██████████ ███ ▌
▐ ░░███░░░░███ ░░░ ▌
▐ ░███ ░░███ ██████ ████████ ████ ██████ ████████ ▌
▐ ░███ ░███ ███░░███░░███░░███░░███ ░░░░░███ ░░███░░███ ▌
▐ ░███ ░███░███ ░███ ░███ ░░░ ░███ ███████ ░███ ░███ ▌
▐ ░███ ███ ░███ ░███ ░███ ░███ ███░░███ ░███ ░███ ▌
▐ ██████████ ░░██████ █████ █████░░████████ ████ █████ ▌
▐ ░░░░░░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ▌
▐ ▌
▐▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▌
This repo is a fork of https://gitlab.mpcdf.mpg.de/fferlito/dorian The goal of this repo is simplify the usage and make it usuable on raw lightcone arrays rather than read file from disk
Deflection Of Rays In Astrophysical Numerical simulations
Dorian is a Python package to compute full-sky ray-traced weak gravitational lensing maps starting from cosmological simulations.
For technical details, see the related paper.
Installation
The package can be installed with:
pip install -e .
You will need the following dependencies:
Usage
This fork simplifies the workflow significantly. You can now pass density maps (as numpy arrays) directly to the raytracer without needing to format files on disk.
import numpy as np
from dorian.lensing import raytrace_from_density
# 1. Prepare your data
# density_maps: shape (n_shells, npix)
# redshifts: shape (n_shells,)
# ...
# 2. Run raytracing
results = raytrace_from_density(
density_maps=density_maps,
redshifts=redshifts,
z_source=1.0,
box_size=2000.0,
n_particles=1024**3,
omega_m=0.3,
h=0.7,
omega_l=0.7,
nside=512,
interp='bilinear'
)
kappa_map = results['convergence_raytraced']
For a complete working example, check examples/raytracing_demo.ipynb.
Examples
- examples/raytracing_demo.ipynb: The recommended starting point. Demonstrates loading a sample lightcone and running the raytracer.
Authors
This package has been developed by Fulvio Ferlito, with contributions from: Christopher Davies, Alessandro Greco, Martin Reinecke and Volker Springel.
Contact
If you have any question, suggestion, or need help with the code, don't hesitate to contact the author.
If you have questions regarding this fork please create a github issue
Citation
If you use this code for you work, please cite the related paper.
Metadata
Release files for dorian-raytrace-mpi 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dorian_raytrace_mpi-0.2.1.tar.gz | 38.3 kB | With provenance | Details for dorian_raytrace_mpi-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dorian_raytrace_mpi-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for dorian_raytrace_mpi-0.2.1-py3-none-any.whl |
Total release size: 78.7 kB
Release files / dorian_raytrace_mpi-0.2.1.tar.gz
| Download URL | dorian_raytrace_mpi-0.2.1.tar.gz |
|---|---|
| Size | 38.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14915495f27ce098df8050758a2069022d651bad4809667ad77b0c84f996a562
|
|
BLAKE2b-256 checksum How to use checksums |
d4553d236338c2a782130612a7ad6f2e6eb327cafec8bea97fa6687a4733552f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency logRelease files / dorian_raytrace_mpi-0.2.1-py3-none-any.whl
| Download URL | dorian_raytrace_mpi-0.2.1-py3-none-any.whl |
|---|---|
| Size | 40.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f15d8679ae6ca4ff508bf718689dbcd26be4cabccbf6ad9b8a10b088359467d9
|
|
BLAKE2b-256 checksum How to use checksums |
9ab6d8cbacbc73f42df031055ab48a766142b8795904cfabc8c0aedc04b9f3ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency logSecurity for dorian-raytrace-mpi 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dorian_raytrace_mpi-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.