qlat.FieldSelection¶
- class qlat.FieldSelection(*args)¶
- __init__()¶
FieldSelection() FieldSelection(geo) # no points being selected FieldSelection(geo, 0) # selecting all points FieldSelection(psel)
Methods
FieldSelection() FieldSelection(geo) # no points being selected FieldSelection(geo, 0) # selecting all points FieldSelection(psel)
add_fsel
(self, FieldSelection fsel)Add fsel points to the selection, with the rank specified in fsel.
add_psel
(self, PointsSelection psel, ...)Add psel points to the selection, with the rank specified as rank_psel.
coordinate_from_idx
(self, Long idx)copy
(self)idx_from_coordinate
(self, Coordinate xg)intersect
(self, FieldSelection fsel)Do NOT change the self, but return a new one More efficient if self is smaller than fsel
intersect_with
(self, FieldSelection fsel)Modify the self.
is_containing
(self, sel_small)is_containing_fsel
(self, ...)is_containing_psel
(self, PointsSelection psel)load
(self, string path)release_buffer
(self, Buffer buf)save
(self, string path)set_empty
(self, Geometry geo)set an empty fsel with geo (all rank=-1)
set_rand
(self, Coordinate total_site, ...)set_rand_psel
(self, Coordinate total_site, ...)set_uniform
(self, Geometry geo, Long val=0)default (val = 0) select every sites val = -1 deselection everything
to_psel
(self)to_psel_local
(self)update
(self)update various indices based on f_rank
Attributes
cdata
geo
n_elems
total_site
view_count