Beam distribution
Georges-core provides methods to load and analyze beam distributions. These methods return a distribution object that can be used or analyzed.
import georges_core
from georges_core.distribution import Distribution
from georges_core.units import ureg as _ureg
Supported format for external files are csv and parquet:
beam_distribution = Distribution.from_csv('beam.csv')
beam_distribution = Distribution.from_parquet('beam.tar.gz')
A beam distribution can be defined from his parameters. Different methods are implemented, such as:
from_5d_sigma_matrix
from_5d_multigaussian_distribution
beam_distribution = Distribution.from_5d_multigaussian_distribution(n=int(1e3),
x=x,
px=px,
y=y,
py=py,
dpp=dpp,
xrms=xrms,
pxrms=pxrms,
yrms=yrms,
pyrms=pyrms,
dpprms=dpprms)
from_twiss_parameters
beam_distribution = Distribution.from_twiss_parameters(n=int(1e3),
x=x,
px=px,
y=y,
py=py,
dpp=dpp,
betax=betax,
alphax=alphax,
betay=betay,
alphay=alphay,
emitx=emitx,
emity=emity,
dispx=dispx,
dispy=dispy,
dispxp=dispxp,
dispyp=dispyp,
dpprms=dpprms)
All these methods give a instance of a Class distribution. This class has many properties to analyse the beam’s distribution.
beam_distribution.mean
X 0.000210
PX -0.016867
Y -0.000019
PY -0.003220
DPP 0.000000
dtype: float64
beam_distribution.std
X 0.004936
PX 0.487051
Y 0.004741
PY 0.477835
DPP 0.000000
dtype: float64
beam_distribution.emit
{'X': 0.0023997511988719604, 'Y': 0.00225862054966685}
beam_distribution.twiss
{'emit_x': 0.0023997511988719604,
'beta_x': 0.010143403542136198,
'alpha_x': -0.060765232693378975,
'disp_x': 0.0,
'disp_xp': 0.0,
'emit_y': 0.00225862054966685,
'beta_y': 0.009939741761785994,
'alpha_y': 0.07631715315956382,
'disp_y': 0.0,
'disp_yp': 0.0}