lsst.meas.base  16.0-17-g7e0e4ff+3
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 instrument flux fields that should be aperture corrected
24 """
25 
26 __all__ = ("addApCorrName", "getApCorrNameSet")
27 
28 # Set of names of algorithms that measure instrument flux that can be aperture corrected
29 _ApCorrNameSet = set()
30 
31 
32 def addApCorrName(name):
33  """!Add to the set of field name prefixes for instrument flux that should be aperture corrected
34 
35  @param[in] name field name prefix for a instrument flux that should be aperture corrected.
36  The corresponding field names are {name}_instFlux, {name}_instFluxErr and {name}_flag.
37  For example name "base_PsfFlux" corresponds to fields base_PsfFlux_instFlux,
38  base_PsfFlux_instFluxErr and base_PsfFlux_flag.
39  """
40  global _ApCorrNameSet
41  _ApCorrNameSet.add(str(name))
42 
43 
45  """!Return a copy of the set of field name prefixes for instrument flux that should be aperture corrected.
46 
47  For example the returned set will likely include "base_PsfFlux" and "base_GaussianFlux".
48  """
49  global _ApCorrNameSet
50  return _ApCorrNameSet.copy()
def addApCorrName(name)
Add to the set of field name prefixes for instrument flux that should be aperture corrected...
def getApCorrNameSet()
Return a copy of the set of field name prefixes for instrument flux that should be aperture corrected...