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

Uploaded CPython 3.7+Windows ARM64

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

Uploaded CPython 3.7+Windows x86-64

calzone-1.1.5-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.5-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.5-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.5-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.5.tar.gz.

File metadata

  • Download URL: calzone-1.1.5.tar.gz
  • Upload date:
  • Size: 114.2 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.5.tar.gz
Algorithm Hash digest
SHA256 7e88cea42a3fd8468efceb5bf73b8e30787c14d337fbcbb1d4ca8fd03b6a8241
MD5 d67d933bafccbc2aa6dd8527a81a69ff
BLAKE2b-256 54c9ed2d7edd68d23269ca380ec7e4e2a3b9389f5125bfce2079da4a933876ee

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.5-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.5-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c3ac1d13c09812757947fd66972d323cb1d682882ed6525ad2f27633845a04ba
MD5 40b58103bc83d81bbaf2423298cf5e42
BLAKE2b-256 87a8eb338c94dca5bdaea286fddf3c13d71b1009cbb3f28a17082a7362655d55

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.5-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.5-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0bd3531014f104380212cb0f5f74391e2f7390c4df43ac74ba0076ab953746ba
MD5 5fe63afb77af2f7d2041e2e6f4e5e8e1
BLAKE2b-256 addf4cd1f47fb35a56c866d3495b09635f3f5cabb6be78bad09c3d4f8d47d717

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9a31d14e5876e0366bf9ff460270dcd7ec90c6d231b322f505e30a29f42eeaf8
MD5 e9041368df4736a0430761eb5b8f84dd
BLAKE2b-256 ee41bc807f24b6b35ac2f7bc59c6f8ef1169cb5d87d8086cebf72d6b1efe4ccd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e40697a76dea1ecee84e8fad856ab1e1b4fadc5adb602f2ac3d6cd1096743eca
MD5 1632ad5b5a7bbfb030c0839bf82db164
BLAKE2b-256 451c0adee02b060504e9d1ac90f4f161bc57788d9dafcb71744714c5001e5a6f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.5-cp37-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 e563405c920c313538ad506e363165411cee60fb6c1f383b2ecac0b802003ac0
MD5 b35f853b4ec0e69a203afd8fa84fd67b
BLAKE2b-256 a3f678834f1f4c285a0030ebbde4e46ff18ab1d8c25cd3fd39c59f5d777c4f1d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.5-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76117e1c11abbb4abd82c57ab0fab09ee4a2709dbef91eb53d953892f129ca57
MD5 c2bd799f99a6750c45832a15e8a85fe0
BLAKE2b-256 18a33a437e819736e4025cd65789bac43c140f75b7161f6657a85217d459d802

See more details on using hashes here.

Provenance

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