locan.data.filter.select_by_region#
- locan.data.filter.select_by_region(locdata, region, loc_properties=None, reduce=True)[source]#
Select localizations from locdata that are within region and return a new LocData object. Selection is with respect to loc_properties or to localization coordinates that correspond to region dimension.
- Parameters:
- Returns:
A new instance of LocData with all localizations within region of interest.
- Return type:
Note
Points on boundary of regions are considered outside if region is a shapely object, but inside if region is a matplotlib (which is the case for RoiRegion) object.