LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Member Functions | Public Attributes | List of all members
lsst.meas.algorithms.loadReferenceObjects._FilterCatalog Class Reference

Public Member Functions

def __init__ (self, region)
 
def __call__ (self, refCat, catRegion)
 

Public Attributes

 region
 

Detailed Description

This is a private helper class which filters catalogs by
row based on the row being inside the region used to initialize
the class.

Parameters
----------
region : `lsst.sphgeom.Region`
    The spatial region which all objects should lie within

Definition at line 149 of file loadReferenceObjects.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.algorithms.loadReferenceObjects._FilterCatalog.__init__ (   self,
  region 
)

Definition at line 159 of file loadReferenceObjects.py.

159  def __init__(self, region):
160  self.region = region
161 

Member Function Documentation

◆ __call__()

def lsst.meas.algorithms.loadReferenceObjects._FilterCatalog.__call__ (   self,
  refCat,
  catRegion 
)
This call method on an instance of this class takes in a reference
catalog, and the region from which the catalog was generated.

If the catalog region is entirely contained within the region used to
initialize this class, then all the entries in the catalog must be
within the region and so the whole catalog is returned.

If the catalog region is not entirely contained, then the location for
each record is tested against the region used to initialize the class.
Records which fall inside this region are added to a new catalog, and
this catalog is then returned.

Parameters
---------
refCat : `lsst.afw.table.SourceCatalog`
    SourceCatalog to be filtered.
catRegion : `lsst.sphgeom.Region`
    Region in which the catalog was created

Definition at line 162 of file loadReferenceObjects.py.

162  def __call__(self, refCat, catRegion):
163  """This call method on an instance of this class takes in a reference
164  catalog, and the region from which the catalog was generated.
165 
166  If the catalog region is entirely contained within the region used to
167  initialize this class, then all the entries in the catalog must be
168  within the region and so the whole catalog is returned.
169 
170  If the catalog region is not entirely contained, then the location for
171  each record is tested against the region used to initialize the class.
172  Records which fall inside this region are added to a new catalog, and
173  this catalog is then returned.
174 
175  Parameters
176  ---------
177  refCat : `lsst.afw.table.SourceCatalog`
178  SourceCatalog to be filtered.
179  catRegion : `lsst.sphgeom.Region`
180  Region in which the catalog was created
181  """
182  if catRegion.isWithin(self.region):
183  # no filtering needed, region completely contains refcat
184  return refCat
185 
186  filteredRefCat = type(refCat)(refCat.table)
187  for record in refCat:
188  if self.region.contains(record.getCoord().getVector()):
189  filteredRefCat.append(record)
190  return filteredRefCat
191 
192 
table::Key< int > type
Definition: Detector.cc:163

Member Data Documentation

◆ region

lsst.meas.algorithms.loadReferenceObjects._FilterCatalog.region

Definition at line 160 of file loadReferenceObjects.py.


The documentation for this class was generated from the following file: