LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
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 
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::PeakCatalog PeakCatalog;
214  PeakCatalog 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  PTR(afwDetection::PeakRecord) central;
219  for (PeakCatalog::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  PeakCatalog others(peaks.getTable());
229  others.reserve(peaks.size() - 1);
230  for (PeakCatalog::const_iterator iter = peaks.begin(), end = peaks.end(); iter != end; ++iter) {
232  if (central != ptr) {
233  others.push_back(ptr);
234  }
235  }
236 
237  BlendedFunctor<PixelT> functor(*image, *image->getMask(), *central, others, detected, intrp);
238  functor.apply(*foot);
239  }
240  }
241 
242  /*
243  * Mask any DETECTED pixels other than the one in the center of the object;
244  * we grow the Footprint a bit first
245  */
247 
248  PTR(afwImage::Image<int>) mim = makeImageFromMask<int>(*image->getMask(), makeAndMask(detected));
249  PTR(afwDetection::FootprintSet) fs =
250  boost::make_shared<afwDetection::FootprintSet>(*mim, afwDetection::Threshold(1));
251  CONST_PTR(FootprintList) feet = fs->getFootprints();
252 
253  if (feet->size() > 1) {
254  int const ngrow = 3; // number of pixels to grow bad Footprints
255  //
256  // Go through Footprints looking for ones that don't contain cen
257  //
258  for (FootprintList::const_iterator fiter = feet->begin(); fiter != feet->end(); ++fiter) {
259  PTR(afwDetection::Footprint) foot = *fiter;
260  if (foot->contains(cen)) {
261  continue;
262  }
263 
264  PTR(afwDetection::Footprint) bigfoot = afwDetection::growFootprint(foot, ngrow);
265  afwDetection::clearMaskFromFootprint(image->getMask().get(), *bigfoot, detected);
266  afwDetection::setMaskFromFootprint(image->getMask().get(), *bigfoot, intrp);
267  }
268  }
269 
270  // Mask high pixels unconnected to the center
271  if (_pixelThreshold > 0.0) {
273  boost::make_shared<afwDetection::FootprintSet>(*image,
274  afwDetection::Threshold(_pixelThreshold, afwDetection::Threshold::PIXEL_STDEV));
275  for (FootprintList::const_iterator fpIter = fpSet->getFootprints()->begin();
276  fpIter != fpSet->getFootprints()->end(); ++fpIter) {
277  CONST_PTR(afwDetection::Footprint) fp = *fpIter;
278  if (!fp->contains(cen)) {
279  afwDetection::clearMaskFromFootprint(image->getMask().get(), *fp, detected);
280  afwDetection::setMaskFromFootprint(image->getMask().get(), *fp, intrp);
281  }
282  }
283  }
284 
285  return image;
286 }
int iter
for(FootprintList::const_iterator ptr=feet->begin(), end=feet->end();ptr!=end;++ptr)
Definition: saturated.cc:82
int positionToIndex(double pos)
Convert image position to nearest integer index.
Definition: ImageUtils.h:69
boost::shared_ptr< afw::table::SourceRecord > getSource() const
Return the original Source.
Definition: PsfCandidate.h:116
boost::shared_ptr< FootprintList > feet
Definition: saturated.cc:81
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
#define PTR(...)
Definition: base.h:41
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)
void ImageT ImageT int float saturatedPixelValue int const width
Definition: saturated.cc:44
afw::table::CatalogT< PeakRecord > PeakCatalog
Definition: Peak.h:225
static bool getMaskBlends()
Get whether blends are masked.
Definition: PsfCandidate.h:153
if(width!=gim.getWidth()||height!=gim.getHeight()||x0!=gim.getX0()||y0!=gim.getY0())
Definition: saturated.cc:47
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:860
detection::FootprintSet::FootprintList FootprintList
Definition: saturated.cc:80
A set of pixels in an Image.
Definition: Footprint.h:62
void ImageT ImageT int float saturatedPixelValue int const height
Definition: saturated.cc:44
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
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.
#define CONST_PTR(...)
Definition: base.h:47
boost::shared_ptr< lsst::afw::image::Exposure< PixelT > const > _parentExposure
Definition: PsfCandidate.h:156
Record class that represents a peak in a Footprint.
Definition: Peak.h:40
#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 317 of file PsfCandidate.cc.

317  {
318 
319  int const width = getWidth() == 0 ? _defaultWidth : getWidth();
320  int const height = getHeight() == 0 ? _defaultWidth : getHeight();
321 
322  return getMaskedImage(width, height);
323 
324 }
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
void ImageT ImageT int float saturatedPixelValue int const width
Definition: saturated.cc:44
void ImageT ImageT int float saturatedPixelValue int const height
Definition: saturated.cc:44
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 296 of file PsfCandidate.cc.

296  {
297 
298 
299  if (_haveImage && (width != _image->getWidth() || height != _image->getHeight())) {
300  _haveImage = false;
301  }
302 
303  if (!_haveImage) {
305  _haveImage = true;
306  }
307 
308  return _image;
309 }
boost::shared_ptr< afw::image::MaskedImage< PixelT > > extractImage(unsigned int width, unsigned int height) const
void ImageT ImageT int float saturatedPixelValue int const width
Definition: saturated.cc:44
void ImageT ImageT int float saturatedPixelValue int const height
Definition: saturated.cc:44
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 333 of file PsfCandidate.cc.

336  {
337  unsigned int const width = getWidth() == 0 ? _defaultWidth : getWidth();
338  unsigned int const height = getHeight() == 0 ? _defaultWidth : getHeight();
339  if (_offsetImage && static_cast<unsigned int>(_offsetImage->getWidth()) == width + 2*buffer &&
340  static_cast<unsigned int>(_offsetImage->getHeight()) == height + 2*buffer) {
341  return _offsetImage;
342  }
343 
344  PTR(MaskedImageT) image = extractImage(width + 2*buffer, height + 2*buffer);
345 
346  double const xcen = getXCenter(), ycen = getYCenter();
347  double const dx = afwImage::positionToIndex(xcen, true).second;
348  double const dy = afwImage::positionToIndex(ycen, true).second;
349 
350  PTR(MaskedImageT) offset = afwMath::offsetImage(*image, -dx, -dy, algorithm);
351  afwGeom::Point2I llc(buffer, buffer);
352  afwGeom::Extent2I dims(width, height);
353  afwGeom::Box2I box(llc, dims);
354  _offsetImage.reset(new MaskedImageT(*offset, box, afwImage::LOCAL, true)); // Deep copy
355 
356  return _offsetImage;
357 }
static int getWidth()
Return the width of the image that getImage should return.
Definition: SpatialCell.h:214
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
#define PTR(...)
Definition: base.h:41
Point< int, 2 > Point2I
Definition: Point.h:283
Extent< int, 2 > Extent2I
Definition: Extent.h:355
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
void ImageT ImageT int float saturatedPixelValue int const width
Definition: saturated.cc:44
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
void ImageT ImageT int float saturatedPixelValue int const height
Definition: saturated.cc:44
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: