Skip to main content

A Geant4 Python wrapper.

Project description

Calzone

Calzone (CALorimeter ZONE) is a Python package built on top of Geant4. It was developed in the context of geosciences with the objective of studying the emission of radioactivity from volcanoes (Terray et al., 2020), and in particular to simulate the response of gamma spectrometers deployed in the field. To this end, Calzone was developed in conjunction with Goupil (Niess et al., 2024), a backward gamma transport engine, and is interoperable with the latter. Yet, both packages can be used entirely independently, if necessary.

Please refer to the online documentation and the examples for further information.

Installation

Binary distributions of Calzone are available from PyPI, e.g. as

python -m pip install calzone

In addition, Calzone requires 2 GB of Geant4 data tables, which are not included in the Python package. Once Calzone has been installed, these can be downloaded as

python -m calzone download

Please refer to the documentation for alternative installation methods.

Quick start

# file: geometry.toml

[Environment]
sphere = 1E+05  # cm
material = "G4_WATER"

[Environment.Source]
sphere = 1E+02  # cm
material = "G4_WATER"

[Environment.Source.Detector]
cylinder = { length = 5.1, radius = 2.55 }  # cm
material = "G4_SODIUM_IODIDE"
role = "record_deposits"
# file: run.py

import calzone

# Instanciate a simulation engine (using a TOML geometry).
# Requires installing `tomli` for Python < 3.11.
simulation = calzone.Simulation("geometry.toml")

# Generate primary particles.
source = simulation.geometry.find("Source")
energy = 1.0  # MeV
primaries = simulation.particles()  \
    .pid("gamma")                   \
    .energy(energy)                 \
    .inside(source)                 \
    .generate(1000)

# Run the simulation and fetch deposits.
detector = simulation.geometry.find("Detector")
deposits = simulation  \
    .run(primaries)    \
    .deposits[detector.path]

License

The Calzone source is distributed under the GNU LGPLv3 license. See the provided LICENSE and COPYING.LESSER files. Additionaly, Calzone uses software developed by Members of the Geant4 Collaboration, which is under a specific license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

calzone-1.1.6.tar.gz (114.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

calzone-1.1.6-cp37-abi3-win_arm64.whl (15.6 MB view details)

Uploaded CPython 3.7+Windows ARM64

calzone-1.1.6-cp37-abi3-win_amd64.whl (16.5 MB view details)

Uploaded CPython 3.7+Windows x86-64

calzone-1.1.6-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.4 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

calzone-1.1.6-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (21.4 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

calzone-1.1.6-cp37-abi3-macosx_11_0_x86_64.whl (18.7 MB view details)

Uploaded CPython 3.7+macOS 11.0+ x86-64

calzone-1.1.6-cp37-abi3-macosx_11_0_arm64.whl (17.0 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

File details

Details for the file calzone-1.1.6.tar.gz.

File metadata

  • Download URL: calzone-1.1.6.tar.gz
  • Upload date:
  • Size: 114.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for calzone-1.1.6.tar.gz
Algorithm Hash digest
SHA256 a6aac0395060df7227a1b593e5793b8f711eee386ec566eb0b0c7dc3c40c223f
MD5 45953faaf9c32300d5f026ecca7cce3d
BLAKE2b-256 96523acc17c9367535a93f6db84d1b7b4263f9c0bba35f7502a77b2daac05201

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.6.tar.gz:

Publisher: package.yml on niess/calzone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file calzone-1.1.6-cp37-abi3-win_arm64.whl.

File metadata

  • Download URL: calzone-1.1.6-cp37-abi3-win_arm64.whl
  • Upload date:
  • Size: 15.6 MB
  • Tags: CPython 3.7+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for calzone-1.1.6-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a1df121894b3bd4243f4961769e4a619577890fa55235b16b288c7bd2857cfae
MD5 57813b866613e0e24964f73f8efac7a9
BLAKE2b-256 6b71b9346d526c4e4f062e1c399dc92263302b208ae4ac5b1f1c37b339c3cd2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.6-cp37-abi3-win_arm64.whl:

Publisher: package.yml on niess/calzone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file calzone-1.1.6-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: calzone-1.1.6-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 16.5 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for calzone-1.1.6-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5de71fb391a6350bcf09c52fbd61af171b98dba95c8dd3157b2363f4e96378cd
MD5 51133ec254edd25c5821f827311177ee
BLAKE2b-256 a5766ba7a9442de64f1c7f1d186f982cb3ad39ae41e3abfccd5b710d2a203711

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.6-cp37-abi3-win_amd64.whl:

Publisher: package.yml on niess/calzone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file calzone-1.1.6-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for calzone-1.1.6-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3edce07285692d8ce6c1aa5552bb192ac871d464c00b0cea67903e622f05f9fc
MD5 c3fa5ab0d63eaefb8f2dfbfb52c4224a
BLAKE2b-256 82a25aafc4cd5fe3586f58aea49cce2471a935dca6bbe615ce1c41d4af162f27

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.6-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: package.yml on niess/calzone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file calzone-1.1.6-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for calzone-1.1.6-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4df9cc0f2ecd8c6c5f664c9d8335a318a412b97d48348edaf7677a618611c05d
MD5 ba0611e19ffcb1903452c5067d7c94a9
BLAKE2b-256 1eefcd2e4e163ca683c6b0a4252c590b8e3f097d0680c578695382ea7547bcf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.6-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: package.yml on niess/calzone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file calzone-1.1.6-cp37-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for calzone-1.1.6-cp37-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 a1f55fbc5abb482fc6abcd183753f8b84e67870e808f2e43f567b22d89aed253
MD5 2673ae28c52c253aed127960b32ad1e5
BLAKE2b-256 69fe522282a26c2d9b0cc45a5b62b33d45874aa8137a6063c12dab6400c63d37

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.6-cp37-abi3-macosx_11_0_x86_64.whl:

Publisher: package.yml on niess/calzone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file calzone-1.1.6-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for calzone-1.1.6-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52ed1737c74d571d56e3680d8d532db159b29d1808913aa7ee3be2374cc49835
MD5 487ba7a2fb0366824f66cef17e8014ae
BLAKE2b-256 d4b0262d8d991ce9a9461cd8a7fa93134d293c388426e815b48b21a07c6a9329

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.6-cp37-abi3-macosx_11_0_arm64.whl:

Publisher: package.yml on niess/calzone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page