# emitt_dp_tev

status.i4.v = emitt_dp_tev(sigmas.r4a.r, step.i4.v, plane.i4.v,
emittance.r4.r, dp.r4.r)
This routine calculates the tranverse emittance and dp/p given beam
widths (wire sigmas) and the lowBeta squeeze step. You also need to
link to UL_PHYSLIB to call this routine.
sigmas sigmas of wire profiles in mm
(For a horizontal calculation, pass two sigmas in order:
E11, E17. For a vertical calculation, pass two sigmas:
VE11, 0.0 (eta = 0.0).)
step lattice design-step
plane specify which plane to calculate for:
(0 -> horizontal,
1 -> vertical)
emittance returned calculated emittance in pi-mm-mr
(A value of zero is returned if the calculation fails.)
(This is the non-normalized RMS emittance.
The 'ul_physlib:physlib' include file has
defined constants to help convert this to
normalized emittance.)
dp returned dp/p (RMS)
(A value of zero is returned if the calculation fails.)
This function returns ACNET status values as follows:
OK success
CBS_INVARG invalid plane or step passed
CBS_NOTENB routine is not enabled
CBS_RANGE calculation failed
This function requires the following include files:
ul_cbsaux_h:auxlib_misc_h, acnet_errors_h
Related functions:
None
C/C++ usage:
int status;
int step = 0;
int plane = 0;
float sigmas[2];
float emittance;
float dp;
status = emitt_dp_tev(sigmas,step,plane,&emittance,&dp);