LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
CorrectFluxes.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 /*
3  * LSST Data Management System
4  * Copyright 2008-2013 LSST Corporation.
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 
24 #ifndef LSST_MEAS_ALGORITHMS_CorrectFluxes_h_INCLUDED
25 #define LSST_MEAS_ALGORITHMS_CorrectFluxes_h_INCLUDED
26 
29 
30 namespace lsst { namespace meas { namespace algorithms {
31 
53 public:
54 
56  doApCorr, bool,
57  "Whether to compute and apply the aperture correction from the PSF model"
58  );
61  "Whether to set the general failure flag for a flux when it cannot be aperture-corrected"
62  );
64  doTieScaledFluxes, bool,
65  "Whether to tie all ScaledFluxes to the canonical flux"
66  );
68  doFlagTieFailures, bool,
69  "Whether to set the general failure flag for a flux when it cannot be tied to the canonical flux"
70  );
72  apCorrRadius, double,
73  "Aperture to correct fluxes to in pixels"
74  );
76  canonicalFluxName, std::string,
77  "Name of algorithm to directly aperture-correct and tie other ScaledFluxes to"
78  );
80  canonicalFluxIndex, int,
81  "Index of canonical flux within canonical flux algorithm"
82  );
83 
85  AlgorithmControl("correctfluxes", 3.0),
86  doApCorr(true),
88  doTieScaledFluxes(true),
89  doFlagTieFailures(true),
90  apCorrRadius(7.0),
91  canonicalFluxName("flux.psf"),
93  {}
94 
96  return boost::static_pointer_cast<CorrectFluxesControl>(_clone());
97  }
98 
99 private:
100 
101  virtual PTR(AlgorithmControl) _clone() const;
102 
103  virtual PTR(Algorithm) _makeAlgorithm(
104  afw::table::Schema & schema,
105  PTR(daf::base::PropertyList) const & metadata,
106  AlgorithmMap const & others
107  ) const;
108 
109 };
110 
111 }}} // namespace lsst::meas::algorithms
112 
113 #endif // !LSST_MEAS_ALGORITHMS_CorrectFluxes_h_INCLUDED
#define PTR(...)
Definition: base.h:41
Class for storing ordered metadata with comments.
Definition: PropertyList.h:81
A control object for a pluggable algorithm that scales fluxes to a common system. ...
Definition: CorrectFluxes.h:52
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
Definition: config.h:36
Base class for source measurement algorithms.
Definition: Algorithm.h:106
Base class for measurement algorithm control objects.
Definition: Algorithm.h:168
tbl::Schema schema
Definition: CoaddPsf.cc:324
bool doFlagApCorrFailures
&quot;Whether to set the general failure flag for a flux when it cannot be aperture-corrected&quot; ; ...
Definition: CorrectFluxes.h:62
int canonicalFluxIndex
&quot;Index of canonical flux within canonical flux algorithm&quot; ;
Definition: CorrectFluxes.h:82
bool doTieScaledFluxes
&quot;Whether to tie all ScaledFluxes to the canonical flux&quot; ;
Definition: CorrectFluxes.h:66
boost::shared_ptr< CorrectFluxesControl > clone() const
Definition: CorrectFluxes.h:95
std::string canonicalFluxName
&quot;Name of algorithm to directly aperture-correct and tie other ScaledFluxes to&quot; ;
Definition: CorrectFluxes.h:78
virtual boost::shared_ptr< Algorithm > _makeAlgorithm(afw::table::Schema &schema, boost::shared_ptr< daf::base::PropertyList > const &metadata, AlgorithmMap const &others) const
virtual boost::shared_ptr< AlgorithmControl > _clone() const
bool doApCorr
&quot;Whether to compute and apply the aperture correction from the PSF model&quot; ;
Definition: CorrectFluxes.h:58
bool doFlagTieFailures
&quot;Whether to set the general failure flag for a flux when it cannot be tied to the canonical flux&quot; ; ...
Definition: CorrectFluxes.h:70
std::map< std::string, boost::shared_ptr< Algorithm const > > AlgorithmMap
Definition: Algorithm.h:79
double apCorrRadius
&quot;Aperture to correct fluxes to in pixels&quot; ;
Definition: CorrectFluxes.h:74