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

Uploaded CPython 3.7+Windows ARM64

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

Uploaded CPython 3.7+Windows x86-64

calzone-1.1.10-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.10-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.10-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.10-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.10.tar.gz.

File metadata

  • Download URL: calzone-1.1.10.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.10.tar.gz
Algorithm Hash digest
SHA256 c3e059edfe3849c5e5c4a0ef313683e6442f409a9d6ac67aa7993567ada4b5a2
MD5 ffc624fc6b310a815c7dba32e9d014d9
BLAKE2b-256 902f26650db8bc87f7732fb640478c114235655629f80cae8265abf101a7e06e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.10-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.10-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 5c84c8ef2a41dcec50699960ca4230051ac92c70fd201328f794cb064303cad1
MD5 90b0db0219df7869bbd45b20ef3c7abd
BLAKE2b-256 b4bb4f67b89ee5fa65aab9885a3fd95073f67acbee231433f5d998126f690f36

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.1.10-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.10-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 aef0ba3a40cdb7bf68d25e68d5c09a27cb47d6b94dafc86fc04eb3b5927cd014
MD5 e2f3642e76de49706ab534dcd99a992c
BLAKE2b-256 dc769bf5c730814c91afd66971097244c658470867edd6ebd7e4ffbc57296dd1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 82deb254fb3faa3684e9ab0125c90db0b36bc5c699f3a523b4bc81f8f5c71939
MD5 e5a6792ef8c39a65a32e6e1639b6ec72
BLAKE2b-256 31348d143ebbc7ea0571a7036887cfea957561c432eba3d76d3de528cb4d2721

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.10-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 32903ab4891cd5bcf611b229604e9061c73e5587c9453d017a6e2d63d545a4d2
MD5 4d922136c2ea6e6bd196f4ad3d1cb634
BLAKE2b-256 5b9b69db9ac4091ec00a3ed9b6853a3aaa5438d7ad1aa5e4624f1ac348aea210

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.10-cp37-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 4130300ca8046ede4a232d45fa60d97ad2086f1501f47c948dbf2d4964f72c2a
MD5 acdc9a5e68b34530d80f24714bec9951
BLAKE2b-256 81812bb0417ac581c69948e8e4efc162335f9e700ae76fdf5e906fb15faf9f52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.1.10-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e142ba0dc86f801b71c32a39afc7e33eb942112d197acf6bdf615f6d028ead14
MD5 4f9c81ecf71d694393d4a20927ca76ff
BLAKE2b-256 3e9c6b8da35eac35294cc0d2385b4d1d81c57a9c1d6eb5379a73a906f489b7ae

See more details on using hashes here.

Provenance

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