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.11.tar.gz (117.5 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.11-cp37-abi3-win_arm64.whl (15.7 MB view details)

Uploaded CPython 3.7+Windows ARM64

calzone-1.1.11-cp37-abi3-win_amd64.whl (16.6 MB view details)

Uploaded CPython 3.7+Windows x86-64

calzone-1.1.11-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.6 MB view details)

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

calzone-1.1.11-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (21.6 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

calzone-1.1.11-cp37-abi3-macosx_11_0_x86_64.whl (18.9 MB view details)

Uploaded CPython 3.7+macOS 11.0+ x86-64

calzone-1.1.11-cp37-abi3-macosx_11_0_arm64.whl (17.2 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: calzone-1.1.11.tar.gz
  • Upload date:
  • Size: 117.5 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.11.tar.gz
Algorithm Hash digest
SHA256 5624acd0b12ff4f07d798c34b3a4f5f4bee7147aef6aa0d48c719463cdb9a2bb
MD5 1ee730107827ad2c88a6d83070f5adc8
BLAKE2b-256 5eb732aa66e1b28526aec763e8da76c9f7ba31a94d05b43da11f2d671f23bf6f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.11-cp37-abi3-win_arm64.whl
  • Upload date:
  • Size: 15.7 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.11-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a0461c7339a0785ef95aee646817703af2e1e9a1a671041b16a2c7c20ae0aba0
MD5 9433dfd6f09e698ef9ef3ed78fd906b5
BLAKE2b-256 c387325251da77fb34912de25daf8ddb7fc189a9ab63f760e1749eb7a83c4de6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.11-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 16.6 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.11-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b5f0af9ba8db510d070b6d5cba325a71955f2ebce901159e3b1eb8a8795c9bf4
MD5 9c8a30d06be96cecb91ba62992238925
BLAKE2b-256 a379ed0ae24559ca3ae14acf4eb7e0c786bb57109ef67e4432906c239c092381

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.11-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 865ea0e72c323a5ec5eee9ecfabe52635eed2fec1d2205f61572a4f7ad9a5d78
MD5 d8d8bdcd04a2f73570b1c25ebbc55f2c
BLAKE2b-256 5111fb54013da3d5884820957883447074add17e79f9bb108ff3b30a7eda3d83

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.11-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3dd89396326529aee07ed0435cb7f97b13714b0297cab7097c78ca0936b262a7
MD5 fe3405270da7632b8f80807b1668b8d1
BLAKE2b-256 53eb1632a236ad4092865fd39c14120a057fcbb83c180eea350cf80f1d065ba5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.11-cp37-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 08ffdd51b5f0873e0054113716ee7974d973f8425f416b68b9c2fd5db7ce1413
MD5 48908e2a55586f2758492b314dd31c88
BLAKE2b-256 6c131db6ad2caa13cd437392dc4d803183683d3c752d2ee048da231d4f64b203

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.11-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7478233ad94664145b46c2a82e99715ade30a6d6e17535e07a7a0d304f3006f2
MD5 e3c380c76366d3f6b852bb066d4f7949
BLAKE2b-256 3767c6ffadb6a09c21ede676e10c568ff2141cc68cb7d7334e0a6e9b3df996fb

See more details on using hashes here.

Provenance

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