Skip to content

Commit

Permalink
make source of Kron radius configurable for forced mode
Browse files Browse the repository at this point in the history
The source of the Kron radius was hard-wired to _name+"_radius",
but this doesn't work for the undeblended version (which has a
different name that doesn't exist in the reference catalog).
Making the source configurable solves this problem.
  • Loading branch information
PaulPrice committed Dec 19, 2016
1 parent cc51a23 commit 0eaaaaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion include/lsst/meas/extensions/photometryKron.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class KronFluxControl {
"Use the Footprint size as part of initial estimate of Kron radius");
LSST_CONTROL_FIELD(smoothingSigma, double,
"Smooth image with N(0, smoothingSigma^2) Gaussian while estimating R_K");
LSST_CONTROL_FIELD(refRadiusName, std::string,
"Name of field specifying reference Kron radius for forced measurement");

KronFluxControl() :
fixed(false),
Expand All @@ -72,7 +74,8 @@ class KronFluxControl {
minimumRadius(0.0),
enforceMinimumRadius(true),
useFootprintRadius(false),
smoothingSigma(-1.0)
smoothingSigma(-1.0),
refRadiusName("ext_photometryKron_KronFlux_radius")
{}
};

Expand Down
2 changes: 1 addition & 1 deletion src/KronPhotometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ void KronFluxAlgorithm::_applyForced(
afw::geom::AffineTransform const & refToMeas
) const
{
float const radius = reference.get(reference.getSchema().find<float>(_name + "_radius").key);
float const radius = reference.get(reference.getSchema().find<float>(_ctrl.refRadiusName).key);
KronAperture const aperture(reference, refToMeas, radius);
_applyAperture(source, exposure, aperture);
if (exposure.getPsf()) {
Expand Down

0 comments on commit 0eaaaaf

Please sign in to comment.