Metadata-Version: 2.1
Name: barc4sr
Version: 2024.12.4
Summary: A Python package for Synchrotron Radiation calculations
Home-page: https://github.com/barc4/barc4sr
Author: Rafael Celestre
Author-email: rafael.celestre@synchrotron-soleil.fr
License: GPL-3.0
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy >=1.20
Requires-Dist: numba >=0.53.1
Requires-Dist: scipy >=1.5.0
Requires-Dist: joblib >=0.14.0
Requires-Dist: h5py >=3.0.0
Requires-Dist: matplotlib >=3.3.0
Requires-Dist: Pillow >=7.0.0
Requires-Dist: imageio >=2.9.0
Requires-Dist: scikit-image >=0.17.2

# barc4sr
**BARC** library for **S**ynchrotron **R**adiation

This library was created for facilitating the use of [SRW](https://github.com/ochubar/SRW) for a few routine calculations 
such as:

- undulator emission spectra - on axis or through a slit;
- power (density) through a slit;
- undulator radiation spectral and spatial distribution;

All calculations take either an ideal magnetic field or a tabulated measurement. In the 
case of a tabulated measurement, a Monte-Carlo sampling of the electron-beam phase space 
is necessary for a few calculations and recommended for others. 

This module is inspired by [xoppy](https://github.com/oasys-kit/xoppylib), but but with 
the "multi-electron" calculations and parallelisation of a few routines. 

## installation

bar4sr is on PyPi! So it can be installed as ```pip install barc4sr``` _hooray_!!! Otherwise,
clone the project, fix the (many bugs) and help improve it...

## TODO:

Ideally, I want to add the same functionalities to bending-magnets and wigglers through SRW.
I am also considering interfacing [SPECTRA](https://spectrax.org/spectra/index.html), but only if there is the need for that.

## Examples:
Check the examples! You can learn a lot from them.
