2#if !defined(LSST_MEAS_ALGORITHMS_PSFCANDIDATE_H)
3#define LSST_MEAS_ALGORITHMS_PSFCANDIDATE_H
56template <
typename PixelT>
75 _parentExposure(parentExposure),
81 _psfColorValue(
std::numeric_limits<double>::quiet_NaN()),
94 _parentExposure(parentExposure),
100 _psfColorValue(
std::numeric_limits<double>::quiet_NaN()),
173 extractImage(
unsigned int width,
unsigned int height)
const;
181 double _psfColorValue;
195template <
typename PixelT>
SpatialCellImageCandidate(float const xCenter, float const yCenter)
std::vector< Ptr > PtrList
static float getPixelThreshold()
Get threshold for rejecting pixels unconnected with the central footprint.
std::shared_ptr< const PsfCandidate< PixelT > > ConstPtr
double getCandidateRating() const
Return Cell rating.
static bool getMaskBlends()
Get whether blends are masked.
void setPsfColorValue(double psfColorValue)
Set psf color value to use for PSF fit.
PsfCandidate(std::shared_ptr< afw::table::SourceRecord > const &source, std::shared_ptr< afw::image::Exposure< PixelT > const > parentExposure)
Construct a PsfCandidate from a specified source and image.
static void setBorderWidth(int border)
Set the number of pixels to ignore around the candidate image's edge.
double getVar() const
Return the variance in use when fitting this object.
void setPsfColorType(std::string psfColorType)
Set psf color type to use for PSF fit.
static int getBorderWidth()
Return the number of pixels being ignored around the candidate image's edge.
static void setPixelThreshold(float threshold)
Set threshold for rejecting pixels unconnected with the central footprint.
void setVar(double var)
Set the variance to use when fitting this object.
std::shared_ptr< afw::image::MaskedImage< PixelT > const > getMaskedImage() const
Return the image at the position of the Source, without any sub-pixel shifts to put the centre of the...
void setAmplitude(double amplitude)
Set the best-fit amplitude.
afw::image::MaskedImage< PixelT > MaskedImageT
std::string getPsfColorType() const
Return psf color type to use for PSF fit.
PsfCandidate(std::shared_ptr< afw::table::SourceRecord > const &source, std::shared_ptr< afw::image::Exposure< PixelT > const > parentExposure, double xCenter, double yCenter)
Construct a PsfCandidate from a specified source, image and xyCenter.
virtual ~PsfCandidate()
Destructor.
double getAmplitude() const
Return the best-fit amplitude.
static void setMaskBlends(bool doMaskBlends)
Set whether blends are masked.
std::shared_ptr< PsfCandidate< PixelT > > Ptr
std::shared_ptr< afw::table::SourceRecord > getSource() const
Return the original Source.
std::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.
double getPsfColorValue() const
Return psf color value to use for PSF fit.
Point< double, 2 > Point2D
bool PsfCandidate< PixelT >::_doMaskBlends
float PsfCandidate< PixelT >::_pixelThreshold
std::shared_ptr< PsfCandidate< PixelT > > makePsfCandidate(std::shared_ptr< afw::table::SourceRecord > const &source, std::shared_ptr< afw::image::Exposure< PixelT > > image)
Return a PsfCandidate of the right sort.
int PsfCandidate< PixelT >::_border
int PsfCandidate< PixelT >::_defaultWidth