-
Notifications
You must be signed in to change notification settings - Fork 33
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
Bug: atwiggler #749
Comments
Hi @swhite2401, As I mentioned earlier we are working on this point for our implementation at ALBA. We are basically adapting @mashl version which for him is working. As I said before, my understanding is that the current GWigSymplecticRadPass is not accompanied with the corresponding additional files and modifications in the ohmienvelop.m function. I guess @ahmad should update his pull requests but he seems quite busy and actually I'm not sure his is reading this (despite my efforts). In summary, in case it helps we will let you know if it finally also works for us. Best, Zeus |
Thanks @ZeusMarti it is in fact excellent news that you are tackling this issue. The question is now whether we should disable this feature until a working solution is found or at least issue a clear warning message to prevent any confusion on the users side. |
Hi @swhite2401, As I mentioned earlier we are working on this point for our implementation at ALBA. We are basically adapting @mashl version which for him is working. As I said before, My understanding is that the current |
I believe a warning should suffice, just in case my opinion counts. |
Hello @swhite2401 and @ZeusMarti, There are 2 problems with
For the demonstration, up to now only After working a bit on this branch, I intend to post in a few days a summary of the remaining difficulties (mainly the "exact" passmethods), and of some choices to be made. In the mean time, I can remove |
Hello @lfarv, I agree that there is no need to put to much effort on something that will be replaced. For me adding a warning message is fine as well. Just for my understanding, from previous discussion I thought that this element was also modifying dispersion which in principle is not supposed to happen in a wiggler, could you confirm this? |
Sorry, but I can't remember that… Does this mean that
to @oscarxblanco and @swhite2401 : ok, but when should this message appear ? In |
I was thinking more in the C when the element is loaded in atpass but this is not necessarily the best option |
Hello @swhite2401 and @lfarv, As @swhite2401 said in the first comment in this issue, there is a bug with Could you please advise on how to tackle this issue? Thanks! |
Hello @joanarenillas and welcome! I think there are several ways to go around this:
Not sure if that makes sense... please let me know if you need more details or help. I can also look at your branch an comment directly in the code if this makes it simpler for you. There might be other option I did not think of, @lfarv any ideas? |
Hi all,Just a quick answer to let you know that the ring energy is already available in C in the “param struct”. It’s where you have to take it. LaurentLe 17 avr. 2024 à 12:15, Simon White ***@***.***> a écrit :
Hello @joanarenillas and welcome!
I think there are several ways to go around this:
You may get the ring energy accessible in the C through the param struct in the input arguments of the trackFunction. For information, the parameters available in this structure are in atintegrators/attypes.h
In case you really want the energy to be a users input, i.e. an attribute of the element, it is a bit more complex. The wiggler element inherits from the _Radiative class (in elements.py). You can see there that set_long_motion will delete the Energy attribute when disabling the 6D motion. You may override this function in the Wiggler class with the proper behavior to keep the attribute Energy even with 6D disabled
Not sure if that makes sense... please let me know if you need more details or help. I can also look at your branch an comment directly in the code if this makes it simpler for you.
There might be other option I did not think of, @lfarv any ideas?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Dear @swhite2401 and @lfarv, I have noticed that all pass methods with radiation set the energy from the "param struct" in their Track Function (Matlab and Python) but instead take the energy from "ElemData" in their Matlab Mex Function. Is this difference some compiler requirement or should we maybe change this so both the Track and Mex Functions take the energy from the "param struct"? Regards |
Dear @joanarenillas , this is a good point. I think there is a historical reason to this: pass methods were implemented before the param struct was introduced. |
We are still suffering from the bug reported in #190.
atwiggler
usesGWigSymplecticPass
as default, which will then point to GWigSymplecticRadPass when 6d is enabled. The latter has a bug and shall not be used. Not only does it have a bug but now fails to run withatpass
complaining about a missing field energy even though it is defined.We have 2 severe issues here:
This situation is really not appropriate has to be solved rapidly by either removing the function with bugs (or at least make the necessary changes to not have it as default wiggler function) or by fixing it which obviously take much more efforts.
I have no problem removing it, as far as I am concerned we should not distribute function giving the wrong results.
Could you please advise?
Thanks!
The text was updated successfully, but these errors were encountered: