lsst.meas.base  14.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
apCorrRegistry.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # LSST Data Management System
4 # Copyright 2008-2015 AURA/LSST.
5 #
6 # This product includes software developed by the
7 # LSST Project (http://www.lsst.org/).
8 #
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the LSST License Statement and
20 # the GNU General Public License along with this program. If not,
21 # see <http://www.lsstcorp.org/LegalNotices/>.
22 #
23 """Registry for names of flux fields that should be aperture corrected
24 """
25 from builtins import str
26 
27 __all__ = ("addApCorrName", "getApCorrNameSet")
28 
29 # Set of names of algorithms that measure fluxes that can be aperture corrected
30 _ApCorrNameSet = set()
31 
32 
33 def addApCorrName(name):
34  """!Add to the set of field name prefixes for fluxes that should be aperture corrected
35 
36  @param[in] name field name prefix for a flux that should be aperture corrected.
37  The corresponding field names are {name}_flux, {name}_fluxSigma and {name}_flag.
38  For example name "base_PsfFlux" corresponds to fields base_PsfFlux_flux,
39  base_PsfFlux_fluxSigma and base_PsfFlux_flag.
40  """
41  global _ApCorrNameSet
42  _ApCorrNameSet.add(str(name))
43 
44 
46  """!Return a copy of the set of field name prefixes for fluxes that should be aperture corrected
47 
48  For example the returned set will likely include "base_PsfFlux" and "base_GaussianFlux".
49  """
50  global _ApCorrNameSet
51  return _ApCorrNameSet.copy()
def getApCorrNameSet
Return a copy of the set of field name prefixes for fluxes that should be aperture corrected...
def addApCorrName
Add to the set of field name prefixes for fluxes that should be aperture corrected.