End Compensation in LSRMDLTR

Moderators: cyao, michael_borland

Post Reply
foshea
Posts: 34
Joined: 23 Jun 2009, 21:00

End Compensation in LSRMDLTR

Post by foshea » 15 Nov 2018, 11:47

I am confused by the description of the end poles in LSRMDLTR. I am using version 34.4.1. The manual says the following
elegant manual wrote: The three pole factors are defined so that the trajectory is centered about x = 0 and x′ = 0 with zero dispersion. This wouldn’t be true with the standard two-pole termination, which might cause problems overlapping the laser with the electron beam.
The "three pole factors" are POLE_FACTOR1, POLE_FACTOR2, and POLE_FACTOR3. My understanding of the manual is that adjusting these parameters might lead to beam trajectories that are neither straight nor on-axis inside the undulator. However, when I run elegant, the effect of the end poles on the electron beam trajectory seems really small.

Here is the call to LSRMDLTR:

Code: Select all

UND_LH.01: LSRMDLTR,L=0.48,BU=0.225,PERIODS=12,METHOD="non-adaptive",&
 FIELD_EXPANSION="ideal",ACCURACY=0.001,N_STEPS=2000,LASER_WAVELENGTH=7.83e-07,&
 LASER_PEAK_POWER=100.0e06,LASER_W0=0.000210,&
 POLE_FACTOR1=1,POLE_FACTOR2=1,POLE_FACTOR3=1, &
TIME_PROFILE="laserMOD7.sdds=t+A"
I use a watch point right after the undulator to grab the centroid position and momentum right after the LSRMDLTR and use a couple of sdds-functions to get the beam properties, I find:

Code: Select all

default (2nd to last line commented out) -> Cx: -3.0e-8 m, Cxp: 1.2e-8 rad
1,1,1 (as shown above in the code block) -> Cx: -4.3e-11 m, Cxp: -4.5e-7 rad
1,10,1 (grossly unmatched undulator)     -> Cx: -3.9e-2 m, Cxp: -1.6e-1 rad
There isn't much difference between the default settings (compensated) and taking (1,1,1), i.e. letting the beam encounter a totally uncompensated undulator. Simulation of the undulator in Radia suggests that the offset due to the completely compensated undulator should be several millimeters, but that is clearly not the case here. The modulation strength of the electron beam appears to be no different between the first two cases as well. However, when I change the second pole to be way too strong, the beam trajectory *is* disturbed.

Am I missing something about how the end compensation works?

Edit:
I have just now tried LSRMDLTR with the following settings:

Code: Select all

0,0,0 (uncompensated?) -> Cx: -2.2 mm, Cxp: -9.0 mrad
Radia calculation      -> Cx: 3.6 mm, Cxp: 10.6 mrad
It appears that the POLE_FACTORs multiply the default values given in the table in the manual rather than replacing them. That would explain why changing them all to zero (roughly) matches the Radia result and also why changing POLE_FACTOR2=10 creates a large trajectory offset. Is that what those factors do? The manual isn't clear.

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: End Compensation in LSRMDLTR

Post by michael_borland » 21 Nov 2018, 11:45

Any POLE_FACTOR[123] values given by the user in defining LSRMDLTR replace the default values. These values then multiply the strength of the first and last three poles.

Using some debugging switches at compile time, I extracted the trajectory inside LSRMDLTR and compared it for several values of POLE_FACTOR[123]. The particle starts on axis with delta=1e-4, so we see the effect of dispersion here. Notice that for the default values, the particle is centered in the undulator, whereas for 1,1,1 it is offset to one side. This is the reason the default values are set as they are.

I'm not sure what to make of the comparison with RADII, except to say that RADII presumably gives a 3D solution that includes some model of the end effects, whereas the LSRMDLTR element uses an analytical model of the fields.

--Michael
comparison1.png
Comparison of your three cases
comparison2.png
Comparison of two cases

foshea
Posts: 34
Joined: 23 Jun 2009, 21:00

Re: End Compensation in LSRMDLTR

Post by foshea » 28 Nov 2018, 04:21

Thanks for the response. Your answer makes sense in that I read way too much in to the meaning of end compensation.

Post Reply