LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Public Attributes | List of all members
lsst.ip.diffim.dipoleMeasurement.SourceFlagChecker Class Reference

Functor class to check whether a diaSource has flags set that should cause it to be labeled bad. More...

Inheritance diagram for lsst.ip.diffim.dipoleMeasurement.SourceFlagChecker:

Public Member Functions

def __init__
 Constructor. More...
 
def __call__
 Call the source flag checker on a single Source. More...
 

Public Attributes

 badFlags
 
 keys
 

Detailed Description

Functor class to check whether a diaSource has flags set that should cause it to be labeled bad.

Definition at line 335 of file dipoleMeasurement.py.

Constructor & Destructor Documentation

def lsst.ip.diffim.dipoleMeasurement.SourceFlagChecker.__init__ (   self,
  sources,
  badFlags = None 
)

Constructor.

Parameters
sourcesSources that will be measured
badFlagsA list of flags that will be used to determine if there was a measurement problem

The list of badFlags will be used to make a list of keys to check for measurement flags on. By default the centroid keys are added to this list

Definition at line 337 of file dipoleMeasurement.py.

338  def __init__(self, sources, badFlags=None):
339  """!Constructor
340 
341  @param sources Sources that will be measured
342  @param badFlags A list of flags that will be used to determine if there was a measurement problem
343 
344  The list of badFlags will be used to make a list of keys to check for measurement flags on. By
345  default the centroid keys are added to this list"""
347  self.badFlags = ['base_PixelFlags_flag_edge', 'base_PixelFlags_flag_interpolatedCenter', 'base_PixelFlags_flag_saturatedCenter']
348  if badFlags is not None:
349  for flag in badFlags:
350  self.badFlags.append(flag)
351  self.keys = [sources.getSchema().find(name).key for name in self.badFlags]
352  self.keys.append(sources.table.getCentroidFlagKey())

Member Function Documentation

def lsst.ip.diffim.dipoleMeasurement.SourceFlagChecker.__call__ (   self,
  source 
)

Call the source flag checker on a single Source.

Parameters
sourceSource that will be examined

Definition at line 353 of file dipoleMeasurement.py.

354  def __call__(self, source):
355  """!Call the source flag checker on a single Source
356 
357  @param source Source that will be examined"""
358  for k in self.keys:
359  if source.get(k):
360  return False
361  return True
def __call__
Call the source flag checker on a single Source.

Member Data Documentation

lsst.ip.diffim.dipoleMeasurement.SourceFlagChecker.badFlags

Definition at line 346 of file dipoleMeasurement.py.

lsst.ip.diffim.dipoleMeasurement.SourceFlagChecker.keys

Definition at line 350 of file dipoleMeasurement.py.


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