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
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
lsst::meas::algorithms::PsfCandidate< PixelT > Class Template Reference

Class stored in SpatialCells for spatial Psf fitting. More...

#include <PsfCandidate.h>

Inheritance diagram for lsst::meas::algorithms::PsfCandidate< PixelT >:
lsst::afw::math::SpatialCellMaskedImageCandidate< PixelT > lsst::afw::math::SpatialCellCandidate

Public Types

typedef boost::shared_ptr
< PsfCandidate< PixelT > > 
Ptr
 
typedef boost::shared_ptr
< const PsfCandidate< PixelT > > 
ConstPtr
 
typedef std::vector< PtrPtrList
 
typedef
lsst::afw::image::MaskedImage
< PixelT > 
MaskedImageT
 
- Public Types inherited from lsst::afw::math::SpatialCellMaskedImageCandidate< PixelT >
typedef boost::shared_ptr
< SpatialCellMaskedImageCandidate
Ptr
 
typedef boost::shared_ptr
< const
SpatialCellMaskedImageCandidate
ConstPtr
 
- Public Types inherited from lsst::afw::math::SpatialCellCandidate
enum  Status { BAD = 0, GOOD = 1, UNKNOWN = 2 }
 
typedef boost::shared_ptr
< SpatialCellCandidate
Ptr
 
typedef boost::shared_ptr
< const SpatialCellCandidate
ConstPtr
 

Public Member Functions

 PsfCandidate (boost::shared_ptr< afw::table::SourceRecord > const &source, boost::shared_ptr< afw::image::Exposure< PixelT > const > parentExposure)
 
 PsfCandidate (boost::shared_ptr< afw::table::SourceRecord > const &source, boost::shared_ptr< afw::image::Exposure< PixelT > const > parentExposure, double xCenter, double yCenter)
 
virtual ~PsfCandidate ()
 Destructor. More...
 
double getCandidateRating () const
 
boost::shared_ptr
< afw::table::SourceRecord
getSource () const
 Return the original Source. More...
 
double getAmplitude () const
 Return the best-fit amplitude. More...
 
void setAmplitude (double amplitude)
 Set the best-fit amplitude. More...
 
double getVar () const
 Return the variance in use when fitting this object. More...
 
void setVar (double var)
 Set the variance to use when fitting this object. More...
 
boost::shared_ptr
< afw::image::MaskedImage
< PixelT > const > 
getMaskedImage () const
 
boost::shared_ptr
< afw::image::MaskedImage
< PixelT > const > 
getMaskedImage (int width, int height) const
 
boost::shared_ptr
< afw::image::MaskedImage
< PixelT > > 
getOffsetImage (std::string const algorithm, unsigned int buffer) const
 Return an offset version of the image of the source. The returned image has been offset to put the centre of the object in the centre of a pixel. More...
 
- Public Member Functions inherited from lsst::afw::math::SpatialCellMaskedImageCandidate< PixelT >
 SpatialCellMaskedImageCandidate (float const xCenter, float const yCenter)
 ctor More...
 
virtual ~SpatialCellMaskedImageCandidate ()
 
double getChi2 () const
 Return the candidate's chi^2. More...
 
void setChi2 (double chi2)
 Set the candidate's chi^2. More...
 
- Public Member Functions inherited from lsst::afw::math::SpatialCellCandidate
 SpatialCellCandidate (float const xCenter, float const yCenter)
 
virtual ~SpatialCellCandidate ()
 
float getXCenter () const
 Return the object's column-centre. More...
 
float getYCenter () const
 Return the object's row-centre. More...
 
virtual bool instantiate ()
 Do anything needed to make this candidate usable. More...
 
virtual void setCandidateRating (double)
 Set the candidate's rating. More...
 
int getId () const
 Return the candidate's unique ID. More...
 
Status getStatus () const
 Return the candidate's status. More...
 
void setStatus (Status status)
 Set the candidate's status. More...
 
virtual bool isBad () const
 Is this candidate unacceptable? More...
 

Static Public Member Functions

static int getBorderWidth ()
 Return the number of pixels being ignored around the candidate image's edge. More...
 
static void setBorderWidth (int border)
 Set the number of pixels to ignore around the candidate image's edge. More...
 
static void setPixelThreshold (float threshold)
 
static float getPixelThreshold ()
 Get threshold for rejecting pixels unconnected with the central footprint. More...
 
static void setMaskBlends (bool doMaskBlends)
 Set whether blends are masked. More...
 
static bool getMaskBlends ()
 Get whether blends are masked. More...
 
- Static Public Member Functions inherited from lsst::afw::math::SpatialCellMaskedImageCandidate< PixelT >
static void setWidth (int width)
 Set the width of the image that getImage should return. More...
 
static int getWidth ()
 Return the width of the image that getImage should return. More...
 
static void setHeight (int height)
 Set the height of the image that getImage should return. More...
 
static int getHeight ()
 Return the height of the image that getImage should return. More...
 

Private Member Functions

boost::shared_ptr
< afw::image::MaskedImage
< PixelT > > 
offsetImage (boost::shared_ptr< afw::image::MaskedImage< PixelT > > img, std::string const algorithm, unsigned int buffer)
 
boost::shared_ptr
< afw::image::MaskedImage
< PixelT > > 
extractImage (unsigned int width, unsigned int height) const
 

Private Attributes

boost::shared_ptr
< lsst::afw::image::Exposure
< PixelT > const > 
_parentExposure
 
boost::shared_ptr
< afw::image::MaskedImage
< PixelT > > 
_offsetImage
 
boost::shared_ptr
< afw::table::SourceRecord
_source
 
bool _haveImage
 
double _amplitude
 
double _var
 
afw::geom::Point2D _xyCenter
 

Static Private Attributes

static int _border = 0
 
static int _defaultWidth = 21
 
static float _pixelThreshold = 0.0
 Threshold for masking pixels unconnected with central footprint. More...
 
static bool _doMaskBlends = true
 Mask blends when extracting? More...
 

Additional Inherited Members

- Protected Attributes inherited from lsst::afw::math::SpatialCellMaskedImageCandidate< PixelT >
boost::shared_ptr
< lsst::afw::image::MaskedImage
< PixelT >
lsst::afw::image::MaskPixel,
lsst::afw::image::VariancePixel
_image
 a pointer to the MaskedImage, for the use of the base class More...
 

Detailed Description

template<typename PixelT>
class lsst::meas::algorithms::PsfCandidate< PixelT >

Class stored in SpatialCells for spatial Psf fitting.

PsfCandidate is a detection that may turn out to be a PSF. We'll assign them to sets of SpatialCells; these sets will then be used to fit a spatial model to the PSF.

Definition at line 57 of file PsfCandidate.h.

Member Typedef Documentation

template<typename PixelT>
typedef boost::shared_ptr<const PsfCandidate<PixelT> > lsst::meas::algorithms::PsfCandidate< PixelT >::ConstPtr

Definition at line 66 of file PsfCandidate.h.

template<typename PixelT>
typedef lsst::afw::image::MaskedImage<PixelT> lsst::meas::algorithms::PsfCandidate< PixelT >::MaskedImageT

Definition at line 69 of file PsfCandidate.h.

template<typename PixelT>
typedef boost::shared_ptr<PsfCandidate<PixelT> > lsst::meas::algorithms::PsfCandidate< PixelT >::Ptr

Definition at line 65 of file PsfCandidate.h.

template<typename PixelT>
typedef std::vector<Ptr > lsst::meas::algorithms::PsfCandidate< PixelT >::PtrList

Definition at line 67 of file PsfCandidate.h.

Constructor & Destructor Documentation

template<typename PixelT>
lsst::meas::algorithms::PsfCandidate< PixelT >::PsfCandidate ( boost::shared_ptr< afw::table::SourceRecord > const &  source,
boost::shared_ptr< afw::image::Exposure< PixelT > const >  parentExposure 
)
inline

Construct a PsfCandidate from a specified source and image.

The x/yCenter is set to source.getX/YAstrom()

Parameters
sourceThe detected Source
parentExposureThe image wherein lie the Sources

Definition at line 76 of file PsfCandidate.h.

79  :
80  afw::math::SpatialCellMaskedImageCandidate<PixelT>(source->getX(), source->getY()),
81  _parentExposure(parentExposure),
82  _offsetImage(),
83  _source(source),
84  _haveImage(false),
85  _amplitude(0.0), _var(1.0)
86  {}
boost::shared_ptr< afw::image::MaskedImage< PixelT > > _offsetImage
Definition: PsfCandidate.h:168
boost::shared_ptr< lsst::afw::image::Exposure< PixelT > const > _parentExposure
Definition: PsfCandidate.h:156
boost::shared_ptr< afw::table::SourceRecord > _source
Definition: PsfCandidate.h:169
template<typename PixelT>
lsst::meas::algorithms::PsfCandidate< PixelT >::PsfCandidate ( boost::shared_ptr< afw::table::SourceRecord > const &  source,
boost::shared_ptr< afw::image::Exposure< PixelT > const >  parentExposure,
double  xCenter,
double  yCenter 
)
inline

Construct a PsfCandidate from a specified source, image and xyCenter.

Parameters
sourceThe detected Source
parentExposureThe image wherein lie the Sources
xCenterthe desired x center
yCenterthe desired y center

Definition at line 91 of file PsfCandidate.h.

96  :
97  afw::math::SpatialCellMaskedImageCandidate<PixelT>(xCenter, yCenter),
98  _parentExposure(parentExposure),
99  _offsetImage(),
100  _source(source),
101  _haveImage(false),
102  _amplitude(0.0), _var(1.0)
103  {}
boost::shared_ptr< afw::image::MaskedImage< PixelT > > _offsetImage
Definition: PsfCandidate.h:168
boost::shared_ptr< lsst::afw::image::Exposure< PixelT > const > _parentExposure
Definition: PsfCandidate.h:156
boost::shared_ptr< afw::table::SourceRecord > _source
Definition: PsfCandidate.h:169
template<typename PixelT>
virtual lsst::meas::algorithms::PsfCandidate< PixelT >::~PsfCandidate ( )
inlinevirtual

Destructor.

Definition at line 106 of file PsfCandidate.h.

106 {};

Member Function Documentation

template<typename PixelT >
boost::shared_ptr< afwImage::MaskedImage< PixelT > > lsst::meas::algorithms::PsfCandidate< PixelT >::extractImage ( unsigned int  width,
unsigned int  height 
) const
private

Extract an image of the candidate.

The MaskedImage is a deep copy of a sub-image of the original image. No offsets are applied.

In the mask, the INTRP bit is set and DETECTED unset for any pixels that are not considered part of the actual candidate. You should consider that, for the output mask: * INTRP means "ignore this pixel", i.e., it's contaminated * DETECTED means "fit this pixel", i.e., it contains the object of interest * Nothing means "do what you want"

Three schemes are used for masking pixels: * Pixels closer to a peak in the source footprint other than the central peak are masked. This deals with sources blended with the actual candidate. * Sources (identified from the DETECTED bit plane) unconnected to the central peak are masked, and this mask is grown. This deals with bright neighbouring sources. * Pixels exceeding the pixelThreshold relative to the expected noise according to the variance plane are masked if they are not in the central footprint. This is only applied if the pixelThreshold is positive. This deals with faint neighbouring sources.

Definition at line 184 of file PsfCandidate.cc.

187  {
190  afwGeom::Point2I const llc(cen[0] - width/2 - _parentExposure->getX0(),
191  cen[1] - height/2 - _parentExposure->getY0());
192 
193  afwGeom::BoxI bbox(llc, afwGeom::ExtentI(width, height));
194 
196  try {
197  MaskedImageT mimg = _parentExposure->getMaskedImage();
198  image.reset(new MaskedImageT(mimg, bbox, afwImage::LOCAL, true)); // a deep copy
199  } catch(lsst::pex::exceptions::LengthError &e) {
200  LSST_EXCEPT_ADD(e, "Extracting image of PSF candidate");
201  throw e;
202  }
203 
204  //
205  // Set INTRP and unset DETECTED for any pixels we don't want to deal with.
206  //
207  afwImage::MaskPixel const intrp = MaskedImageT::Mask::getPlaneBitMask("INTRP"); // mask bit for bad pixels
208  afwImage::MaskPixel const detected = MaskedImageT::Mask::getPlaneBitMask("DETECTED"); // object pixels
209 
210  // Mask out blended objects
211  if (getMaskBlends()) {
212  CONST_PTR(afwDetection::Footprint) foot = getSource()->getFootprint();
213  typedef afwDetection::Footprint::PeakList PeakList;
214  PeakList const& peaks = foot->getPeaks();
215  if (peaks.size() > 1) {
216  // Mask all pixels in the footprint except for those closest to the central peak
217  double best = std::numeric_limits<double>::infinity();
218  CONST_PTR(afwDetection::Peak) central;
219  for (PeakList::const_iterator iter = peaks.begin(), end = peaks.end(); iter != end; ++iter) {
220  double const dist2 = distanceSquared(getXCenter(), getYCenter(), **iter);
221  if (dist2 < best) {
222  best = dist2;
223  central = *iter;
224  }
225  }
226  assert(central); // We must have found something
227 
228  PeakList others;
229  others.reserve(peaks.size() - 1);
230  for (PeakList::const_iterator iter = peaks.begin(), end = peaks.end(); iter != end; ++iter) {
231  if (central != *iter) {
232  others.push_back(*iter);
233  }
234  }
235 
236  BlendedFunctor<PixelT> functor(*image, *image->getMask(), *central, others, detected, intrp);
237  functor.apply(*foot);
238  }
239  }
240 
241  /*
242  * Mask any DETECTED pixels other than the one in the center of the object;
243  * we grow the Footprint a bit first
244  */
245  typedef afwDetection::FootprintSet::FootprintList FootprintList;
246 
247  PTR(afwImage::Image<int>) mim = makeImageFromMask<int>(*image->getMask(), makeAndMask(detected));
248  PTR(afwDetection::FootprintSet) fs =
249  boost::make_shared<afwDetection::FootprintSet>(*mim, afwDetection::Threshold(1));
250  CONST_PTR(FootprintList) feet = fs->getFootprints();
251 
252  if (feet->size() > 1) {
253  int const ngrow = 3; // number of pixels to grow bad Footprints
254  //
255  // Go through Footprints looking for ones that don't contain cen
256  //
257  for (FootprintList::const_iterator fiter = feet->begin(); fiter != feet->end(); ++fiter) {
258  PTR(afwDetection::Footprint) foot = *fiter;
259  if (foot->contains(cen)) {
260  continue;
261  }
262 
263  PTR(afwDetection::Footprint) bigfoot = afwDetection::growFootprint(foot, ngrow);
264  afwDetection::clearMaskFromFootprint(image->getMask().get(), *bigfoot, detected);
265  afwDetection::setMaskFromFootprint(image->getMask().get(), *bigfoot, intrp);
266  }
267  }
268 
269  // Mask high pixels unconnected to the center
270  if (_pixelThreshold > 0.0) {
272  boost::make_shared<afwDetection::FootprintSet>(*image,
273  afwDetection::Threshold(_pixelThreshold, afwDetection::Threshold::PIXEL_STDEV));
274  for (FootprintList::const_iterator fpIter = fpSet->getFootprints()->begin();
275  fpIter != fpSet->getFootprints()->end(); ++fpIter) {
276  CONST_PTR(afwDetection::Footprint) fp = *fpIter;
277  if (!fp->contains(cen)) {
278  afwDetection::clearMaskFromFootprint(image->getMask().get(), *fp, detected);
279  afwDetection::setMaskFromFootprint(image->getMask().get(), *fp, intrp);
280  }
281  }
282  }
283 
284  return image;
285 }
#define PTR(...)
Definition: base.h:41
int positionToIndex(double pos)
Convert image position to nearest integer index.
Definition: ImageUtils.h:69
int iter
boost::shared_ptr< afw::table::SourceRecord > getSource() const
Return the original Source.
Definition: PsfCandidate.h:116
boost::uint16_t MaskPixel
static float _pixelThreshold
Threshold for masking pixels unconnected with central footprint.
Definition: PsfCandidate.h:177
float getYCenter() const
Return the object&#39;s row-centre.
Definition: SpatialCell.h:98
An integer coordinate rectangle.
Definition: Box.h:53
table::Key< table::Array< Kernel::Pixel > > image
Definition: FixedKernel.cc:117
boost::shared_ptr< Footprint > growFootprint(Footprint const &foot, int nGrow, bool isotropic=true)
A peak in an image.
Definition: Peak.h:51
static bool getMaskBlends()
Get whether blends are masked.
Definition: PsfCandidate.h:153
float getXCenter() const
Return the object&#39;s column-centre.
Definition: SpatialCell.h:95
static MaskPixelT getPlaneBitMask(const std::vector< std::string > &names)
Return the bitmask corresponding to a vector of plane names OR&#39;d together.
Definition: Mask.cc:859
#define CONST_PTR(...)
Definition: base.h:47
A set of pixels in an Image.
Definition: Footprint.h:73
MaskT clearMaskFromFootprint(lsst::afw::image::Mask< MaskT > *mask, Footprint const &footprint, MaskT const bitmask)
(AND ~bitmask) all the Mask&#39;s pixels that are in the Footprint; that is, set to zero in the Mask-inte...
std::vector< Footprint::Ptr > FootprintList
The FootprintSet&#39;s set of Footprints.
Definition: FootprintSet.h:57
A set of Footprints, associated with a MaskedImage.
Definition: FootprintSet.h:53
lsst::afw::detection::Footprint Footprint
Definition: Source.h:61
MaskT setMaskFromFootprint(lsst::afw::image::Mask< MaskT > *mask, Footprint const &footprint, MaskT const bitmask)
OR bitmask into all the Mask&#39;s pixels that are in the Footprint.
boost::shared_ptr< lsst::afw::image::Exposure< PixelT > const > _parentExposure
Definition: PsfCandidate.h:156
#define LSST_EXCEPT_ADD(e, m)
Definition: Exception.h:51
A class to represent a 2-dimensional array of pixels.
Definition: Image.h:415
lsst::afw::image::MaskedImage< PixelT > MaskedImageT
Definition: PsfCandidate.h:69
template<typename PixelT>
double lsst::meas::algorithms::PsfCandidate< PixelT >::getAmplitude ( ) const
inline

Return the best-fit amplitude.

Definition at line 119 of file PsfCandidate.h.

template<typename PixelT>
static int lsst::meas::algorithms::PsfCandidate< PixelT >::getBorderWidth ( )
inlinestatic

Return the number of pixels being ignored around the candidate image's edge.

Definition at line 136 of file PsfCandidate.h.

136 { return _border; }
template<typename PixelT>
double lsst::meas::algorithms::PsfCandidate< PixelT >::getCandidateRating ( ) const
inlinevirtual

Return Cell rating

Note
Required method for use by SpatialCell

Implements lsst::afw::math::SpatialCellCandidate.

Definition at line 113 of file PsfCandidate.h.

113 { return _source->getPsfFlux(); }
boost::shared_ptr< afw::table::SourceRecord > _source
Definition: PsfCandidate.h:169
template<typename PixelT>
static bool lsst::meas::algorithms::PsfCandidate< PixelT >::getMaskBlends ( )
inlinestatic

Get whether blends are masked.

Definition at line 153 of file PsfCandidate.h.

153 { return _doMaskBlends; }
static bool _doMaskBlends
Mask blends when extracting?
Definition: PsfCandidate.h:178
template<typename PixelT >
boost::shared_ptr< afwImage::MaskedImage< PixelT > const > lsst::meas::algorithms::PsfCandidate< PixelT >::getMaskedImage ( ) const
virtual

Return the image at the position of the Source, without any sub-pixel shifts to put the centre of the object in the centre of a pixel (for that, use getOffsetImage())

Implements lsst::afw::math::SpatialCellMaskedImageCandidate< PixelT >.

Definition at line 316 of file PsfCandidate.cc.

316  {
317 
318  int const width = getWidth() == 0 ? _defaultWidth : getWidth();
319  int const height = getHeight() == 0 ? _defaultWidth : getHeight();
320 
321  return getMaskedImage(width, height);
322 
323 }
static int getWidth()
Return the width of the image that getImage should return.
Definition: SpatialCell.h:214
static int getHeight()
Return the height of the image that getImage should return.
Definition: SpatialCell.h:219
boost::shared_ptr< afw::image::MaskedImage< PixelT > const > getMaskedImage() const
template<typename PixelT >
boost::shared_ptr< afwImage::MaskedImage< PixelT > const > lsst::meas::algorithms::PsfCandidate< PixelT >::getMaskedImage ( int  width,
int  height 
) const

Return the image at the position of the Source, without any sub-pixel shifts to put the centre of the object in the centre of a pixel (for that, use getOffsetImage())

Definition at line 295 of file PsfCandidate.cc.

295  {
296 
297 
298  if (_haveImage && (width != _image->getWidth() || height != _image->getHeight())) {
299  _haveImage = false;
300  }
301 
302  if (!_haveImage) {
303  _image = extractImage(width, height);
304  _haveImage = true;
305  }
306 
307  return _image;
308 }
boost::shared_ptr< afw::image::MaskedImage< PixelT > > extractImage(unsigned int width, unsigned int height) const
boost::shared_ptr< lsst::afw::image::MaskedImage< PixelT >lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > _image
a pointer to the MaskedImage, for the use of the base class
Definition: SpatialCell.h:228
template<typename PixelT >
boost::shared_ptr< afwImage::MaskedImage< PixelT > > lsst::meas::algorithms::PsfCandidate< PixelT >::getOffsetImage ( std::string const  algorithm,
unsigned int  buffer 
) const

Return an offset version of the image of the source. The returned image has been offset to put the centre of the object in the centre of a pixel.

Definition at line 332 of file PsfCandidate.cc.

335  {
336  unsigned int const width = getWidth() == 0 ? _defaultWidth : getWidth();
337  unsigned int const height = getHeight() == 0 ? _defaultWidth : getHeight();
338  if (_offsetImage && static_cast<unsigned int>(_offsetImage->getWidth()) == width + 2*buffer &&
339  static_cast<unsigned int>(_offsetImage->getHeight()) == height + 2*buffer) {
340  return _offsetImage;
341  }
342 
343  PTR(MaskedImageT) image = extractImage(width + 2*buffer, height + 2*buffer);
344 
345  double const xcen = getXCenter(), ycen = getYCenter();
346  double const dx = afwImage::positionToIndex(xcen, true).second;
347  double const dy = afwImage::positionToIndex(ycen, true).second;
348 
349  PTR(MaskedImageT) offset = afwMath::offsetImage(*image, -dx, -dy, algorithm);
350  afwGeom::Point2I llc(buffer, buffer);
351  afwGeom::Extent2I dims(width, height);
352  afwGeom::Box2I box(llc, dims);
353  _offsetImage.reset(new MaskedImageT(*offset, box, afwImage::LOCAL, true)); // Deep copy
354 
355  return _offsetImage;
356 }
#define PTR(...)
Definition: base.h:41
static int getWidth()
Return the width of the image that getImage should return.
Definition: SpatialCell.h:214
double dx
Definition: ImageUtils.cc:90
int positionToIndex(double pos)
Convert image position to nearest integer index.
Definition: ImageUtils.h:69
static int getHeight()
Return the height of the image that getImage should return.
Definition: SpatialCell.h:219
float getYCenter() const
Return the object&#39;s row-centre.
Definition: SpatialCell.h:98
Point< int, 2 > Point2I
Definition: Point.h:274
double dy
Definition: ImageUtils.cc:90
Extent< int, 2 > Extent2I
Definition: Extent.h:350
table::Key< table::Array< Kernel::Pixel > > image
Definition: FixedKernel.cc:117
boost::shared_ptr< afw::image::MaskedImage< PixelT > > extractImage(unsigned int width, unsigned int height) const
boost::shared_ptr< afw::image::MaskedImage< PixelT > > offsetImage(boost::shared_ptr< afw::image::MaskedImage< PixelT > > img, std::string const algorithm, unsigned int buffer)
float getXCenter() const
Return the object&#39;s column-centre.
Definition: SpatialCell.h:95
boost::shared_ptr< afw::image::MaskedImage< PixelT > > _offsetImage
Definition: PsfCandidate.h:168
lsst::afw::image::MaskedImage< PixelT > MaskedImageT
Definition: PsfCandidate.h:69
template<typename PixelT>
static float lsst::meas::algorithms::PsfCandidate< PixelT >::getPixelThreshold ( )
inlinestatic

Get threshold for rejecting pixels unconnected with the central footprint.

Definition at line 147 of file PsfCandidate.h.

147 { return _pixelThreshold; }
static float _pixelThreshold
Threshold for masking pixels unconnected with central footprint.
Definition: PsfCandidate.h:177
template<typename PixelT>
boost::shared_ptr< afw::table::SourceRecord > lsst::meas::algorithms::PsfCandidate< PixelT >::getSource ( ) const
inline

Return the original Source.

Definition at line 116 of file PsfCandidate.h.

116 { return _source; }
boost::shared_ptr< afw::table::SourceRecord > _source
Definition: PsfCandidate.h:169
template<typename PixelT>
double lsst::meas::algorithms::PsfCandidate< PixelT >::getVar ( ) const
inline

Return the variance in use when fitting this object.

Definition at line 125 of file PsfCandidate.h.

125 { return _var; }
template<typename PixelT>
boost::shared_ptr< afw::image::MaskedImage<PixelT> > lsst::meas::algorithms::PsfCandidate< PixelT >::offsetImage ( boost::shared_ptr< afw::image::MaskedImage< PixelT > >  img,
std::string const  algorithm,
unsigned int  buffer 
)
private
template<typename PixelT>
void lsst::meas::algorithms::PsfCandidate< PixelT >::setAmplitude ( double  amplitude)
inline

Set the best-fit amplitude.

Definition at line 122 of file PsfCandidate.h.

122 { _amplitude = amplitude; }
template<typename PixelT>
static void lsst::meas::algorithms::PsfCandidate< PixelT >::setBorderWidth ( int  border)
inlinestatic

Set the number of pixels to ignore around the candidate image's edge.

Definition at line 139 of file PsfCandidate.h.

139 { _border = border; }
template<typename PixelT>
static void lsst::meas::algorithms::PsfCandidate< PixelT >::setMaskBlends ( bool  doMaskBlends)
inlinestatic

Set whether blends are masked.

Definition at line 150 of file PsfCandidate.h.

150 { _doMaskBlends = doMaskBlends; }
static bool _doMaskBlends
Mask blends when extracting?
Definition: PsfCandidate.h:178
template<typename PixelT>
static void lsst::meas::algorithms::PsfCandidate< PixelT >::setPixelThreshold ( float  threshold)
inlinestatic

Set threshold for rejecting pixels unconnected with the central footprint

A non-positive threshold means that no threshold will be applied.

Definition at line 144 of file PsfCandidate.h.

144 { _pixelThreshold = threshold; }
static float _pixelThreshold
Threshold for masking pixels unconnected with central footprint.
Definition: PsfCandidate.h:177
template<typename PixelT>
void lsst::meas::algorithms::PsfCandidate< PixelT >::setVar ( double  var)
inline

Set the variance to use when fitting this object.

Definition at line 128 of file PsfCandidate.h.

Member Data Documentation

template<typename PixelT>
double lsst::meas::algorithms::PsfCandidate< PixelT >::_amplitude
private

Definition at line 172 of file PsfCandidate.h.

template<typename PixelT>
int lsst::meas::algorithms::PsfCandidate< PixelT >::_border = 0
staticprivate

Definition at line 174 of file PsfCandidate.h.

template<typename PixelT>
int lsst::meas::algorithms::PsfCandidate< PixelT >::_defaultWidth = 21
staticprivate

Definition at line 176 of file PsfCandidate.h.

template<typename PixelT>
bool lsst::meas::algorithms::PsfCandidate< PixelT >::_doMaskBlends = true
staticprivate

Mask blends when extracting?

Definition at line 178 of file PsfCandidate.h.

template<typename PixelT>
bool lsst::meas::algorithms::PsfCandidate< PixelT >::_haveImage
mutableprivate

Definition at line 171 of file PsfCandidate.h.

template<typename PixelT>
boost::shared_ptr< afw::image::MaskedImage<PixelT> > lsst::meas::algorithms::PsfCandidate< PixelT >::_offsetImage
mutableprivate

Definition at line 168 of file PsfCandidate.h.

template<typename PixelT>
boost::shared_ptr< lsst::afw::image::Exposure<PixelT> const> lsst::meas::algorithms::PsfCandidate< PixelT >::_parentExposure
private

Definition at line 156 of file PsfCandidate.h.

template<typename PixelT>
float lsst::meas::algorithms::PsfCandidate< PixelT >::_pixelThreshold = 0.0
staticprivate

Threshold for masking pixels unconnected with central footprint.

Definition at line 177 of file PsfCandidate.h.

template<typename PixelT>
boost::shared_ptr< afw::table::SourceRecord > lsst::meas::algorithms::PsfCandidate< PixelT >::_source
private

Definition at line 169 of file PsfCandidate.h.

template<typename PixelT>
double lsst::meas::algorithms::PsfCandidate< PixelT >::_var
private

Definition at line 173 of file PsfCandidate.h.

template<typename PixelT>
afw::geom::Point2D lsst::meas::algorithms::PsfCandidate< PixelT >::_xyCenter
private

Definition at line 175 of file PsfCandidate.h.


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