2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
Main development website: https://github.com/vasole/fisx
This software library implements formulas to calculate, given an experimental setup, the expected x-ray fluorescence intensities. The library accounts for secondary and tertiary excitation, K, L and M shell emission lines and de-excitation cascade effects. The basic implementation is written in C++ and a Python binding is provided.
Account for secondary excitation is made via the reference:
D.K.G. de Boer, X-Ray Spectrometry 19 (1990) 145-154
with the correction mentioned in:
D.K.G. de Boer et al, X-Ray Spectrometry 22 (1993) 33-28
Tertiary excitation is accounted for via an appproximation.
The accuracy of the corrections has been tested against experimental data and Monte Carlo simulations.
License
This code is relased under the MIT license as detailed in the LICENSE file.
Installation
To install the library for Python just use pip install fisx. If you want build the library for python use from the code source repository, just use the pip install . approach.
Testing
To run the tests after installation run:
python -m fisx.tests.testAll
Example
There is a web application using this library for calculating expected x-ray count rates.
This piece of Python code shows how the library can be used via its python binding.
from fisx import Elements
from fisx import Material
from fisx import Detector
from fisx import XRF
elementsInstance = Elements()
elementsInstance.initializeAsPyMca()
# After the slow initialization (to be made once), the rest is fairly fast.
xrf = XRF()
xrf.setBeam(16.0) # set incident beam as a single photon energy of 16 keV
xrf.setBeamFilters([["Al1", 2.72, 0.11, 1.0]]) # Incident beam filters
# Steel composition of Schoonjans et al, 2012 used to generate table I
steel = {"C": 0.0445,
"N": 0.04,
"Si": 0.5093,
"P": 0.02,
"S": 0.0175,
"V": 0.05,
"Cr":18.37,
"Mn": 1.619,
"Fe":64.314, # calculated by subtracting the sum of all other elements
"Co": 0.109,
"Ni":12.35,
"Cu": 0.175,
"As": 0.010670,
"Mo": 2.26,
"W": 0.11,
"Pb": 0.001}
SRM_1155 = Material("SRM_1155", 1.0, 1.0)
SRM_1155.setComposition(steel)
elementsInstance.addMaterial(SRM_1155)
xrf.setSample([["SRM_1155", 1.0, 1.0]]) # Sample, density and thickness
xrf.setGeometry(45., 45.) # Incident and fluorescent beam angles
detector = Detector("Si1", 2.33, 0.035) # Detector Material, density, thickness
detector.setActiveArea(0.50) # Area and distance in consistent units
detector.setDistance(2.1) # expected cm2 and cm.
xrf.setDetector(detector)
Air = Material("Air", 0.0012048, 1.0)
Air.setCompositionFromLists(["C1", "N1", "O1", "Ar1", "Kr1"],
[0.0012048, 0.75527, 0.23178, 0.012827, 3.2e-06])
elementsInstance.addMaterial(Air)
xrf.setAttenuators([["Air", 0.0012048, 5.0, 1.0],
["Be1", 1.848, 0.002, 1.0]]) # Attenuators
fluo = xrf.getMultilayerFluorescence(["Cr K", "Fe K", "Ni K"],
elementsInstance,
secondary=2,
useMassFractions=1)
print("Element Peak Energy Rate Secondary Tertiary")
for key in fluo:
for layer in fluo[key]:
peakList = list(fluo[key][layer].keys())
peakList.sort()
for peak in peakList:
# energy of the peak
energy = fluo[key][layer][peak]["energy"]
# expected measured rate
rate = fluo[key][layer][peak]["rate"]
# primary photons (no attenuation and no detector considered)
primary = fluo[key][layer][peak]["primary"]
# secondary photons (no attenuation and no detector considered)
secondary = fluo[key][layer][peak]["secondary"]
# tertiary photons (no attenuation and no detector considered)
tertiary = fluo[key][layer][peak].get("tertiary", 0.0)
# correction due to secondary excitation
enhancement2 = (primary + secondary) / primary
enhancement3 = (primary + secondary + tertiary) / primary
print("%s %s %.4f %.3g %.5g %.5g" % \
(key, peak + (13 - len(peak)) * " ", energy,
rate, enhancement2, enhancement3))
Release files for fisx 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fisx-1.3.2.tar.gz | 5.7 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fisx-1.3.2-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details |
| fisx-1.3.2-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| fisx-1.3.2-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| fisx-1.3.2-cp312-cp312-macosx_10_9_universal2.whl | CPython 3.12 | CPython 3.12 | macOS 10.9+ universal2 (ARM64, x86-64) | Details |
| fisx-1.3.2-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| fisx-1.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.17+ PowerPC 64-le | Details |
| fisx-1.3.2-cp311-cp311-macosx_10_9_universal2.whl | CPython 3.11 | CPython 3.11 | macOS 10.9+ universal2 (ARM64, x86-64) | Details |
| fisx-1.3.2-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
| fisx-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ PowerPC 64-le | Details |
| fisx-1.3.2-cp310-cp310-macosx_10_9_universal2.whl | CPython 3.10 | CPython 3.10 | macOS 10.9+ universal2 (ARM64, x86-64) | Details |
| fisx-1.3.2-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details |
| fisx-1.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.17+ PowerPC 64-le | Details |
| fisx-1.3.2-cp39-cp39-macosx_10_9_x86_64.whl | CPython 3.9 | CPython 3.9 | macOS 10.9+ x86-64 | Details |
| fisx-1.3.2-cp39-cp39-macosx_10_9_universal2.whl | CPython 3.9 | CPython 3.9 | macOS 10.9+ universal2 (ARM64, x86-64) | Details |
| fisx-1.3.2-cp38-cp38-win_amd64.whl | CPython 3.8 | CPython 3.8 | Windows x86-64 | Details |
| fisx-1.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ PowerPC 64-le | Details |
| fisx-1.3.2-cp38-cp38-macosx_11_0_universal2.whl | CPython 3.8 | CPython 3.8 | macOS 11.0+ universal2 (ARM64, x86-64) | Details |
| fisx-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl | CPython 3.8 | CPython 3.8 | macOS 10.9+ x86-64 | Details |
| fisx-1.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.17+ PowerPC 64-le | Details |
Total release size: 159.4 MB
Release files / fisx-1.3.2.tar.gz
| Download URL | fisx-1.3.2.tar.gz |
|---|---|
| Size | 5.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c818b016b69bb50476bd246ab14cf06e8e3653114c2f2524dce11d6bc070e9a
|
|
BLAKE2b-256 checksum How to use checksums |
d09769d465bc0095876d4c43ba63e0b208ced8f5b9471d3df4e857e010f5336c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp314-cp314-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | fisx-1.3.2-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2c73526c4c5ff2dac3a85901f2b962b18a37e78a8e81e51d73532e882d8a22fc
|
|
BLAKE2b-256 checksum How to use checksums |
a20da39451c519547aac5e1df331618c437cf49df5122bc04d4046b04c39251b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / fisx-1.3.2-cp313-cp313-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | fisx-1.3.2-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1e9d8ab4498c160cab18a39f97b5759c6a18b509deea9bb3872c19d64717da91
|
|
BLAKE2b-256 checksum How to use checksums |
52c41fd3def6667af52e846f1114298f5e4bb3fe095f48a8ec68c025b067cc82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Release files / fisx-1.3.2-cp312-cp312-win_amd64.whl
| Download URL | fisx-1.3.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
51d46390627a13005860e3df85d35cb74bf9506e8d376492de4d2a87fa5b9b42
|
|
BLAKE2b-256 checksum How to use checksums |
b078f3027f37df4995457654ad1b861a348d7037a9bd86fa8d7fe0408a256762
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp312-cp312-macosx_10_9_universal2.whl
| Download URL | fisx-1.3.2-cp312-cp312-macosx_10_9_universal2.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
78e0243e3bfd7fbcf8de21facfab09dde68e0050bd1890672af79de5b0cfdd0a
|
|
BLAKE2b-256 checksum How to use checksums |
fad59b35feb0eb211949d5dc565b7cf46502de35458ad9908271c7202779fef7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp311-cp311-win_amd64.whl
| Download URL | fisx-1.3.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
423b879e265ef98cd3fd229d42d964353ef8eadff0a0b29c9e1fda404cbfc606
|
|
BLAKE2b-256 checksum How to use checksums |
0953ba252aae812c9b3e0aa0a308a8cc2d9926c4208485f8a9008349367c309d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | fisx-1.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ PowerPC 64-le |
|
SHA-256 checksum How to use checksums |
d3a702d28da7737a8dd337ab3c467f95fdd4aef394af629bc72cd381a71ee995
|
|
BLAKE2b-256 checksum How to use checksums |
3dcbd8f176a5871e6db074d3777e2250a9cb32065ad6088375d4442327275003
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp311-cp311-macosx_10_9_universal2.whl
| Download URL | fisx-1.3.2-cp311-cp311-macosx_10_9_universal2.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
87264dbe86a0343f123df0b44e15190ff301b9003b4374bb1fd35429850dd214
|
|
BLAKE2b-256 checksum How to use checksums |
613e5a60313b41d88313705ce584e90498837a405fd3288dd7f4f255e5ee5646
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp310-cp310-win_amd64.whl
| Download URL | fisx-1.3.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2e671a8b6e0463cf6de63679b86cb54fb23126d92e618b88d4ac6026fb3cdd15
|
|
BLAKE2b-256 checksum How to use checksums |
2bf08779e9d7ee1cc1418efa1039c4e19e19680e233b94907c26c11841e091c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | fisx-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 13.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ PowerPC 64-le |
|
SHA-256 checksum How to use checksums |
dff16c69f8c9e77809d2306f377645ad3dc96386fc762311fa39d870873217d9
|
|
BLAKE2b-256 checksum How to use checksums |
1ced2c81fba300561d9dbee9e58bfc3a9939610b0018391568d0ee72c8da851e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp310-cp310-macosx_10_9_universal2.whl
| Download URL | fisx-1.3.2-cp310-cp310-macosx_10_9_universal2.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
3d4067d335cbfd1d1e26fe74ceadad31eadb6f2303428784af20545d5cb72b33
|
|
BLAKE2b-256 checksum How to use checksums |
1ee992856a87517a5d9992b6a607677f569d179621ca45e0c7c61250694c2d8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp39-cp39-win_amd64.whl
| Download URL | fisx-1.3.2-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9be11382b9e8fd2a1ea80613c1b819af84167f48097928fe7d7e5ce889d3e720
|
|
BLAKE2b-256 checksum How to use checksums |
ae2d056052e45314eed47cf07cbc8f97be7f7cc535965ba90a52fc4b26906ebb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | fisx-1.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 13.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ PowerPC 64-le |
|
SHA-256 checksum How to use checksums |
7c8604bbac031471967c623920255279d658875d1057529072954e65109fbbe7
|
|
BLAKE2b-256 checksum How to use checksums |
dbd193e0552011574ef630a767cd0b266360fb127ef47a0a7c69032b077b4873
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | fisx-1.3.2-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
6385410e9bc21d96341308c8f168bbaa57901f026474b8af1295108ff11f5b99
|
|
BLAKE2b-256 checksum How to use checksums |
9ff19d683b14b435ab1733bbf2d01f9974cbedefaab4ac22dc95024d0f3c2826
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp39-cp39-macosx_10_9_universal2.whl
| Download URL | fisx-1.3.2-cp39-cp39-macosx_10_9_universal2.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
c03ef3cd7bf1c4a390e6294e4b9b80a0bcecdde9ec1b50a25054418caa57ba1e
|
|
BLAKE2b-256 checksum How to use checksums |
6a527c7e1d552736ef8a10871575fc2496471aae8a8354eec9a2cd4b3428e074
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp38-cp38-win_amd64.whl
| Download URL | fisx-1.3.2-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7f0b0080e52adb83c58877562c2c2438f465286d59bdf8c8cdab36b1ef1640b8
|
|
BLAKE2b-256 checksum How to use checksums |
8dec5c898ab8d3b14d4b706116fc06227efa6f6af8c7db1baaa47ab07676f958
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | fisx-1.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ PowerPC 64-le |
|
SHA-256 checksum How to use checksums |
fca7bbf6279ae58d5cd35fff2ce448781a699683b99834ed949433dab7f98084
|
|
BLAKE2b-256 checksum How to use checksums |
9ffa1afe88dd3ccf0d6660a0682b3d363f31ff4de5d16321019e32dd3afbf39d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp38-cp38-macosx_11_0_universal2.whl
| Download URL | fisx-1.3.2-cp38-cp38-macosx_11_0_universal2.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.8 macOS 11.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
9925584af88fdba5d0fd166cfb20cc0ba6c3958a16de52696e926fe066228781
|
|
BLAKE2b-256 checksum How to use checksums |
9826eac69ee1c8ea204514104987d96d79e9333fddd145f0ba7e6ca9b8bc2fc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl
| Download URL | fisx-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | CPython 3.8 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
eca1e28d792b01b010407da8a8a1d0478a6d88ab7d4d0346488b1f088549b452
|
|
BLAKE2b-256 checksum How to use checksums |
5f68d4c333ce99028afc68143faac165b0d824f8c4c316c30e1ab0ebdf593841
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / fisx-1.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | fisx-1.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 13.1 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ PowerPC 64-le |
|
SHA-256 checksum How to use checksums |
71cfeb2e2d55b1928b40deee97f77ad0163c0a19def300db30333cc4a27ed1b7
|
|
BLAKE2b-256 checksum How to use checksums |
db611e1d7b11618ea172824856c68e136d69ef47fd014e80b8e75816e2a8fbbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|