Skip to content

barc4/barc4sr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

barc4sr

BARC library for Synchrotron Radiation

This library was created for facilitating the use of 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, 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, but only if there is the need for that.

Examples:

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