Namespace lsst::ip::diffim¶
-
namespace
diffim
Functions
-
lsst::afw::math::KernelList
makeDeltaFunctionBasisList
(int width, int height) Build a set of Delta Function basis kernels.
- Note
Total number of basis functions is width*height
- Parameters
width
: Width of basis set (cols)height
: Height of basis set (rows)
-
Eigen::MatrixXd
makeRegularizationMatrix
(lsst::daf::base::PropertySet const &ps) Build a regularization matrix for Delta function kernels.
- Note
Calls either makeForwardDifferenceMatrix or makeCentralDifferenceMatrix based on the PropertySet config.
- Parameters
ps
: PropertySet dictating which type of matrix to make
-
Eigen::MatrixXd
makeForwardDifferenceMatrix
(int width, int height, std::vector<int> const &orders, float borderPenalty, bool fitForBackground) Build a forward difference regularization matrix for Delta function kernels.
- Parameters
width
: Width of basis set you want to regularizeheight
: Height of basis set you want to regularizeorders
: Which derivatives to penalize (1,2,3)borderPenalty
: Amount of penalty (if any) to apply to border pixels; > 0fitForBackground
: Fit for differential background?
-
Eigen::MatrixXd
makeCentralDifferenceMatrix
(int width, int height, int stencil, float borderPenalty, bool fitForBackground) Build a central difference Laplacian regularization matrix for Delta function kernels.
- Parameters
width
: Width of basis set you want to regularizeheight
: Height of basis set you want to regularizestencil
: Which type of Laplacian approximation to useborderPenalty
: Amount of penalty (if any) to apply to border pixels; > 0fitForBackground
: Fit for differential background?
-
lsst::afw::math::KernelList
renormalizeKernelList
(lsst::afw::math::KernelList const &kernelListIn) Renormalize a list of basis kernels.
- Note
Renormalization means make Ksum_0 = 1.0, Ksum_i = 0.0, K_i.dot.K_i = 1.0
- Note
Output list of shared pointers to FixedKernels
- Note
Images are checked for their current kernel sum. If it is larger than std::numeric_limits<double>::epsilon(), the kernel is first divided by the kernel sum, giving it a kSum of 1.0, and then the first (normalized) component is subtracted from it, giving it a kSum of 0.0.
- Parameters
kernelListIn
: input list of basis kernels
-
lsst::afw::math::KernelList
makeAlardLuptonBasisList
(int halfWidth, int nGauss, std::vector<double> const &sigGauss, std::vector<int> const °Gauss) Build a set of Alard/Lupton basis kernels.
- Note
Should consider implementing as SeparableKernels for additional speed, but this will make the normalization a bit more complicated
- Parameters
halfWidth
: size is 2*N + 1nGauss
: number of gaussianssigGauss
: Widths of the Gaussian KernelsdegGauss
: Local spatial variation of bases
-
template<typename
PixelT
, typenameBackgroundT
>
lsst::afw::image::MaskedImage<PixelT>convolveAndSubtract
(lsst::afw::image::MaskedImage<PixelT> const &templateImage, lsst::afw::image::MaskedImage<PixelT> const &scienceMaskedImage, lsst::afw::math::Kernel const &convolutionKernel, BackgroundT background, bool invert = true) Execute fundamental task of convolving template and subtracting it from science image.
- Note
This version accepts a MaskedImage for the template
- Parameters
templateImage
: MaskedImage to apply convolutionKernel toscienceMaskedImage
: MaskedImage from which convolved templateImage is subtractedconvolutionKernel
: Kernel to apply to templateImagebackground
: Background scalar or function to subtract after convolutioninvert
: Invert the output difference image
-
template<typename
PixelT
, typenameBackgroundT
>
lsst::afw::image::MaskedImage<PixelT>convolveAndSubtract
(lsst::afw::image::Image<PixelT> const &templateImage, lsst::afw::image::MaskedImage<PixelT> const &scienceMaskedImage, lsst::afw::math::Kernel const &convolutionKernel, BackgroundT background, bool invert = true) Execute fundamental task of convolving template and subtracting it from science image.
- Note
This version accepts an Image for the template, and is thus faster during convolution
- Parameters
templateImage
: Image to apply convolutionKernel toscienceMaskedImage
: MaskedImage from which convolved templateImage is subtractedconvolutionKernel
: Kernel to apply to templateImagebackground
: Background scalar or function to subtract after convolutioninvert
: Invert the output difference image
-
template<typename
PixelT
>
Eigen::MatrixXdimageToEigenMatrix
(lsst::afw::image::Image<PixelT> const &img) Turns a 2-d Image into a 2-d Eigen Matrix.
- Parameters
img
: Image whose pixel values are read into an Eigen::MatrixXd
Return a KernelCandidate pointer of the right sort.
- Parameters
xCenter
: X-center of candidateyCenter
: Y-center of candidatetemplateMaskedImage
: Template subimagescienceMaskedImage
: Science image subimageps
: PropertySet for creation of rating
Return a KernelCandidate pointer of the right sort.
- Parameters
source
: afw::table::SourceRecord used to construct the KernelCandidatetemplateMaskedImage
: Template subimagescienceMaskedImage
: Science image subimageps
: PropertySet for creation of rating
-
class
DipoleCentroidAlgorithm
: public lsst::meas::base::SimpleAlgorithm - #include <DipoleAlgorithms.h>
Intermediate base class for algorithms that compute a centroid.
Subclassed by lsst::ip::diffim::NaiveDipoleCentroid
-
class
DipoleFluxAlgorithm
: public lsst::meas::base::SimpleAlgorithm - #include <DipoleAlgorithms.h>
Intermediate base class for algorithms that compute a flux.
Subclassed by lsst::ip::diffim::NaiveDipoleFlux, lsst::ip::diffim::PsfDipoleFlux
-
class
DipoleFluxControl
Subclassed by lsst::ip::diffim::PsfDipoleFluxControl
-
template<typename
MaskT
>
classFindSetBits
- #include <FindSetBits.h>
Class to accumulate Mask bits.
- Note
Search through a Mask for any set bits.
-
template<typename
PixelT
>
classImageStatistics
- #include <ImageStatistics.h>
Class to calculate difference image statistics.
- Note
Find mean and unbiased variance of pixel residuals in units of sqrt(variance)
-
template<typename
_PixelT
>
classKernelCandidate
: public lsst::afw::math::SpatialCellImageCandidate - #include <KernelCandidate.h>
Class stored in SpatialCells for spatial Kernel fitting.
- Note
KernelCandidate is a single Kernel derived around a source. We’ll assign them to sets of SpatialCells; these sets will then be used to fit a spatial model to the Kernel.
-
template<typename
PixelT
>
classKernelCandidateDetection
- #include <KernelCandidateDetection.h>
Search through images for Footprints with no masked pixels.
- Note
Runs detection on the template; searches through both images for masked pixels
- Parameters
templateMaskedImage
: MaskedImage that will be convolved with kernelscienceMaskedImage
: MaskedImage to subtract convolved template fromps
: PropertySet for operations; in particular object detection
-
class
KernelSolution
Subclassed by lsst::ip::diffim::SpatialKernelSolution, lsst::ip::diffim::StaticKernelSolution< InputT >
-
class
NaiveDipoleCentroid
: public lsst::ip::diffim::DipoleCentroidAlgorithm - #include <DipoleAlgorithms.h>
Intermediate base class for algorithms that compute a centroid.
-
class
PsfDipoleFlux
: public lsst::ip::diffim::DipoleFluxAlgorithm - #include <DipoleAlgorithms.h>
Implementation of Psf dipole flux
-
class
PsfDipoleFluxControl
: public lsst::ip::diffim::DipoleFluxControl - #include <DipoleAlgorithms.h>
C++ control object for PSF dipole fluxes.
-
template<typename
InputT
>
classStaticKernelSolution
: public lsst::ip::diffim::KernelSolution Subclassed by lsst::ip::diffim::MaskedKernelSolution< InputT >, lsst::ip::diffim::RegularizedKernelSolution< InputT >
-
namespace
detail
Functions
-
lsst::afw::math::KernelList