You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Line contains several elements with the same name, apply_madx_errors will overwrite only the first occurrence (repeatedly) with the present implementation (after merging PR #37 ).
It would be good to increment a counter for each name occurrence to automatically assign the error to the next element in line with the same name.
E.g. for Line.element_names = ["MB", "M", "MB"] and an error table with two different error vectors for "MB", the algorithm would apply the first error to the first "MB" occurrence (i.e. Line.elements[0]) and then the second one to the second occurrence, accordingly, (i.e. Line.elements[2]).
One way to implement this could be by using a list of indices of the occurrences for each name and then List.poping indices that have been assigned already..
The text was updated successfully, but these errors were encountered:
When a
Line
contains several elements with the same name,apply_madx_errors
will overwrite only the first occurrence (repeatedly) with the present implementation (after merging PR #37 ).It would be good to increment a counter for each name occurrence to automatically assign the error to the next element in line with the same name.
E.g. for
Line.element_names = ["MB", "M", "MB"]
and an error table with two different error vectors for "MB", the algorithm would apply the first error to the first "MB" occurrence (i.e.Line.elements[0]
) and then the second one to the second occurrence, accordingly, (i.e.Line.elements[2]
).One way to implement this could be by using a list of indices of the occurrences for each name and then
List.pop
ing indices that have been assigned already..The text was updated successfully, but these errors were encountered: