Open scpalbright opened 4 years ago
For me this would be fine.
In BLonD the default behavior for single valued momentum
would be:
n_turns=1
and len(momentum)==n_turns+1
)delta_E
would be single valued.I would maybe ask what should be the general rule for len(delta_E)
when a 'single valued vs. turn based vs. time based' momentum program is passed ? And how do we expect it to be calculated when the program is time based ?
As in momentum = [[0], [2E9]]
, so time based but single valued?
If the ring is created with a single value for momentum the
ring.delta_E
array is empty. This causes problems anywhere thatdelta_E
is used. I would propose that in this case it should also be single valued and 0.It's caused by the calculating of
delta_E
, which for 0 turns enters the else statement in this block (lines 369-373):I would propose the changing this block to: