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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3e059edfe3849c5e5c4a0ef313683e6442f409a9d6ac67aa7993567ada4b5a2
|
|
| MD5 |
ffc624fc6b310a815c7dba32e9d014d9
|
|
| BLAKE2b-256 |
902f26650db8bc87f7732fb640478c114235655629f80cae8265abf101a7e06e
|
Provenance
The following attestation bundles were made for calzone-1.1.10.tar.gz:
Publisher:
package.yml on niess/calzone
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calzone-1.1.10.tar.gz -
Subject digest:
c3e059edfe3849c5e5c4a0ef313683e6442f409a9d6ac67aa7993567ada4b5a2 - Sigstore transparency entry: 992115785
- Sigstore integration time:
-
Permalink:
niess/calzone@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/niess
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c84c8ef2a41dcec50699960ca4230051ac92c70fd201328f794cb064303cad1
|
|
| MD5 |
90b0db0219df7869bbd45b20ef3c7abd
|
|
| BLAKE2b-256 |
b4bb4f67b89ee5fa65aab9885a3fd95073f67acbee231433f5d998126f690f36
|
Provenance
The following attestation bundles were made for calzone-1.1.10-cp37-abi3-win_arm64.whl:
Publisher:
package.yml on niess/calzone
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calzone-1.1.10-cp37-abi3-win_arm64.whl -
Subject digest:
5c84c8ef2a41dcec50699960ca4230051ac92c70fd201328f794cb064303cad1 - Sigstore transparency entry: 992115795
- Sigstore integration time:
-
Permalink:
niess/calzone@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/niess
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aef0ba3a40cdb7bf68d25e68d5c09a27cb47d6b94dafc86fc04eb3b5927cd014
|
|
| MD5 |
e2f3642e76de49706ab534dcd99a992c
|
|
| BLAKE2b-256 |
dc769bf5c730814c91afd66971097244c658470867edd6ebd7e4ffbc57296dd1
|
Provenance
The following attestation bundles were made for calzone-1.1.10-cp37-abi3-win_amd64.whl:
Publisher:
package.yml on niess/calzone
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calzone-1.1.10-cp37-abi3-win_amd64.whl -
Subject digest:
aef0ba3a40cdb7bf68d25e68d5c09a27cb47d6b94dafc86fc04eb3b5927cd014 - Sigstore transparency entry: 992115791
- Sigstore integration time:
-
Permalink:
niess/calzone@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/niess
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file calzone-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: calzone-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 22.6 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82deb254fb3faa3684e9ab0125c90db0b36bc5c699f3a523b4bc81f8f5c71939
|
|
| MD5 |
e5a6792ef8c39a65a32e6e1639b6ec72
|
|
| BLAKE2b-256 |
31348d143ebbc7ea0571a7036887cfea957561c432eba3d76d3de528cb4d2721
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calzone-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
82deb254fb3faa3684e9ab0125c90db0b36bc5c699f3a523b4bc81f8f5c71939 - Sigstore transparency entry: 992115787
- Sigstore integration time:
-
Permalink:
niess/calzone@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/niess
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file calzone-1.1.10-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: calzone-1.1.10-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 21.6 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32903ab4891cd5bcf611b229604e9061c73e5587c9453d017a6e2d63d545a4d2
|
|
| MD5 |
4d922136c2ea6e6bd196f4ad3d1cb634
|
|
| BLAKE2b-256 |
5b9b69db9ac4091ec00a3ed9b6853a3aaa5438d7ad1aa5e4624f1ac348aea210
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calzone-1.1.10-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
32903ab4891cd5bcf611b229604e9061c73e5587c9453d017a6e2d63d545a4d2 - Sigstore transparency entry: 992115789
- Sigstore integration time:
-
Permalink:
niess/calzone@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/niess
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file calzone-1.1.10-cp37-abi3-macosx_11_0_x86_64.whl.
File metadata
- Download URL: calzone-1.1.10-cp37-abi3-macosx_11_0_x86_64.whl
- Upload date:
- Size: 18.9 MB
- Tags: CPython 3.7+, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4130300ca8046ede4a232d45fa60d97ad2086f1501f47c948dbf2d4964f72c2a
|
|
| MD5 |
acdc9a5e68b34530d80f24714bec9951
|
|
| BLAKE2b-256 |
81812bb0417ac581c69948e8e4efc162335f9e700ae76fdf5e906fb15faf9f52
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calzone-1.1.10-cp37-abi3-macosx_11_0_x86_64.whl -
Subject digest:
4130300ca8046ede4a232d45fa60d97ad2086f1501f47c948dbf2d4964f72c2a - Sigstore transparency entry: 992115792
- Sigstore integration time:
-
Permalink:
niess/calzone@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/niess
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file calzone-1.1.10-cp37-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: calzone-1.1.10-cp37-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 17.2 MB
- Tags: CPython 3.7+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e142ba0dc86f801b71c32a39afc7e33eb942112d197acf6bdf615f6d028ead14
|
|
| MD5 |
4f9c81ecf71d694393d4a20927ca76ff
|
|
| BLAKE2b-256 |
3e9c6b8da35eac35294cc0d2385b4d1d81c57a9c1d6eb5379a73a906f489b7ae
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
calzone-1.1.10-cp37-abi3-macosx_11_0_arm64.whl -
Subject digest:
e142ba0dc86f801b71c32a39afc7e33eb942112d197acf6bdf615f6d028ead14 - Sigstore transparency entry: 992115790
- Sigstore integration time:
-
Permalink:
niess/calzone@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/niess
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@eabb06b08312da7908e3667767e5e4fba92d1c9e -
Trigger Event:
workflow_dispatch
-
Statement type: