Skip to content
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

twiss broken #11

Closed
iagapov opened this issue Oct 29, 2014 · 1 comment
Closed

twiss broken #11

iagapov opened this issue Oct 29, 2014 · 1 comment
Assignees
Labels

Comments

@iagapov
Copy link
Owner

iagapov commented Oct 29, 2014

undulator transfer map order 2 by default. Twiss does not work (standard sase_tdp.py script)

@sergey-tomin
Copy link
Collaborator

fixed. There was no check on the condition - energy == 0, in that case there was division by zero in weave module, that is why it returned NaN.

Also added the check on the condition - lperiod == 0,
fixed like this:
if energy == 0 or element.lperiod == 0:
transfer_map.order = 1
....
else:
transfer_map.order = 2
....

iagapov pushed a commit that referenced this issue Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants