Replies: 2 comments
-
|
@elafmusa : To tilt an element, you have to use the the functions Alternatively, rather than tilting the element, you could recompute |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I want to apply this relation to compute the skew component of the quadepoles in a lattices:
skew component = -K1 sin (2.(theta))
Where theta is the tilt angle.
My quistions:
Is there a bult in function in PyAT the returns this value directly?
I tried to implement it as following (looping through all the lattice elements):
while (i < len(elements_indexes)):
if (ring[i].FamName).startswith('q'):
skew_quad_coof = - ring[i].K * sin (2*math.acos(ring[i].R1[0,0]))
else:
skew_quad_coof = 0
k_qs.append(skew_quad_coof)
i += 1
This raised an error: 'Quadrupole' object has no attribute 'R1' For the quadrpoles that was not tilted
My second quistions:
-Is there a better way to calculate the theta angle better than using the R1 matrix: math.acos(ring[i].R1[0,0])
-How can i access the theta angle of value zero for the non-tilted elements in my loop?
@lfarv @simoneliuzzo
Beta Was this translation helpful? Give feedback.
All reactions