at.lattice.deprecated#
Functions
|
Returns a bool array of element indices, selecting ring elements. |
|
Return a |
- get_cells(ring, filtfunc) BoolRefpts [source]#
- get_cells(ring, element_type) BoolRefpts
- get_cells(ring, attrname) BoolRefpts
- get_cells(ring, attrname, attrvalue) BoolRefpts
Returns a bool array of element indices, selecting ring elements.
Deprecated:
get_cells(ring, refpts)
isring.bool_refpts(refpts)
except forstr
arguments:get_cells(ring, attrname [, attrvalue])
isring.bool_refpts(checkattr(strkey [, attrvalue]))
- Parameters:
ring (Sequence[Element]) – Lattice description
filtfunc (ElementFilter) – Filter function. Selects
Element
s satisfying the filter functionelement_type (Type[Element]) – Element type
attrname (str) – Attribute name
attrvalue (Any) – Attribute value. If absent, select the presence of an attrname attribute. If present, select
Element
s withattrname == attrvalue
.regex – Use regular expression for refpts string matching; Default: False (Unix shell-style wildcards)
- Returns:
bool_refs (BoolRefpts) – numpy Array of
bool
with length len(ring)+1
Examples
>>> refpts = get_cells(ring, 'Frequency')
Returns a numpy array of booleans where all elements having a
Frequency
attribute areTrue
>>> refpts = get_cells(ring, 'K', 0.0)
Returns a numpy array of booleans where all elements having a
K
attribute equal to 0.0 areTrue
See also
- get_refpts(ring, refpts, regex=False)[source]#
Return a
uint32
array of element indices selecting ring elements.Deprecated:
get_elements(ring, refpts)
isring.uint32_refpts(refpts)
- Parameters:
- Returns:
uint32_refs (Uint32Refs) –
uint32
numpy array as long as the number of refpts
See also