Syris
Syris (synchrotron radiation imaging simulation) is a framework for simulations of X-ray absorption and phase contrast dynamic imaging experiments, like time-resolved radiography, tomography or laminography. It includes X-ray sources, various sample shape creation possibilities, complex refractive index lookup options, motion model and indirect detection model (scintillator combined with a conventional camera). Phase contrast is simulated by the Angular spectrum method, which enables one to include various optical elements in the simulation, e.g. gratings and X-ray lenses.
Compute-intensive algorithms like Fourier transforms, sample shape creation and free-space propagation are implemented by using OpenCL, which enables one to execute the code on graphic cards.
There are numerous examples of how to use syris described below which ship directly with the code. Enjoy!
Usage
The first thing you have to do is to initialize syris by the syris.init() function. After that you only need to do whatever is necessary for your program. A simple white beam propagation example looks like this:
import matplotlib.pyplot as plt
import numpy as np
import quantities as q
import syris
from syris.physics import propagate
from syris.bodies.simple import make_sphere
from syris.materials import make_henke
syris.init()
energies = np.arange(10, 30) * q.keV
n = 1024
pixel_size = 0.4 * q.um
distance = 2 * q.m
material = make_henke('PMMA', energies)
sample = make_sphere(n, n / 4 * pixel_size, pixel_size, material=material)
image = propagate([sample], (n, n), energies, distance, pixel_size).get()
plt.imshow(image)
plt.show()
For more detailed information please see the reference.
Examples
Are stored in the examples directory. Make sure you install their dependencies by pip install -r requirements-examples.txt and then you can run them from the top-level directory of syris repository by e.g. python -m examples.simple.
Citation
If you use this software for publishing your data, we kindly ask to cite the article below.
Faragó, T., Mikulík, P., Ershov, A., Vogelgesang, M., Hänschke, D. & Baumbach, T. (2017). J. Synchrotron Rad. 24, https://doi.org/10.1107/S1600577517012255
Metadata
Release files for syris 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| syris-0.3.tar.gz | 109.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| syris-0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 242.6 kB
Release files / syris-0.3.tar.gz
| Download URL | syris-0.3.tar.gz |
|---|---|
| Size | 109.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a72102ba6122ad1a1747eb1cdc2a0bef7dbd99fc8c27cc6ae84b7e5c76375de
|
|
BLAKE2b-256 checksum How to use checksums |
143fc41220a8c2e65b7292f1b984088c0741f9674a79aa73f874c53a2cab3f82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|
Release files / syris-0.3-py3-none-any.whl
| Download URL | syris-0.3-py3-none-any.whl |
|---|---|
| Size | 133.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c09a99cd81341526bf22a091e6966696f60c1329832bc22f96c2ad835595b620
|
|
BLAKE2b-256 checksum How to use checksums |
d8e67170643ac2f6376bb22ebbf2c7fe9a3e54449770fcae6290e12b1c0b70e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|
Security for syris 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.