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.8.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.8-cp37-abi3-win_arm64.whl (15.7 MB view details)

Uploaded CPython 3.7+Windows ARM64

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

Uploaded CPython 3.7+Windows x86-64

calzone-1.1.8-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.8-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.8-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.8-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.8.tar.gz.

File metadata

  • Download URL: calzone-1.1.8.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.8.tar.gz
Algorithm Hash digest
SHA256 78ff98c77c4ece40c10a58b5b31dbb18c6376c66031fdb2a83cb7b1cda6f37c0
MD5 599c5c7edd8eb4a62b4ec79779a2d2a4
BLAKE2b-256 15002f682b649d655d39ef9f9fdd0ffde5d29d3083fdb5dba112d3fb8f42e2f9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.8-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.8-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 003597e60a6fef21a3d49edbf2a75bd8331a862863d14de331f3857173af285a
MD5 3eb47886382751a14f7e8a1e8954ec8d
BLAKE2b-256 2520208ae64a88c0548479b1ab65de68c830a33e63b7907af14f6f150eaa6e8e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.8-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.8-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b8928bf6aa51e9e652a590a8ddde0634d70660752e27510b8d4f13f78e881aa7
MD5 cbb1d63d141ad6ec17ac9c951c664aa7
BLAKE2b-256 70d750302dee595ecf42ecb77deee1f60aaf7557650edb06d5678c923d63f187

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ffd97b5bd6b497d75859ccde130472430ef47c3b477f353fafbdb0ffe63ceccf
MD5 87422c177e5b1472d24c2bb66378d5bb
BLAKE2b-256 92a0e3788d0e78e0d7cd9a2c01f294297aa5f78e5167c7629b9a08bd04acbf99

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f4b5f8768eb68dcee82e81cee6c43ec7cf6043fd5b0fd962011fffdfa693cf87
MD5 9893271eca02caef6499e0e14a6a6c5c
BLAKE2b-256 c2b0cb5ca806304ab94684dad2650dcf41504d176e56df6c07f067caf8a7a608

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.8-cp37-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 13c36f8460ec49695412ee4158f3a5832612a0fa2d353adc486ea9af34f21a67
MD5 054bf7a2b073364f86b518a4bcca9ad2
BLAKE2b-256 78a079bdaffc6e10540a6abff5d941b0f984b844b976c00094a74660ef8fafe8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.8-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e93850578c4a5cb7fb56e15067d0729c4b34f50c90a5c4832d2c2b51271eee65
MD5 9e778c677c5a1f32cd7d18da9f717ffd
BLAKE2b-256 aab4d9cfaae34be36549cdfe63a55a61cae64d4fcdec6d0949f216758e45bb5d

See more details on using hashes here.

Provenance

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