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.2.1.tar.gz (120.0 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.2.1-cp37-abi3-win_arm64.whl (17.2 MB view details)

Uploaded CPython 3.7+Windows ARM64

calzone-1.2.1-cp37-abi3-win_amd64.whl (15.9 MB view details)

Uploaded CPython 3.7+Windows x86-64

calzone-1.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.6 MB view details)

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

calzone-1.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (20.5 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

calzone-1.2.1-cp37-abi3-macosx_11_0_x86_64.whl (19.4 MB view details)

Uploaded CPython 3.7+macOS 11.0+ x86-64

calzone-1.2.1-cp37-abi3-macosx_11_0_arm64.whl (18.0 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

File details

Details for the file calzone-1.2.1.tar.gz.

File metadata

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

File hashes

Hashes for calzone-1.2.1.tar.gz
Algorithm Hash digest
SHA256 de708827c353beb876a371378d9fe9ce390491130412ee7ab7a0ebf4658fba39
MD5 8ddcdc0bf3bd67513da2e005064be4a3
BLAKE2b-256 8a0a33f9d1aa264507099be23c69a648a70feef3b18a53d8da859bb1ee6d2c36

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.2.1-cp37-abi3-win_arm64.whl
  • Upload date:
  • Size: 17.2 MB
  • Tags: CPython 3.7+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for calzone-1.2.1-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 f08a59012b0a597e76ef64d4903e318dd07067b2cee71af3b9637aadc11f0c1d
MD5 07ecb31ff84feb0920207a2b83029cd7
BLAKE2b-256 c0166abb33c4268311800d38c8214b8afb0fa125dcb9f3f9c6998494e0547f37

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: calzone-1.2.1-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 15.9 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for calzone-1.2.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3a96f6e8355b3ef77ea48a365b3856fdce268845efb4312382715a7a29206548
MD5 19808f87aaaba981e50ca53b1a85f690
BLAKE2b-256 3cb69bff4448ed6adac004e02d6c80a961e6dcff5c1baac8acad7ffb8f26210e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d3de01601076ae51689e935a067d8c39f127bee0e4b9463d2a3483e51cbbf7ae
MD5 3a9f72b5b252ede9af9b96b86e5344d8
BLAKE2b-256 bf6bcc1a8e67963b1f3fc3cf527857651e0acdcce079660b838a20a136b26285

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5a546807123e7d3dea50b354abccbb5ca5449fc47ee9914876f9c09d7667b6c9
MD5 82bdff19631d76f1199e98b3bc4b6a7c
BLAKE2b-256 4330cd557e8c03730114b0f269e89f69abe94e2aba21eb496d6406fd2cd67c82

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.2.1-cp37-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 ab50d3be7b786885e90919066a68f861d2934a3da856262b3c3f34e3893132d2
MD5 0e007a87c4e4cc4a62d553563a8544f5
BLAKE2b-256 c201a76bb3ff7e912f9c567ab46c4c34c55b7635e6004668c665647bddc3151c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for calzone-1.2.1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b7d2cd3a60e87cca1fb726c514a8501de347d85f712e414ea3bb468da898aa0
MD5 a0f6a415e64a995907db6bb76a49b9cf
BLAKE2b-256 f958567837187e8d4ccdd0e747a42490b0eb9d30e25f530c81d9a6d6a4d35007

See more details on using hashes here.

Provenance

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