SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
DownSampledImagePsf.h
Go to the documentation of this file.
1
17/*
18 * DownSampledImagePsf.h
19 *
20 * Created on: Nov 5, 2021
21 * Author: mschefer
22 */
23
24#ifndef _SEIMPLEMENTATION_IMAGE_DOWNSAMPLEDIMAGEPSF_H_
25#define _SEIMPLEMENTATION_IMAGE_DOWNSAMPLEDIMAGEPSF_H_
26
27#include "ElementsKernel/Exception.h"
28#include "AlexandriaKernel/memory_tools.h"
33
35
36namespace SourceXtractor {
37
38/*
39 * Encapsulates ImagePsf to provide a downscaled version for performance
40 */
42public:
43
45 double down_scaling=1.0, bool normalize_psf = true);
46
47 virtual ~DownSampledImagePsf() = default;
48
49 double getPixelScale() const;
50
51 std::size_t getSize() const;
54
55 // For ConvolutionContext optimization
58
59private:
62 bool m_normalize_psf { true };
63};
64
65} // end of SourceXtractor
66
67namespace ModelFitting {
68
72template<>
73struct PsfTraits<SourceXtractor::DownSampledImagePsf> {
75 static constexpr bool has_context = true;
76};
77
78} // end of ModelFitting
79
80#endif /* _SEIMPLEMENTATION_IMAGE_DOWNSAMPLEDIMAGEPSF_H_ */
const double pixel_scale
Definition TestImage.cpp:74
std::shared_ptr< ImagePsf > m_psf
DownSampledImagePsf(double pixel_scale, std::shared_ptr< VectorImage< SeFloat > > image, double down_scaling=1.0, bool normalize_psf=true)
std::shared_ptr< VectorImage< SourceXtractor::SeFloat > > getScaledKernel(SeFloat scale) const
std::unique_ptr< DFTConvolution< SeFloat >::ConvolutionContext > prepare(const std::shared_ptr< const Image< SeFloat > > &model_ptr) const
virtual ~DownSampledImagePsf()=default
void convolve(std::shared_ptr< WriteableImage< float > > image) const
Interface representing an image.
Definition Image.h:44
Image implementation which keeps the pixel values in memory.
Definition VectorImage.h:52
SeFloat32 SeFloat
Definition Types.h:32
typename std::unique_ptr< SourceXtractor::ImagePsf::ConvolutionContext > context_t