Replies: 6 comments 7 replies
-
Dear Elaf, I think that just:
should work. note that the pattern is matched using fnmatch (not regexp). you would have to do some
best regards |
Beta Was this translation helpful? Give feedback.
-
Hello @elafmusa and @simoneliuzzo: To complement Simone's answer, I'll add that:
|
Beta Was this translation helpful? Give feedback.
-
@simoneliuzzo @lfarv Thank you for the useful note! I am working in a code like this simple example: quads_families = [['qf4.1', 'qf4.2', ], ['qf4.3', 'qf4.4', ], ['qd4.1', 'qd4.2', ], ['qfd.3', 'qfd.4', ]] In order to measure the Indices of these elements in quads_families only, should i use a loop instead of " inds = ring.get_cells(at.checktype(at.Quadrupole) & ring.get_cells(at.checkname('*ab')" which will look at the full ring. " I am thinking about something like, if i am using both inds and full_inds: |
Beta Was this translation helpful? Give feedback.
-
In python, you have |
Beta Was this translation helpful? Give feedback.
-
how would you get for example all elements with PolynomB > 0
or better:
|
Beta Was this translation helpful? Give feedback.
-
Works for any kind of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If i have list of elements for example:
['qf4.1',
'qf4.2',
'qf4.3',
'qf4.4',
'qf4.5',
'qf4.6']
And i want to measure the linear optics functions at these elements, Is there a method that can give me back the Indices of these elements by knowing its names without the need of using the loop, as i did here?
[[for i in used_quads_list:
element_index = get_refpts(ring, i)
lindata0, tune, chrom, lindata = ring.linopt(get_chrom=True, refpts=element_index)
s_pos_ = lindata['s_pos']
s_pos1.append(np.squeeze(s_pos_))]]
Beta Was this translation helpful? Give feedback.
All reactions