qlat.FieldSelection¶
- class qlat.FieldSelection(*args)¶
- __init__()¶
FieldSelection() FieldSelection(geo, 0) # selecting all points FieldSelection(geo, -1) # no points being selected FieldSelection(geo) # same as FieldSelection(geo, -1), no points being selected FieldSelection(psel) # require psel.points_dist_type in [ “l”, “f”, “g”, ] FieldSelection(psel, geo) # require psel.points_dist_type in [ “l”, “f”, “g”, ]
Methods
FieldSelection() FieldSelection(geo, 0) # selecting all points FieldSelection(geo, -1) # no points being selected FieldSelection(geo) # same as FieldSelection(geo, -1), no points being selected FieldSelection(psel) # require psel.points_dist_type in [ "l", "f", "g", ] FieldSelection(psel, geo) # require psel.points_dist_type in [ "l", "f", "g", ]
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)init_from_geo
(self, Geometry geo, Long rank=-1)By default rank=-1 means empty selection.
init_from_psel
(self, PointsSelection psel, ...)psel.points_dist_type [ "g", "f", "l", ]
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, ...)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