Skip to content

Touschek lifetime update - #1122

Open
AmarildoTopalli wants to merge 3 commits into
atcollab:masterfrom
AmarildoTopalli:Touschek_lifetime_update
Open

Touschek lifetime update#1122
AmarildoTopalli wants to merge 3 commits into
atcollab:masterfrom
AmarildoTopalli:Touschek_lifetime_update

Conversation

@AmarildoTopalli

Copy link
Copy Markdown

The calculation of Touschek lifetime has been updated following the work of Fu et al doi/10.1103/PhysRevAccelBeams.27.124401 (2024). In addition, the polarization dependency of Touschek lifetime has been added. The function can calculate the scattering C(s) and F(s) functions, as well as the average analyzing power, which is an important parameter used to fit the polarization of the beam.

The formula was tested agains the existing Piwinski formula and gives similar results for the tested lattices.

The calculation of Touschek lifetime has been updated following the work of Fu et al doi/10.1103/PhysRevAccelBeams.27.124401 (2024). In addition, the polarization dependency of Touschek lifetime has been added.
The function can calculate the scattering C(s) and F(s) functions, as well as the average analyzing power, which is an important parameter used to fit the polarization of the beam.
@gubaidulinvadim

Copy link
Copy Markdown
Collaborator

The formula was tested agains the existing Piwinski formula and gives similar results for the tested lattices.

You should maybe show your tests :)

@oscarxblanco

Copy link
Copy Markdown
Contributor

Dear @AmarildoTopalli ,
I did a test of your function and I notice this implementation is much slower than the current one. Is there any way you could increase the speed ?
The result of the Touschek lifetime for this test seems to change very little:

current implementation: Touschek lifetime w/o harmon = 9.34 h
Amarildo implementation: Touschek lifetime w/o harmon = 9.39 h

Added "polarization" parameter. By default polarization = False. In this case the function returns tl, ma, rp just like the original get_lifetime function. If polarization = True, the function returns tl, ma, rp, C(s), F(s), A_avg.
The compilation time when polarization = False is the same as the original get_lifetime function. When polarization = True, it takes twice as long to run, because of the additional integrals for the calculation of F(s).
@AmarildoTopalli

Copy link
Copy Markdown
Author

Dear @oscarxblanco ,
I added a polarization parameter that will calculate the polarization-dependent terms only when polarization = True. By default I set polarization = False, and in this case it takes the same amout of time to run the code as the original get_lifetime function.
If the polarization-depent term is calculated, it takes twice as long to run the code, because of the additional F(s) integral.

@gubaidulinvadim

Copy link
Copy Markdown
Collaborator

@AmarildoTopalli Shouldn't polarisation parameter be a float? To allow calculating lifetime at a different polarisation degree?

@AmarildoTopalli

Copy link
Copy Markdown
Author

@gubaidulinvadim What is useful for the experimentalists is the average analysing power A_avg used to fit the polarization time and equilibrium beam polarization. With that value they can calculate the lifetime of the beam with X polarization degree, without needing to run a heavy script.

@oscarxblanco

Copy link
Copy Markdown
Contributor

Dear @oscarxblanco , I added a polarization parameter that will calculate the polarization-dependent terms only when polarization = True. By default I set polarization = False, and in this case it takes the same amout of time to run the code as the original get_lifetime function. If the polarization-depent term is calculated, it takes twice as long to run the code, because of the additional F(s) integral.

@AmarildoTopalli , I confirm the calculation time is now very similar.

@gubaidulinvadim

Copy link
Copy Markdown
Collaborator

@gubaidulinvadim What is useful for the experimentalists is the average analysing power A_avg used to fit the polarization time and equilibrium beam polarization. With that value they can calculate the lifetime of the beam with X polarization degree, without needing to run a heavy script.

I don't think it's correct to assume that the user knows how to calculate the lifetime of a polarised beam and doesn't want to just do `get_lifetime(a, b, c, polarisation=0.72)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants