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.4.tar.gz (113.7 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.4-cp37-abi3-win_arm64.whl (15.6 MB view details)

Uploaded CPython 3.7+Windows ARM64

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

Uploaded CPython 3.7+Windows x86-64

calzone-1.1.4-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.4-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.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: calzone-1.1.4.tar.gz
  • Upload date:
  • Size: 113.7 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.4.tar.gz
Algorithm Hash digest
SHA256 6e89786ae0d09624840b16f05b669bcd196bceb51551dbf771c10000de6f1679
MD5 588746d6cef1e8bd9009521a6f045859
BLAKE2b-256 c0394175d3ac940edb1b1ffd731123e32e7b3044ae51ef7ce59d3862dd892b7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.4.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.4-cp37-abi3-win_arm64.whl.

File metadata

  • Download URL: calzone-1.1.4-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.4-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a74a519d04866428a779b35937c7502fa8ec376a95491fe0640e541eeff707e6
MD5 744d2f11da59abd799762d610a858d6e
BLAKE2b-256 d2061188b9cc2ef8e683d37e881056a0ae00e4cbe522242466d74d1cae872011

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.4-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.4-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: calzone-1.1.4-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.4-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9db3860dcc7cbfb24bf387f906c3a95dd7228d957ee5f7bb2dda2986f00bf249
MD5 b14b4e9e5b3aaa6741d7dcb6a3cefbbb
BLAKE2b-256 97f10fc525b925f5535c54e8168d12299a34433fbc960df779e1338b9647450a

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.4-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.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for calzone-1.1.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1dfac187459bc650ff4e50d0e715b5f63b28d8634476884fb2978f1cc76f3d46
MD5 ee8d08e96e8c467e3572b004b78c02f9
BLAKE2b-256 bea4f689ec0191a24d9eab10027533beca978704e60b2c16b13211132dc5a707

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.4-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.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for calzone-1.1.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d42a58774e0a72e6076021b67685b3e0226519977468d4118d9a0dad28f6a27a
MD5 9ef95e62cd8b544116e9cfba9be711eb
BLAKE2b-256 2d85456a3013ef637e44e24edb275af05ba6f71534a7252f4db705c72a8a3ca1

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.4-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.4-cp37-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for calzone-1.1.4-cp37-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 56bd6b9cad930d65dc69302359f1d524ea3564bc94f999ebe5c338c33faa542d
MD5 d443dde6ba277abfb0319f22ee6a80dd
BLAKE2b-256 bfaedf0927a8c706afd3e296b878821d3b2f89e653b404ee793dfd9cb8ee1093

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.4-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.4-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for calzone-1.1.4-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2051a87eadce3f9ca8a01c1f81cb2330aa02187071f16aa47819fcad4832765e
MD5 f3f0284c1ea614ba51beda4ed68d5717
BLAKE2b-256 6285b63326de9addc404e3782cde79a1262f9c57baf54d983315404efb6edf4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for calzone-1.1.4-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