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 forstrarguments:get_cells(ring, attrname [, attrvalue])isring.bool_refpts(checkattr(strkey [, attrvalue]))- Parameters:
ring (Sequence[Element]) – Lattice description
filtfunc (ElementFilter) – Filter function. Selects
Elements 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
Elements withattrname == attrvalue.regex – Use regular expression for refpts string matching; Default: False (Unix shell-style wildcards)
- Returns:
bool_refs (BoolRefpts) – numpy Array of
boolwith length len(ring)+1
Examples
>>> refpts = get_cells(ring, 'Frequency')
Returns a numpy array of booleans where all elements having a
FrequencyattributeTrue>>> refpts = get_cells(ring, 'K', 0.0)
Returns a numpy array of booleans where all elements having a
Kattribute equal to 0.0 areTrueSee also
- get_refpts(ring, refpts, regex=False)[source]#
Return a
uint32array of element indices selecting ring elements.Deprecated:
get_elements(ring, refpts)isring.uint32_refpts(refpts)- Parameters:
- Returns:
uint32_refs (Uint32Refs) –
uint32numpy array as long as the number of refpts
See also