Dear all,
Hello, I am currently studying the csr effects, and using the very simple case, I am trying to understand how transverse coordinates x and x' are changed with the csr effects.
In this case, I set CSRCSBEND with 'LINEARIZE = 1' to force the matrix calculation and 'STEADY_STATE = 1' for the simple calculation.
In addition, in order to reduce some noises from the bin setting, I used number of bins of 200 instead of 600 with the number of particles of 400k.
And then, using particle_output_file, I checked the output of each step.
I think the main reason of the shift of the centroid is due to the R16 * delta where delta is updated fractional energy spread by CSR.
Therefore, I made matlab script to recalculate this, but I could not get any shift of the centroid of x and x'.
I suspect I put something wrong in my calculations.
In the script, 6D phase space (x, x', y, y', p, t) was re-arranged by the order of time 't', and with respect to time (other information x, x', y, y', delta are following each particle's time) and then CSR energy change was calculated using Saldin's equation.
Then, I calculated updated fractional energy spread 'delta_updated' and then finally put this term to the transfer matrix calculation with arranged 6D phase space data with respect to the time. For instance, x_f = R16 * x_i + R26 * x'_i + R16 * delta_updated; sector bending magnet, where x_i and x'_i are the previous phase space components (before entering next step).
Could you please let me know how the transverse components x and x' (or px, canonical momentum) are updated during the energy change due to CSR in ELEGANT?
It would be very useful if I understand the process of the update of the transverse component due to the csr for the future study...
Thank you very much.
Best,
Seongyeol
transverse x x' update with csr
Moderators: cyao, michael_borland
-
- Posts: 16
- Joined: 30 Oct 2017, 09:48
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: transverse x x' update with csr
Seongyeol,
elegant uses momentum variables for CSRCSBEND, so there is no updating of px when applying CSR kicks. Instead, the effect is entirely in the delta coordinate (delta=(p-pCentral)/pCentral). The effect on x' and x comes about because of dispersion, but it is not the R16 and R26 from the start of the magnet. Rather, we need to use the dispersion computed from the point of the energy kick. This is done automatically by integration through the dipole.
--Michael
elegant uses momentum variables for CSRCSBEND, so there is no updating of px when applying CSR kicks. Instead, the effect is entirely in the delta coordinate (delta=(p-pCentral)/pCentral). The effect on x' and x comes about because of dispersion, but it is not the R16 and R26 from the start of the magnet. Rather, we need to use the dispersion computed from the point of the energy kick. This is done automatically by integration through the dipole.
--Michael
-
- Posts: 16
- Joined: 30 Oct 2017, 09:48
Re: transverse x x' update with csr
Dear Michael,
Thank you for your explanation.
However, I do not understand well about how to calculate the dispersion by integration through the dipole.
Could you please let me know more in detail about this dispersion computation?
-------------------------------------------------------------------------
According to what I understand, then since the energy is changed due to the csr kick, pCentral after kick is also changed
and that value should be considered for the next kick. I was wondering if that is correct..
Also, what I understand is that the csr kick is applied at the end of each slice of the dipole magnet.
After that, I think the dispersive contribution on x and x' is calculated by integration from the seond slice to third, and so on...
Best regards,
Seongyeol
Thank you for your explanation.
However, I do not understand well about how to calculate the dispersion by integration through the dipole.
Could you please let me know more in detail about this dispersion computation?
-------------------------------------------------------------------------
According to what I understand, then since the energy is changed due to the csr kick, pCentral after kick is also changed
and that value should be considered for the next kick. I was wondering if that is correct..
Also, what I understand is that the csr kick is applied at the end of each slice of the dipole magnet.
After that, I think the dispersive contribution on x and x' is calculated by integration from the seond slice to third, and so on...
Best regards,
Seongyeol
-
- Posts: 16
- Joined: 30 Oct 2017, 09:48
Re: transverse x x' update with csr
Dear Michael,
I think I solved the problem! Thing was because of the calculation of delta (fractional energy spread in 6D phase space).
I always set delta to be (p - <p>) / <p> instead of (p - pCentral) / pCentral. I thought since the momentum is slightly changed due to the CSR, so that I thought I should put mean value of updated momentum to the delta calculation. But it turned out that setting of pCentral gives me almost same results as obtained using ELEGANT, for the transverse phase space offset with csr!
Thank you for your help, and thank you for pointing out the pCentral. It is also good for me not to be confused for the calculation of fractional energy spread and therefore the rms energy spread...
Best regards,
Seongyeol
I think I solved the problem! Thing was because of the calculation of delta (fractional energy spread in 6D phase space).
I always set delta to be (p - <p>) / <p> instead of (p - pCentral) / pCentral. I thought since the momentum is slightly changed due to the CSR, so that I thought I should put mean value of updated momentum to the delta calculation. But it turned out that setting of pCentral gives me almost same results as obtained using ELEGANT, for the transverse phase space offset with csr!
Thank you for your help, and thank you for pointing out the pCentral. It is also good for me not to be confused for the calculation of fractional energy spread and therefore the rms energy spread...
Best regards,
Seongyeol
-
- Posts: 16
- Joined: 30 Oct 2017, 09:48
Re: transverse x x' update with csr
Dear Michael,
I have another question: I am doing the calculation using extracted data from ~.out, which is (x, x', y, y', pz, t).
After some modifications of the data, I would like to use this data for the ELEGANT tracking.
I was wondering if there is way to convert the data to the sdds format directly.
Currently I am using astra2elegant after I convert the convention of head // tail, but for me it is a bit inconvenient...
Thank you!
Best regards,
Seongyeol
I have another question: I am doing the calculation using extracted data from ~.out, which is (x, x', y, y', pz, t).
After some modifications of the data, I would like to use this data for the ELEGANT tracking.
I was wondering if there is way to convert the data to the sdds format directly.
Currently I am using astra2elegant after I convert the convention of head // tail, but for me it is a bit inconvenient...
Thank you!
Best regards,
Seongyeol
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: transverse x x' update with csr
Seongyeol,
I think you are referring to the &run_setup file named with the output parameter; if so, to be clear, the variables are (x, x', y, y', t, p), not pz.
Since this is an SDDS file, if you want to modify the data, you can use SDDS tools and maintain the data in SDDS form. If you need to process using other tools, an easy way to get the data back into SDDS is using plaindata2sdds. Another option is csv2sdds.
--Michael
I think you are referring to the &run_setup file named with the output parameter; if so, to be clear, the variables are (x, x', y, y', t, p), not pz.
Since this is an SDDS file, if you want to modify the data, you can use SDDS tools and maintain the data in SDDS form. If you need to process using other tools, an easy way to get the data back into SDDS is using plaindata2sdds. Another option is csv2sdds.
--Michael
-
- Posts: 16
- Joined: 30 Oct 2017, 09:48
Re: transverse x x' update with csr
Dear Michael,
Thank you again for pointing out the momentum convention...!
it works perfectly using the plaindata2sdds, and I can go to the next step very easily
Best regards,
Seongyeol
Thank you again for pointing out the momentum convention...!
it works perfectly using the plaindata2sdds, and I can go to the next step very easily
Best regards,
Seongyeol