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

Uploaded CPython 3.7+Windows ARM64

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

Uploaded CPython 3.7+Windows x86-64

calzone-1.1.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.5 MB view details)

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

calzone-1.1.3-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.3-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.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for calzone-1.1.3.tar.gz
Algorithm Hash digest
SHA256 692753e8c74815ab41cae8fa34d56415b7b3dd1178b3bdd188a34185446f0788
MD5 dac061bdc78800a1de0e094e10da68b1
BLAKE2b-256 db34c0e76209ed6ae30576315f9d0880acea2b2e3e65f32f63bd309b98e7c215

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.3-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.12.9

File hashes

Hashes for calzone-1.1.3-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 cc6206231486ffbb5678034402e0b5bd32a5becdbe78163e19396f82f566cf55
MD5 ed0eb24287b9e68cbe284568ef356134
BLAKE2b-256 b30235c1eccc848bce23181bbe631a30b164aa1d830a1f561da26eae077963ba

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.3-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.12.9

File hashes

Hashes for calzone-1.1.3-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c3813284a112257aa682f6568dfdaa606cfa5a12d7040a57ca4572d3cb931bbd
MD5 e5b12d5a46d26f09c74e36cfa9457f1f
BLAKE2b-256 3143a6c279229d6bd3bed2f2e900439ae26412481d27fb8eb58e41b34c12ab89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d9ed62f2b9f3a7ee9bda4149e7f7940549abdb6ddf113817f2ba57c53295e6dd
MD5 27b61897db66937d70343a829bdfecc4
BLAKE2b-256 5454d4bc4880580801b711c1db49dc2aa825fc1abcbc0481e41277894b3847ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f04a99f1b003b76db337e3e8451dbf228707a024781ff52a185312f1a5d6f6bd
MD5 8a93a1f4b919e686640605560df45bf5
BLAKE2b-256 f67bdd726fa56b6803977a160109dbd7aeb25fab5c1550842f629aa268294174

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.3-cp37-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5e2ed6c3d53492755eb441473121aced074077bcd6364957d2b2aca98e2a3385
MD5 8d4deb31ece718f3a907978ef683763d
BLAKE2b-256 39bea7407b8f0bbfda86b6713ef9cf5c17590208e2531cc81232765fa9772085

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.3-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5567d654464f2e3cfb83b3ccf0449a5266dd169101919de2eb6ada0654487337
MD5 fd02b679b690ba1a22e1dacc9ef5fb7a
BLAKE2b-256 f38ff75647d5fa29cbc1ae877b638d101a7a1301f6f8cc037dee8560672e742e

See more details on using hashes here.

Provenance

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