Skip to content

v0.1.0

Choose a tag to compare

@maureeungaro maureeungaro released this 24 May 02:09
· 28 commits to main since this release

Initial release of pygemc — the Python API for GEMC geometry definition and output analysis.

Release notes

pygemc provides a pure-Python interface to define Geant4 detector geometries, materials, and
simulation configurations without writing C++ code. Output files produced by the gemc binary
can be read back and analysed entirely from Python.

Geometry API

  • GVolume — define Geant4 solids, placements, sensitive detectors, and mirrors
  • GMaterial — define materials by composition, density, and optical properties
  • GConfiguration — configure and run a full geometry export (ASCII, SQLite)
  • GColors — named color palette for volume visualization
  • autogeometry — decorator that wires a geometry function into the gemc plugin system
  • G4 unit converters: convert_length, convert_angle, convert_time, convert_energy, convert_list
  • g4_units module with the complete Geant4 unit table
  • PyVista-based 3D visualization (pyvista_api)
  • SVG and HTML solid previews

Output formats

  • ASCII flat-file geometry database
  • SQLite geometry database

Analyzer

  • GemcOutput — read and inspect gemc simulation output
  • read_output — convenience loader for multiple output formats
  • plot_variable — quick histogram/scatter plots from simulation data
  • gemc-analyzer CLI entry point

CLI tools

  • gemc-system-template — scaffold a new detector system from a Geant4 solid template

Tests

  • test_cli.py — CLI smoke tests for all supported solid types
  • test_geometry.py — geometry creation and database export for ASCII and SQLite formats

CI

  • GitHub Actions workflow with automated install and test on push

Supported platforms

  • Linux (amd64 and arm64)
  • macOS

Dependencies

  • Python 3.10 or higher
  • numpy, pandas, matplotlib, pyyaml (installed automatically)
  • vtk, pyvista, pyvistaqt, pyqt6 (visualization, installed at deploy time)