legpy

Low energy gamma-ray simulation in Python

https://github.com/jaimerosado/legpy

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Low energy gamma-ray simulation in Python

Basic Info
  • Host: GitHub
  • Owner: JaimeRosado
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 2.86 MB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 5
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

LegPy

DOI

Low energy gamma-ray simulation with Python.


Introduction

LegPy is a Monte Carlo (MC) simulation package for the transportation of gamma rays and electrons through any material medium. The algorithm includes several approximations that accelerate the simulation while maintaining reasonably accurate results. Notably, pair production and Bremsstrahlung are ignored, which limits the applicability of the algorithm to low energies ($\lesssim 5$ MeV, depending on the medium). The package includes a library of media containing all the necessary data taken from NIST databases. Several simple geometries of the target object are supported (cylinder, orthohedron and sphere). The target object can be filled either with one single medium or contained two media splitted by an interface surface. Photons or electrons are produced as either parallel/divergent beams or from isotropic sources with energies following any spectral distributions.

The description of the MC algorithm and the validation of the various approximations are described in https://doi.org/10.1016/j.radmeas.2023.107029. In the latest version of the code, the generation of atomic $K\alpha$ y $K\beta$ X-rays after photoelectric absorption has been implemented, extending the validation of the algorithm beyond that shown in the above-mentioned paper. See https://doi.org/10.48550/arXiv.2501.15979 for details.

How to use

LegPy provides a user-friendly tool to perform simple simulations with just a few lines of code. It is designed to be used in Google Colab (https://colab.research.google.com/) or Jupyter (https://jupyter.org/) notebooks, which are interactive environments that improve user experience without requiring programming skills. Indeed, LegPy is used for educational purposes in both the Physics Degree and Master's Degree in Biomedical Physics at the Complutense University of Madrid.

The package includes an exhaustive tutorial notebook that can be used in both frameworks. The tutorial includes a number of examples and procedures to visualize and analyze the results of the simulation. We recommend using this tutorial notebook as a template.

Colab

From a Colab notebook, clone this repository and add the directory where LegPy is located to the Python search path: !git clone https://github.com/JaimeRosado/LegPy.git import sys sys.path.insert(0,'/content/LegPy') Then import the package: import LegPy as lpy

Jupyter

Download this repository to your PC. Create a Jupyter notebook in the directory where the package is located (or use the tutorial notebook included in the repository). Then import the package: import LegPy as lpy To use LegPy, Matplotlib, Pandas and Numpy need to be installed.

Owner

  • Name: Jaime Rosado
  • Login: JaimeRosado
  • Kind: user
  • Company: Universidad Complutense de Madrid

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Arqueros
    given-names: Fernando
    orcid: https://orcid.org/0000-0002-4930-9282
  - family-names: Rosado
    given-names: Jaime
    orcid: https://orcid.org/0000-0001-8208-9480
  - family-names: Moya
    given-names: Víctor
title: LegPy
doi: 10.5281/zenodo.7882780
version: v1.2
date-released: 2022-10-25

GitHub Events

Total
  • Push event: 7
  • Pull request event: 1
Last Year
  • Push event: 7
  • Pull request event: 1