Skip to main content

Gamma Spectroscopy analysis in PYthon

Project description

GammaSPY: Gamma Spectroscopy analysis in PYthon

Warning This package is in active development and may introduce breaking changes.

A suite of open-source tools for automated γ-ray spectroscopy analysis of fast neutron-induced nuclear reactions, developed for data collected with the EXOGAM clover detector array, but can be use for any HPGe detector arrays.


Overview

This repository contains the analysis framework developed for processing and interpreting γ–γ coincidence data from the EXOGAM detector array at GANIL. The tools integrate experimental data processing, nuclear database cross-referencing, and reaction simulation predictions into a unified automated workflow.

The suite currently includes:

  • 2D background subtraction — Native ROOT implementation of the Palameta–Waddington background subtraction algorithm for γ–γ matrices, eliminating the need to convert to legacy RadWare formats
  • Coincident γ finder — Automated coincidence identification tool with recursive cascade mapping against ENSDF and XUNDL databases, to arbitrary cascade order
  • Expected spectrum plotter — Quantitative prediction of gated γ-ray spectra based on TALYS cross-sections, detector efficiency, and experimental geometry

Planned features include:

  • DCO and polarization asymmetry extraction — Angular correlation analysis tools for spin-parity assignments from oriented nuclear ensembles
  • Custom TALYS modifications — Source code patches extending discrete level tracking, memory allocation, and output formatting in TALYS for level-by-level population cross-sections

Installation

GammaSPY requires ROOT with PyROOT bindings. If you already have a setup with that, you can install simply with:

pip install gammaspy

Otherwise using pixi (installation instructions) is highly recommended since it can also install root. Then simply:

git clone https://gitlab.com/Hemantika1122/GammaSPY.git
pixi install

Quick Start

Get projection with background subtraction

If running in jupyter notebook use %jsroot for interactable TCanvases

from gammaspy.hist2d import Hist2D

hgg = Hist2D("output_gg_addback.root", "hgg")
canvas = hgg.draw_projection(gate_energy=1454, gate_width=3, subtract_background=True)

Add coincidence finder

First download the adaptedLevels csv files for relevant isotopes from the nudat website.

from gammaspy.nudat import LevelSchemes

level_schemes = LevelSchemes(
    isotopes=["57Ni", "58Ni", "56Co", "57Co"],
)
canvas = hgg.draw_projection(
    gate_energy=1454, gate_width=3, level_schemes=level_schemes, coincidence_order=2
)

Expected gamma spectrum

First run Talys simulations with relevant target isotope and neutron energy range. Pass the output location of the simulation to

from gammaspy.simulation import (
    save_simulated_counts_1d,
    save_simulated_projection_spectrum,
)

save_simulated_counts_1d()

along with incident flux spectrum and other experimental parameters. This will save the expected 1D counts at different gamma energies as a csv file. Pass this csv file to save_simulated_projection_spectrum() along with the LevelScheme object created above and gate energy and widths. It will produce a root file with expected spectrum which can be overlaid with experimental spectrum.

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

gammaspy-0.2.0.tar.gz (35.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gammaspy-0.2.0-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file gammaspy-0.2.0.tar.gz.

File metadata

  • Download URL: gammaspy-0.2.0.tar.gz
  • Upload date:
  • Size: 35.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gammaspy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3efa10c089572bcb2aba52e859eb292c0616852871e59e8530b4b4e60ca3aa66
MD5 f838f8850272b2ca410eb5475e55aa6c
BLAKE2b-256 b6367bf715fbee4f64f94b6649e60358601d54516c190d9fd05c7c7ebe43d6a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for gammaspy-0.2.0.tar.gz:

Publisher: cd.yml on Hemantika1122/GammaSPY

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gammaspy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: gammaspy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gammaspy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 874ab50a9013f6502699bf63ed491b0d9b980596f00b08d50cd6a1455bf9d9e1
MD5 0fbb312d6b9ec8a55596730e61ea6a19
BLAKE2b-256 86ad07ab39479cf490110149d0cae3cb7470a8b998c39622d8745df05e7a603a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gammaspy-0.2.0-py3-none-any.whl:

Publisher: cd.yml on Hemantika1122/GammaSPY

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