xpecgen

xpecgen: A program to calculate x-ray spectra generated in tungsten anodes - Published in JOSS (2016)

https://github.com/dih5/xpecgen

Science Score: 93.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 9 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 6 months ago · JSON representation

Repository

A python package with a GUI to calculate X-ray sPECtra GENerated in tungsten anodes.

Basic Info
  • Host: GitHub
  • Owner: Dih5
  • License: gpl-3.0
  • Language: Python
  • Default Branch: master
  • Size: 1.37 MB
Statistics
  • Stars: 19
  • Watchers: 3
  • Forks: 4
  • Open Issues: 1
  • Releases: 8
Created over 9 years ago · Last pushed over 4 years ago
Metadata Files
Readme Contributing License

README.md

xpecgen

Github release PyPI Semantic Versioning

license GNU GPLv3 DOI Joss status

Build Status Documentation Status

A python package with a GUI to calculate x-ray spectra generated in tungsten anodes, as well as the bremsstrahlung component in other media.

Features

  • X-ray spectra calculation using the models from [1].
  • HVL calculation.
  • Python library and Graphical User Interface.
  • Export to xlsx files (Excel Spreadsheet).
  • Python API.

Usage example

GUI

alt tag alt tag

Python interpreter

alt tag python from xpecgen import xpecgen as xg s=xg.calculate_spectrum(100, 12, 3, 150) s.attenuate(0.12, xg.get_mu(13)) s.attenuate(100, xg.get_mu("air")) s.export_xlsx("spectrum.xlsx") s.show_plot()

Installation

If you have pip you can install xpecgen as a package by running pip install xpecgen and then you can launch the GUI by just executing xpecgen, see the command line interface by executing xpecgencli -h, or check the demo.py explaining its use as a library,

You will need tk to make use of the GUI. You can check the advanced guide if you need help for this.

If you do not have python installed yet, check the advanced guide.

Documentation

The updated API documentation is available here.

You can also use the python help system to check it: python3 from xpecgen import xpecgen as xg help(xg)

Contributing

See CONTRIBUTING.md.

Model details

To have a general overview of the model see [1]. The bremsstrahlung calculation is done using full interpolations for the electron fluence, so none of the simplifications in section IV.C were used in this implementation. This description of the fluence can be used with others materials, always via the CSDA scaling, if requested. However, note that its accuracy has not been tested. Both characteristic peaks models in section II.D were implemented. The polynomial one is used by default. Half-value layers are calculated using the exponential model of attenuation (aka narrow beam geometry). In the GUI they are calculated in the sense of dose, but the library allows for generalizing this to any desired reponse function.

Despite the GUI and the API allow selecting different target materials, note the model only considered tungsten in detail. When a different material is selected, its bremsstrahlung cross-section and range scaling are used instead. However, differences in the electron fluence in the target might affect the results. In particular, the penetration depth is increased in low Z materials in units of the CSDA range, so the results should be used with caution, specially in that case.

Citation

If you use this application to make use of the models in [1], you should cite it. If you also want to acknowledge the implementation itself you can also cite [2].

References

[1] Hernández, G., Fernández F. 2016. "A model of tungsten x-ray anode spectra." Medical Physics, 43 4655. doi:10.1118/1.4955120.

[2] Hernández, G., Fernández F. 2016. "xpecgen: A program to calculate x-ray spectra generated in tungsten anodes." The Journal of Open Source Software, 00062. doi:10.21105/joss.00062.

Owner

  • Name: Guillermo Hernández
  • Login: Dih5
  • Kind: user
  • Location: Salamanca, Spain
  • Company: Universidad de Salamanca

A fan of the dihedral group of order 10.

JOSS Publication

xpecgen: A program to calculate x-ray spectra generated in tungsten anodes
Published
November 09, 2016
Volume 1, Issue 7, Page 62
Authors
Guillermo Hernández ORCID
Universidad de Salamanca
Francisco Fernández ORCID
Universidad de Salamanca
Editor
Arfon Smith ORCID
Tags
X-ray spectra Tungsten anode Computer modeling

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 122
  • Total Committers: 2
  • Avg Commits per committer: 61.0
  • Development Distribution Score (DDS): 0.008
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Guillermo Hernández g****g@g****m 121
Arfon Smith a****n 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 11
  • Total pull requests: 8
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 17 minutes
  • Total issue authors: 5
  • Total pull request authors: 2
  • Average comments per issue: 1.18
  • Average comments per pull request: 0.13
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Dih5 (7)
  • tacaswell (1)
  • jkahn (1)
  • bpops (1)
  • easyXAFS (1)
Pull Request Authors
  • Dih5 (7)
  • arfon (1)
Top Labels
Issue Labels
bug (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 108 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
  • Total maintainers: 1
pypi.org: xpecgen

A package with a GUI to calculate X-ray sPECtra GENerated in tungsten anodes

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 108 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 14.0%
Forks count: 15.4%
Average: 27.2%
Downloads: 29.4%
Dependent repos count: 67.2%
Maintainers (1)
Last synced: 6 months ago