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

Uploaded CPython 3.7+Windows ARM64

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

Uploaded CPython 3.7+Windows x86-64

calzone-1.1.9-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.9-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.9-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.9-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.9.tar.gz.

File metadata

  • Download URL: calzone-1.1.9.tar.gz
  • Upload date:
  • Size: 117.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.9.tar.gz
Algorithm Hash digest
SHA256 e5150364c0c0e583cb330b324f50e77522d3e514137a959c4c9d742c138b5178
MD5 108b72247bce0efdd7709e7fb16dcab0
BLAKE2b-256 3618cd98700fe0dff7083dc54fda3b4f505a8d70adabe4530e20c7a7a3477e02

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.9-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.9-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 3955dedb96ea10992f833c4ddb2a2c30f108c34a1ab7df5cbc02629f0a3ca722
MD5 07877be772f9835a7e86ca87758f960f
BLAKE2b-256 156b12432c88e3f1d8658eca5bf515e6c99239140111f65b3bf05133030fdb87

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.9-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.9-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 aa12f42d0e5efba262a4b1c30a447ea6299e358a47082b72c4e9fad216aeeee1
MD5 b2c06eb3ae2d6bb61fab44fbc5baa221
BLAKE2b-256 8abde2d240128c1e0596396f6bb21cd82e5be661975524e459832b406f1592af

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.9-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b6863391f8700c5a88179750ee5883cec6055fa0cf06d6ec2d9e8368ed453d15
MD5 cfe3602ab34257f4fece14a5e5b395ee
BLAKE2b-256 071c7049c240223ca40a0b603d62dd290ae045f5ba9494a6ce73a0d0fb2f56e5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.9-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bde544f117d95387ef988a84f4b2e8c68b07086c61e138218c57e1e1eaaaf1ed
MD5 56c9370c408ee6cc9c77c15c293c3b50
BLAKE2b-256 83fa914a380169ef6374314c94e27072985cad06bdc0ec34660c7eb07a479ccb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.9-cp37-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 24a2335cec45b66137b30f24d3e243c93fc479cbaac4705542abfd54f09e52ad
MD5 72cd6e2b4b662a00a5b20af7effe0490
BLAKE2b-256 f0cc2a92cef96eabe0d5fde1576fcda602efbf7e3eabff340b8e8060f82e8c59

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.9-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a305d6e7cc955cd364998636bbc1ceb4c6722f4faf51b3619c92051df5b61e37
MD5 36d5dfbb86f36c50e74840cb2c9315e4
BLAKE2b-256 0d6c0c30cb34ca7371f65b8a8adf7e4bfa6c747f3f27f4b8c26789a2b7237ca2

See more details on using hashes here.

Provenance

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