LSSTApplications  16.0-10-g1758552+4,16.0-10-g4f78f78+4,16.0-10-gc1446dd+30,16.0-11-g39ac3c7+2,16.0-13-g066a532+3,16.0-14-g6c7ed55+4,16.0-14-gd373004+3,16.0-15-g072d20e+4,16.0-15-gb461e1a+2,16.0-16-g48c959a+3,16.0-16-g89065d4+2,16.0-16-gd8e3590+4,16.0-19-gb830ed4e+4,16.0-2-g0febb12+20,16.0-2-g9d5294e+53,16.0-2-ga8830df+3,16.0-20-g17d57d5+2,16.0-22-gf7a7fdf+3,16.0-27-g78173a71+3,16.0-3-g324faa9+3,16.0-3-gcfd6c53+51,16.0-3-ge00e371+9,16.0-4-g03cf288+42,16.0-4-g5f3a788+19,16.0-4-ga3eb747+9,16.0-4-gabf74b7+4,16.0-4-gb13d127+3,16.0-5-g6a53317+9,16.0-5-gb3f8a4b+62,16.0-5-gef99c9f+4,16.0-57-g90e7ba260+2,16.0-6-g0838257+3,16.0-6-g9321be7+3,16.0-6-gcbc7b31+3,16.0-6-gf49912c+4,16.0-7-gd2eeba5+12,16.0-8-g21fd5fe+4,16.0-8-g3a9f023+4,16.0-9-g85d1a16+4,master-g7b902255af+4,w.2018.43
LSSTDataManagementBasePackage
Public Member Functions | Static Public Attributes | Properties | List of all members
lsst.pipe.tasks.multiBand.CullPeaksConfig Class Reference

Configuration for culling garbage peaks after merging footprints. More...

Inheritance diagram for lsst.pipe.tasks.multiBand.CullPeaksConfig:
lsst.pex.config.config.Config lsst.pex.config.config.ConfigMeta

Public Member Functions

def __iter__ (self)
 Iterate over fields. More...
 
def keys (self)
 Return the list of field names. More...
 
def values (self)
 Return the list of field values. More...
 
def items (self)
 Return the list of (field name, field value) pairs. More...
 
def iteritems (self)
 Iterate over (field name, field value) pairs. More...
 
def itervalues (self)
 Iterate over field values. More...
 
def iterkeys (self)
 Iterate over field names. More...
 
def __contains__ (self, name)
 Return True if the specified field exists in this config. More...
 
def __new__ (cls, args, kw)
 Allocate a new Config object. More...
 
def __reduce__ (self)
 
def setDefaults (self)
 
def update (self, kw)
 Update values specified by the keyword arguments. More...
 
def load (self, filename, root="config")
 Modify this config in place by executing the Python code in the named file. More...
 
def loadFromStream (self, stream, root="config", filename=None)
 Modify this config in place by executing the python code in the provided stream. More...
 
def save (self, filename, root="config")
 Save a python script to the named file, which, when loaded, reproduces this Config. More...
 
def saveToStream (self, outfile, root="config")
 Save a python script to a stream, which, when loaded, reproduces this Config. More...
 
def freeze (self)
 Make this Config and all sub-configs read-only. More...
 
def toDict (self)
 Return a dict of field name: value. More...
 
def names (self)
 Return all the keys in a config recursively. More...
 
def validate (self)
 Validate the Config; raise an exception if invalid. More...
 
def formatHistory (self, name, kwargs)
 Format the specified config field's history to a more human-readable format. More...
 
def __setattr__ (self, attr, value, at=None, label="assignment")
 Regulate which attributes can be set. More...
 
def __setattr__ (cls, name, value)
 
def __delattr__ (self, attr, at=None, label="deletion")
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 
def __str__ (self)
 
def __repr__ (self)
 
def compare (self, other, shortcut=True, rtol=1E-8, atol=1E-8, output=None)
 Compare two Configs for equality; return True if equal. More...
 

Static Public Attributes

 nBandsSufficient
 
 rankSufficient
 
 rankConsidered
 
 rankNormalizedConsidered
 

Properties

 history = property(lambda x: x._history)
 

Detailed Description

Configuration for culling garbage peaks after merging footprints.

Peaks may also be culled after detection or during deblending; this configuration object only deals with culling after merging Footprints.

These cuts are based on three quantities:

The formula that identifie peaks to cull is:

nBands < nBandsSufficient AND (rank >= rankSufficient) AND (rank >= rankConsider OR rank >= rankNormalizedConsider)

To disable peak culling, simply set nBandsSufficient=1.

Definition at line 624 of file multiBand.py.

Member Function Documentation

◆ __contains__()

def lsst.pex.config.config.Config.__contains__ (   self,
  name 
)
inherited

Return True if the specified field exists in this config.

Parameters
[in]namefield name to test for

Definition at line 451 of file config.py.

451  def __contains__(self, name):
452  """!Return True if the specified field exists in this config
453 
454  @param[in] name field name to test for
455  """
456  return self._storage.__contains__(name)
457 

◆ __delattr__()

def lsst.pex.config.config.Config.__delattr__ (   self,
  attr,
  at = None,
  label = "deletion" 
)
inherited

Definition at line 743 of file config.py.

743  def __delattr__(self, attr, at=None, label="deletion"):
744  if attr in self._fields:
745  if at is None:
746  at = getCallStack()
747  self._fields[attr].__delete__(self, at=at, label=label)
748  else:
749  object.__delattr__(self, attr)
750 
def getCallStack(skip=0)
Definition: callStack.py:153

◆ __eq__()

def lsst.pex.config.config.Config.__eq__ (   self,
  other 
)
inherited

Definition at line 751 of file config.py.

751  def __eq__(self, other):
752  if type(other) == type(self):
753  for name in self._fields:
754  thisValue = getattr(self, name)
755  otherValue = getattr(other, name)
756  if isinstance(thisValue, float) and math.isnan(thisValue):
757  if not math.isnan(otherValue):
758  return False
759  elif thisValue != otherValue:
760  return False
761  return True
762  return False
763 
table::Key< int > type
Definition: Detector.cc:164

◆ __iter__()

def lsst.pex.config.config.Config.__iter__ (   self)
inherited

Iterate over fields.

Definition at line 416 of file config.py.

416  def __iter__(self):
417  """!Iterate over fields
418  """
419  return self._fields.__iter__()
420 

◆ __ne__()

def lsst.pex.config.config.Config.__ne__ (   self,
  other 
)
inherited

Definition at line 764 of file config.py.

764  def __ne__(self, other):
765  return not self.__eq__(other)
766 

◆ __new__()

def lsst.pex.config.config.Config.__new__ (   cls,
  args,
  kw 
)
inherited

Allocate a new Config object.

In order to ensure that all Config object are always in a proper state when handed to users or to derived Config classes, some attributes are handled at allocation time rather than at initialization

This ensures that even if a derived Config class implements init, the author does not need to be concerned about when or even if he should call the base Config.__init__

Definition at line 458 of file config.py.

458  def __new__(cls, *args, **kw):
459  """!Allocate a new Config object.
460 
461  In order to ensure that all Config object are always in a proper
462  state when handed to users or to derived Config classes, some
463  attributes are handled at allocation time rather than at initialization
464 
465  This ensures that even if a derived Config class implements __init__,
466  the author does not need to be concerned about when or even if he
467  should call the base Config.__init__
468  """
469  name = kw.pop("__name", None)
470  at = kw.pop("__at", getCallStack())
471  # remove __label and ignore it
472  kw.pop("__label", "default")
473 
474  instance = object.__new__(cls)
475  instance._frozen = False
476  instance._name = name
477  instance._storage = {}
478  instance._history = {}
479  instance._imports = set()
480  # load up defaults
481  for field in instance._fields.values():
482  instance._history[field.name] = []
483  field.__set__(instance, field.default, at=at + [field.source], label="default")
484  # set custom default-overides
485  instance.setDefaults()
486  # set constructor overides
487  instance.update(__at=at, **kw)
488  return instance
489 
daf::base::PropertySet * set
Definition: fits.cc:832
def getCallStack(skip=0)
Definition: callStack.py:153

◆ __reduce__()

def lsst.pex.config.config.Config.__reduce__ (   self)
inherited
Reduction for pickling (function with arguments to reproduce).

We need to condense and reconstitute the Config, since it may contain lambdas
(as the 'check' elements) that cannot be pickled.

Definition at line 490 of file config.py.

490  def __reduce__(self):
491  """Reduction for pickling (function with arguments to reproduce).
492 
493  We need to condense and reconstitute the Config, since it may contain lambdas
494  (as the 'check' elements) that cannot be pickled.
495  """
496  # The stream must be in characters to match the API but pickle requires bytes
497  stream = io.StringIO()
498  self.saveToStream(stream)
499  return (unreduceConfig, (self.__class__, stream.getvalue().encode()))
500 

◆ __repr__()

def lsst.pex.config.config.Config.__repr__ (   self)
inherited

Definition at line 770 of file config.py.

770  def __repr__(self):
771  return "%s(%s)" % (
772  _typeStr(self),
773  ", ".join("%s=%r" % (k, v) for k, v in self.toDict().items() if v is not None)
774  )
775 
std::vector< SchemaItem< Flag > > * items

◆ __setattr__() [1/2]

def lsst.pex.config.config.ConfigMeta.__setattr__ (   cls,
  name,
  value 
)
inherited

Definition at line 110 of file config.py.

110  def __setattr__(cls, name, value):
111  if isinstance(value, Field):
112  value.name = name
113  cls._fields[name] = value
114  type.__setattr__(cls, name, value)
115 
116 

◆ __setattr__() [2/2]

def lsst.pex.config.config.Config.__setattr__ (   self,
  attr,
  value,
  at = None,
  label = "assignment" 
)
inherited

Regulate which attributes can be set.

Unlike normal python objects, Config objects are locked such that no additional attributes nor properties may be added to them dynamically.

Although this is not the standard Python behavior, it helps to protect users from accidentally mispelling a field name, or trying to set a non-existent field.

Definition at line 717 of file config.py.

717  def __setattr__(self, attr, value, at=None, label="assignment"):
718  """!Regulate which attributes can be set
719 
720  Unlike normal python objects, Config objects are locked such
721  that no additional attributes nor properties may be added to them
722  dynamically.
723 
724  Although this is not the standard Python behavior, it helps to
725  protect users from accidentally mispelling a field name, or
726  trying to set a non-existent field.
727  """
728  if attr in self._fields:
729  if at is None:
730  at = getCallStack()
731  # This allows Field descriptors to work.
732  self._fields[attr].__set__(self, value, at=at, label=label)
733  elif hasattr(getattr(self.__class__, attr, None), '__set__'):
734  # This allows properties and other non-Field descriptors to work.
735  return object.__setattr__(self, attr, value)
736  elif attr in self.__dict__ or attr in ("_name", "_history", "_storage", "_frozen", "_imports"):
737  # This allows specific private attributes to work.
738  self.__dict__[attr] = value
739  else:
740  # We throw everything else.
741  raise AttributeError("%s has no attribute %s" % (_typeStr(self), attr))
742 
def getCallStack(skip=0)
Definition: callStack.py:153

◆ __str__()

def lsst.pex.config.config.Config.__str__ (   self)
inherited

Definition at line 767 of file config.py.

767  def __str__(self):
768  return str(self.toDict())
769 

◆ compare()

def lsst.pex.config.config.Config.compare (   self,
  other,
  shortcut = True,
  rtol = 1E-8,
  atol = 1E-8,
  output = None 
)
inherited

Compare two Configs for equality; return True if equal.

If the Configs contain RegistryFields or ConfigChoiceFields, unselected Configs will not be compared.

Parameters
[in]otherConfig object to compare with self.
[in]shortcutIf True, return as soon as an inequality is found.
[in]rtolRelative tolerance for floating point comparisons.
[in]atolAbsolute tolerance for floating point comparisons.
[in]outputIf not None, a callable that takes a string, used (possibly repeatedly) to report inequalities.

Floating point comparisons are performed by numpy.allclose; refer to that for details.

Definition at line 776 of file config.py.

776  def compare(self, other, shortcut=True, rtol=1E-8, atol=1E-8, output=None):
777  """!Compare two Configs for equality; return True if equal
778 
779  If the Configs contain RegistryFields or ConfigChoiceFields, unselected Configs
780  will not be compared.
781 
782  @param[in] other Config object to compare with self.
783  @param[in] shortcut If True, return as soon as an inequality is found.
784  @param[in] rtol Relative tolerance for floating point comparisons.
785  @param[in] atol Absolute tolerance for floating point comparisons.
786  @param[in] output If not None, a callable that takes a string, used (possibly repeatedly)
787  to report inequalities.
788 
789  Floating point comparisons are performed by numpy.allclose; refer to that for details.
790  """
791  name1 = self._name if self._name is not None else "config"
792  name2 = other._name if other._name is not None else "config"
793  name = getComparisonName(name1, name2)
794  return compareConfigs(name, self, other, shortcut=shortcut,
795  rtol=rtol, atol=atol, output=output)
796 
797 
def compareConfigs(name, c1, c2, shortcut=True, rtol=1E-8, atol=1E-8, output=None)
Definition: comparison.py:67
def getComparisonName(name1, name2)
Definition: comparison.py:35

◆ formatHistory()

def lsst.pex.config.config.Config.formatHistory (   self,
  name,
  kwargs 
)
inherited

Format the specified config field's history to a more human-readable format.

Parameters
[in]namename of field whose history is wanted
[in]kwargskeyword arguments for lsst.pex.config.history.format
Returns
a string containing the formatted history

Definition at line 702 of file config.py.

702  def formatHistory(self, name, **kwargs):
703  """!Format the specified config field's history to a more human-readable format
704 
705  @param[in] name name of field whose history is wanted
706  @param[in] kwargs keyword arguments for lsst.pex.config.history.format
707  @return a string containing the formatted history
708  """
709  import lsst.pex.config.history as pexHist
710  return pexHist.format(self, name, **kwargs)
711 

◆ freeze()

def lsst.pex.config.config.Config.freeze (   self)
inherited

Make this Config and all sub-configs read-only.

Definition at line 621 of file config.py.

621  def freeze(self):
622  """!Make this Config and all sub-configs read-only
623  """
624  self._frozen = True
625  for field in self._fields.values():
626  field.freeze(self)
627 

◆ items()

def lsst.pex.config.config.Config.items (   self)
inherited

Return the list of (field name, field value) pairs.

Definition at line 431 of file config.py.

431  def items(self):
432  """!Return the list of (field name, field value) pairs
433  """
434  return list(self._storage.items())
435 
std::vector< SchemaItem< Flag > > * items
daf::base::PropertyList * list
Definition: fits.cc:833

◆ iteritems()

def lsst.pex.config.config.Config.iteritems (   self)
inherited

Iterate over (field name, field value) pairs.

Definition at line 436 of file config.py.

436  def iteritems(self):
437  """!Iterate over (field name, field value) pairs
438  """
439  return iter(self._storage.items())
440 
std::vector< SchemaItem< Flag > > * items

◆ iterkeys()

def lsst.pex.config.config.Config.iterkeys (   self)
inherited

Iterate over field names.

Definition at line 446 of file config.py.

446  def iterkeys(self):
447  """!Iterate over field names
448  """
449  return iter(self.storage.keys())
450 

◆ itervalues()

def lsst.pex.config.config.Config.itervalues (   self)
inherited

Iterate over field values.

Definition at line 441 of file config.py.

441  def itervalues(self):
442  """!Iterate over field values
443  """
444  return iter(self.storage.values())
445 

◆ keys()

def lsst.pex.config.config.Config.keys (   self)
inherited

Return the list of field names.

Definition at line 421 of file config.py.

421  def keys(self):
422  """!Return the list of field names
423  """
424  return list(self._storage.keys())
425 
daf::base::PropertyList * list
Definition: fits.cc:833

◆ load()

def lsst.pex.config.config.Config.load (   self,
  filename,
  root = "config" 
)
inherited

Modify this config in place by executing the Python code in the named file.

Parameters
[in]filenamename of file containing config override code
[in]rootname of variable in file that refers to the config being overridden

For example: if the value of root is "config" and the file contains this text: "config.myField = 5" then this config's field "myField" is set to 5.

Deprecated:
For purposes of backwards compatibility, older config files that use root="root" instead of root="config" will be loaded with a warning printed to sys.stderr. This feature will be removed at some point.

Definition at line 528 of file config.py.

528  def load(self, filename, root="config"):
529  """!Modify this config in place by executing the Python code in the named file.
530 
531  @param[in] filename name of file containing config override code
532  @param[in] root name of variable in file that refers to the config being overridden
533 
534  For example: if the value of root is "config" and the file contains this text:
535  "config.myField = 5" then this config's field "myField" is set to 5.
536 
537  @deprecated For purposes of backwards compatibility, older config files that use
538  root="root" instead of root="config" will be loaded with a warning printed to sys.stderr.
539  This feature will be removed at some point.
540  """
541  with open(filename, "r") as f:
542  code = compile(f.read(), filename=filename, mode="exec")
543  self.loadFromStream(stream=code, root=root)
544 

◆ loadFromStream()

def lsst.pex.config.config.Config.loadFromStream (   self,
  stream,
  root = "config",
  filename = None 
)
inherited

Modify this config in place by executing the python code in the provided stream.

Parameters
[in]streamopen file object, string or compiled string containing config override code
[in]rootname of variable in stream that refers to the config being overridden
[in]filenamename of config override file, or None if unknown or contained in the stream; used for error reporting

For example: if the value of root is "config" and the stream contains this text: "config.myField = 5" then this config's field "myField" is set to 5.

Deprecated:
For purposes of backwards compatibility, older config files that use root="root" instead of root="config" will be loaded with a warning printed to sys.stderr. This feature will be removed at some point.

Definition at line 545 of file config.py.

545  def loadFromStream(self, stream, root="config", filename=None):
546  """!Modify this config in place by executing the python code in the provided stream.
547 
548  @param[in] stream open file object, string or compiled string containing config override code
549  @param[in] root name of variable in stream that refers to the config being overridden
550  @param[in] filename name of config override file, or None if unknown or contained
551  in the stream; used for error reporting
552 
553  For example: if the value of root is "config" and the stream contains this text:
554  "config.myField = 5" then this config's field "myField" is set to 5.
555 
556  @deprecated For purposes of backwards compatibility, older config files that use
557  root="root" instead of root="config" will be loaded with a warning printed to sys.stderr.
558  This feature will be removed at some point.
559  """
560  with RecordingImporter() as importer:
561  try:
562  local = {root: self}
563  exec(stream, {}, local)
564  except NameError as e:
565  if root == "config" and "root" in e.args[0]:
566  if filename is None:
567  # try to determine the file name; a compiled string has attribute "co_filename",
568  # an open file has attribute "name", else give up
569  filename = getattr(stream, "co_filename", None)
570  if filename is None:
571  filename = getattr(stream, "name", "?")
572  print(f"Config override file {filename!r}"
573  " appears to use 'root' instead of 'config'; trying with 'root'", file=sys.stderr)
574  local = {"root": self}
575  exec(stream, {}, local)
576  else:
577  raise
578 
579  self._imports.update(importer.getModules())
580 

◆ names()

def lsst.pex.config.config.Config.names (   self)
inherited

Return all the keys in a config recursively.

Definition at line 648 of file config.py.

648  def names(self):
649  """!Return all the keys in a config recursively
650  """
651  #
652  # Rather than sort out the recursion all over again use the
653  # pre-existing saveToStream()
654  #
655  with io.StringIO() as strFd:
656  self.saveToStream(strFd, "config")
657  contents = strFd.getvalue()
658  strFd.close()
659  #
660  # Pull the names out of the dumped config
661  #
662  keys = []
663  for line in contents.split("\n"):
664  if re.search(r"^((assert|import)\s+|\s*$|#)", line):
665  continue
666 
667  mat = re.search(r"^(?:config\.)?([^=]+)\s*=\s*.*", line)
668  if mat:
669  keys.append(mat.group(1))
670 
671  return keys
672 

◆ save()

def lsst.pex.config.config.Config.save (   self,
  filename,
  root = "config" 
)
inherited

Save a python script to the named file, which, when loaded, reproduces this Config.

Parameters
[in]filenamename of file to which to write the config
[in]rootname to use for the root config variable; the same value must be used when loading

Definition at line 581 of file config.py.

581  def save(self, filename, root="config"):
582  """!Save a python script to the named file, which, when loaded, reproduces this Config
583 
584  @param[in] filename name of file to which to write the config
585  @param[in] root name to use for the root config variable; the same value must be used when loading
586  """
587  d = os.path.dirname(filename)
588  with tempfile.NamedTemporaryFile(mode="w", delete=False, dir=d) as outfile:
589  self.saveToStream(outfile, root)
590  # tempfile is hardcoded to create files with mode '0600'
591  # for an explantion of these antics see:
592  # https://stackoverflow.com/questions/10291131/how-to-use-os-umask-in-python
593  umask = os.umask(0o077)
594  os.umask(umask)
595  os.chmod(outfile.name, (~umask & 0o666))
596  # chmod before the move so we get quasi-atomic behavior if the
597  # source and dest. are on the same filesystem.
598  # os.rename may not work across filesystems
599  shutil.move(outfile.name, filename)
600 

◆ saveToStream()

def lsst.pex.config.config.Config.saveToStream (   self,
  outfile,
  root = "config" 
)
inherited

Save a python script to a stream, which, when loaded, reproduces this Config.

Parameters
outfile[inout] open file object to which to write the config. Accepts strings not bytes.
root[in] name to use for the root config variable; the same value must be used when loading

Definition at line 601 of file config.py.

601  def saveToStream(self, outfile, root="config"):
602  """!Save a python script to a stream, which, when loaded, reproduces this Config
603 
604  @param outfile [inout] open file object to which to write the config. Accepts strings not bytes.
605  @param root [in] name to use for the root config variable; the same value must be used when loading
606  """
607  tmp = self._name
608  self._rename(root)
609  try:
610  configType = type(self)
611  typeString = _typeStr(configType)
612  outfile.write(u"import {}\n".format(configType.__module__))
613  outfile.write(u"assert type({})=={}, 'config is of type %s.%s ".format(root, typeString))
614  outfile.write(u"instead of {}' % (type({}).__module__, type({}).__name__)\n".format(typeString,
615  root,
616  root))
617  self._save(outfile)
618  finally:
619  self._rename(tmp)
620 
table::Key< int > type
Definition: Detector.cc:164
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:129

◆ setDefaults()

def lsst.pex.config.config.Config.setDefaults (   self)
inherited
Derived config classes that must compute defaults rather than using the
Field defaults should do so here.
To correctly use inherited defaults, implementations of setDefaults()
must call their base class' setDefaults()

Definition at line 501 of file config.py.

501  def setDefaults(self):
502  """
503  Derived config classes that must compute defaults rather than using the
504  Field defaults should do so here.
505  To correctly use inherited defaults, implementations of setDefaults()
506  must call their base class' setDefaults()
507  """
508  pass
509 

◆ toDict()

def lsst.pex.config.config.Config.toDict (   self)
inherited

Return a dict of field name: value.

Correct behavior is dependent on proper implementation of Field.toDict. If implementing a new Field type, you may need to implement your own toDict method.

Definition at line 637 of file config.py.

637  def toDict(self):
638  """!Return a dict of field name: value
639 
640  Correct behavior is dependent on proper implementation of Field.toDict. If implementing a new
641  Field type, you may need to implement your own toDict method.
642  """
643  dict_ = {}
644  for name, field in self._fields.items():
645  dict_[name] = field.toDict(self)
646  return dict_
647 
std::vector< SchemaItem< Flag > > * items

◆ update()

def lsst.pex.config.config.Config.update (   self,
  kw 
)
inherited

Update values specified by the keyword arguments.

Warning
The '__at' and '__label' keyword arguments are special internal keywords. They are used to strip out any internal steps from the history tracebacks of the config. Modifying these keywords allows users to lie about a Config's history. Please do not do so!

Definition at line 510 of file config.py.

510  def update(self, **kw):
511  """!Update values specified by the keyword arguments
512 
513  @warning The '__at' and '__label' keyword arguments are special internal
514  keywords. They are used to strip out any internal steps from the
515  history tracebacks of the config. Modifying these keywords allows users
516  to lie about a Config's history. Please do not do so!
517  """
518  at = kw.pop("__at", getCallStack())
519  label = kw.pop("__label", "update")
520 
521  for name, value in kw.items():
522  try:
523  field = self._fields[name]
524  field.__set__(self, value, at=at, label=label)
525  except KeyError:
526  raise KeyError("No field of name %s exists in config type %s" % (name, _typeStr(self)))
527 
def getCallStack(skip=0)
Definition: callStack.py:153

◆ validate()

def lsst.pex.config.config.Config.validate (   self)
inherited

Validate the Config; raise an exception if invalid.

The base class implementation performs type checks on all fields by calling Field.validate().

Complex single-field validation can be defined by deriving new Field types. As syntactic sugar, some derived Field types are defined in this module which handle recursing into sub-configs (ConfigField, ConfigChoiceField)

Inter-field relationships should only be checked in derived Config classes after calling this method, and base validation is complete

Definition at line 685 of file config.py.

685  def validate(self):
686  """!Validate the Config; raise an exception if invalid
687 
688  The base class implementation performs type checks on all fields by
689  calling Field.validate().
690 
691  Complex single-field validation can be defined by deriving new Field
692  types. As syntactic sugar, some derived Field types are defined in
693  this module which handle recursing into sub-configs
694  (ConfigField, ConfigChoiceField)
695 
696  Inter-field relationships should only be checked in derived Config
697  classes after calling this method, and base validation is complete
698  """
699  for field in self._fields.values():
700  field.validate(self)
701 

◆ values()

def lsst.pex.config.config.Config.values (   self)
inherited

Return the list of field values.

Definition at line 426 of file config.py.

426  def values(self):
427  """!Return the list of field values
428  """
429  return list(self._storage.values())
430 
daf::base::PropertyList * list
Definition: fits.cc:833

Member Data Documentation

◆ nBandsSufficient

lsst.pipe.tasks.multiBand.CullPeaksConfig.nBandsSufficient
static
Initial value:
= RangeField(dtype=int, default=2, min=1,
doc="Always keep peaks detected in this many bands")

Definition at line 647 of file multiBand.py.

◆ rankConsidered

lsst.pipe.tasks.multiBand.CullPeaksConfig.rankConsidered
static
Initial value:
= RangeField(dtype=int, default=30, min=1,
doc=("Keep peaks with less than this rank that also match the "
"rankNormalizedConsidered condition."))

Definition at line 651 of file multiBand.py.

◆ rankNormalizedConsidered

lsst.pipe.tasks.multiBand.CullPeaksConfig.rankNormalizedConsidered
static
Initial value:
= RangeField(dtype=float, default=0.7, min=0.0,
doc=("Keep peaks with less than this normalized rank that"
" also match the rankConsidered condition."))

Definition at line 654 of file multiBand.py.

◆ rankSufficient

lsst.pipe.tasks.multiBand.CullPeaksConfig.rankSufficient
static
Initial value:
= RangeField(dtype=int, default=20, min=1,
doc="Always keep this many peaks in each family")

Definition at line 649 of file multiBand.py.

Property Documentation

◆ history

lsst.pex.config.config.Config.history = property(lambda x: x._history)
staticinherited

Definition at line 715 of file config.py.


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