-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduction of an "energy loss" element #632
Conversation
Hello @lnadolski, eloss = at.Marker('name', PassMethod='EnergyLossRadPass', EnergyLoss=40000.0, Energy=6.0e9) Or, in Matlab: eloss=atmarker('name','PassMethod','EnergyLossRadPass','EnergyLoss',40000.0,'Energy',6e9); It is not yet handled by |
atintegrators/EnergyLossRadPass.c
Outdated
/* list of required fields */ | ||
plhs[0] = mxCreateCellMatrix(2,1); | ||
mxSetCell(plhs[0],0,mxCreateString("EnergyLoss")); | ||
mxSetCell(plhs[0],1,mxCreateString("EnergyLoss")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mxSetCell(plhs[0],1,mxCreateString("Energy"));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected!
I did some tests in python, not yet in Matlab |
Dear @lfarv I will come back to you tomorrow to review the code. The new damping times seem fine. atx does not fully work, waiting to get atdisable6d fixed ;-) U0 = atgetU0(myringRadOn, 'method', 'tracking'); Regarding the 6D closed orbit, the fixed point for the energy is -201 keV for the nominal lattice and -657 keV as expected 👍 Regards, Laurent. |
@lnadolski : all this looks nice! I'm going on with the dedicated element class. |
add comments
Dear @lfarv For me, the Matlab version is fine and fulfills the goal. |
load and save .m and .mat files
@lnadolski : the Energy field is now handled by the enable/disable_6d method, as it is for magnetic elements (dipoles)
Saving/loading works, For me, it's ready. |
typo corrections
I have tested the code using the new constructor The only function not yet updated is ringpara.
Having 3 functions ringpara, atsummary and atx makes sometimes a bit of confusion. |
add comments
update documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ringpara need some update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well for me!
@lnadolski: a new approval is needed after solving conflicts with the master branch… |
This is a tentative answer to #629. A new 'EnergyLoss' element is added, together with its 'EnergyLossRadPass' passmethod.
This element simulates an abrupt energy loss. The longitudinal motion and damping times are affected accordingly. Equilibrium emittances also, but since there is no diffusion term associated, the computed emittances assume that the losses occur in a non-dispersive location.
The "energy loss" element is defined by its energy loss in eV.