SourceXtractorPlusPlus  0.10
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
ModelFitting Namespace Reference

Namespaces

 _impl
 

Classes

class  AsinhChiSquareComparator
 Data vs model comparator which computes a modified $\chi^2$ residual, using asinh. More...
 
class  ChiSquareComparator
 Data vs model comparator which computes the $\chi^2$ residual. More...
 
class  DataVsModelInputTraits
 Traits class the DataVsModelResiduals class uses for accessing its inputs. More...
 
class  DataVsModelResiduals
 ResidualBlockProvider for weighted comparison between data and a model. More...
 
class  EngineParameterManager
 Class responsible for managing the parameters the least square engine minimizes. More...
 
class  EngineValueResidual
 ResidualBlockProvider implementation for adding a prior to a parameter engine value. More...
 
class  GSLEngine
 LeastSquareEngine implementation which uses the GNU Scientific Library. More...
 
class  LeastSquareEngine
 Interface of classes implementing least square minimization. More...
 
class  LeastSquareEngineManager
 Keep a registry of supported engines, and bridge their factory methods. More...
 
class  LeastSquareSummary
 Class containing the summary information of solving a least square minimization problem. More...
 
class  LevmarEngine
 LeastSquareEngine implementation which uses the levmar library. More...
 
class  LogChiSquareComparator
 Data vs model comparator which computes a modified $\chi^2$ residual. More...
 
struct  DataVsModelInputTraits< cv::Mat >
 
class  ResidualBlockProvider
 Interface of a class which can provide a block of residuals for least square minimization solving. More...
 
class  ResidualEstimator
 Provides to the LeastSquareEngine the residual values. More...
 
class  WorldValueResidual
 ResidualBlockProvider implementation for adding a prior to a parameter world value. More...
 
struct  ImageTraits
 
class  NullPsf
 
struct  ImageTraits< cv::Mat >
 
class  OpenCvPsf
 
struct  PsfTraits
 
class  AutoSharp
 
class  CircularlySymmetricModelComponent
 
class  CompactExponentialModel
 
class  CompactModelBase
 
class  CompactSersicModel
 
class  ConstantModel
 
class  ExtendedModel
 
class  FlattenedMoffatComponent
 
class  FrameModelPsfContainer
 
class  FrameModelPsfContextContainer
 
class  FrameModel
 
class  ModelComponent
 
class  OldSharp
 
class  OnlySmooth
 
class  PointModel
 
class  PositionedModel
 
class  RotatedModelComponent
 
class  ScaledModelComponent
 
class  SersicProfile
 
class  SharpRegionManager
 
class  TransformedModel
 
class  TransformModelComponent
 
class  BasicParameter
 The parameter base class. More...
 
class  CoordinateConverter
 The coordinate converter interface. More...
 
class  DependentParameter
 Implementation of a parameter depending on an arbitrary number of other parameters. More...
 
class  EngineParameter
 EngineParameter are those derived from the minimization process. More...
 
class  ExpSigmoidConverter
 CoordinateConverter implementation using the Exponantiated Sigmoid function. More...
 
class  ManualParameter
 
class  NeutralConverter
 CoordinateConverter implementation which performs no conversion. More...
 
class  NormalizedConverter
 CoordinateConverter implementation which performs normalization. More...
 
class  SigmoidConverter
 CoordinateConverter implementation using the sigmoid function. More...
 
class  GslVectorIterator
 
class  GslVectorConstIterator
 
struct  ImageTraits< ImageInterfaceTypePtr >
 
struct  PsfTraits< SourceXtractor::ImagePsf >
 
struct  DataVsModelInputTraits< ImageInterfaceTypePtr >
 
struct  ImageTraits< WriteableInterfaceTypePtr >
 

Typedefs

using SersicModelComponent = CircularlySymmetricModelComponent< SersicProfile >
 
using ImageInterfaceType = SourceXtractor::VectorImage< SourceXtractor::SeFloat >
 
using ImageInterfaceTypePtr = std::shared_ptr< ImageInterfaceType >
 
using WriteableInterfaceType = SourceXtractor::WriteableImage< SourceXtractor::SeFloat >
 
using WriteableInterfaceTypePtr = std::shared_ptr< WriteableInterfaceType >
 

Enumerations

enum  interpenum {
  INTERP_NEARESTNEIGHBOUR, INTERP_BILINEAR, INTERP_LANCZOS2, INTERP_LANCZOS3,
  INTERP_LANCZOS4
}
 

Functions

template<typename DataType , typename ModelType , typename WeightType , typename Comparator >
std::unique_ptr
< DataVsModelResiduals
< typename
std::remove_reference
< DataType >::type, typename
std::remove_reference
< ModelType >::type, typename
std::remove_reference
< WeightType >::type, typename
std::remove_reference
< Comparator >::type > > 
createDataVsModelResiduals (DataType &&data, ModelType &&model, WeightType &&weight, Comparator &&comparator)
 
 m_x_scale (x_scale)
 
 m_y_scale (y_scale)
 
 m_rotation (rotation)
 
template<typename... Parameters>
std::shared_ptr
< DependentParameter
< Parameters...> > 
createDependentParameter (typename DependentParameter< Parameters...>::ValueCalculator value_calculator, Parameters...parameters)
 
static double computeResidual (double current, double expected, double weight)
 
static std::shared_ptr
< LeastSquareEngine
createLevmarEngine (unsigned max_iterations)
 
static std::map< std::string,
LeastSquareEngineManager::FactoryMethod > & 
getEngineFactories ()
 
static std::shared_ptr
< LeastSquareEngine
createLevmarEngine (unsigned max_iterations)
 
static double computeResidual (double current, double expected, double weight)
 
template<typename T >
auto operator* (T v, const ImageTraits< WriteableInterfaceTypePtr >::WriteableSetter &setter) -> decltype(v *WriteableInterfaceType::PixelType(0))
 
template<typename T >
auto operator* (const ImageTraits< WriteableInterfaceTypePtr >::WriteableSetter &setter, T v) -> decltype(WriteableInterfaceType::PixelType(0)*v)
 

Variables

 x_scale
 
 y_scale
 
 rotation
 
 width
 
 height
 
 x
 
 y
 
static
LeastSquareEngineManager::StaticEngine 
levmar_engine {"gsl", createLevmarEngine}
 
static
LeastSquareEngineManager::StaticEngine 
levmar_engine {"levmar", createLevmarEngine}
 

Detailed Description

Copyright © 2019 Université de Genève, LMU Munich - Faculty of Physics, IAP-CNRS/Sorbonne Université

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Typedef Documentation

Definition at line 50 of file ImageInterfaceTraits.h.

Definition at line 51 of file ImageInterfaceTraits.h.

Definition at line 73 of file CircularlySymmetricModelComponent.h.

Definition at line 52 of file ImageInterfaceTraits.h.

Definition at line 53 of file ImageInterfaceTraits.h.

Enumeration Type Documentation

Enumerator
INTERP_NEARESTNEIGHBOUR 
INTERP_BILINEAR 
INTERP_LANCZOS2 
INTERP_LANCZOS3 
INTERP_LANCZOS4 

Definition at line 47 of file ImageInterfaceTraits.h.

Function Documentation

static double ModelFitting::computeResidual ( double  current,
double  expected,
double  weight 
)
static
static double ModelFitting::computeResidual ( double  current,
double  expected,
double  weight 
)
static

Definition at line 31 of file WorldValueResidual.cpp.

template<typename DataType , typename ModelType , typename WeightType , typename Comparator >
std::unique_ptr< DataVsModelResiduals< typename std::remove_reference< DataType >::type, typename std::remove_reference< ModelType >::type, typename std::remove_reference< WeightType >::type, typename std::remove_reference< Comparator >::type > > ModelFitting::createDataVsModelResiduals ( DataType &&  data,
ModelType &&  model,
WeightType &&  weight,
Comparator &&  comparator 
)

Factory method for creating DataVsModelResiduals. This method exists to avoid typing the template types required when calling the DataVsModelResiduals constructor (because C++ cannot infer them from the parameters). Note that this method uses perfect forwarding, so its calls, with respect with rvalue - lvalue logic, have the same behavior with direct calls of the constructor.

Don't get scared by the template parameters. They are all inferred from the arguments of the method and are completely transparent when calling the factory.

Definition at line 116 of file DataVsModelResiduals.icpp.

Referenced by SourceXtractor::MoffatModelFittingTask::computeProperties(), SourceXtractor::FlexibleModelFittingTask::computeProperties(), and main().

template<typename... Parameters>
std::shared_ptr<DependentParameter<Parameters...> > ModelFitting::createDependentParameter ( typename DependentParameter< Parameters...>::ValueCalculator  value_calculator,
Parameters...  parameters 
)

Definition at line 131 of file DependentParameter.h.

References std::make_shared().

Referenced by SourceXtractor::FlexibleModelFittingPointModel::addForSource(), SourceXtractor::FlexibleModelFittingExponentialModel::addForSource(), SourceXtractor::FlexibleModelFittingDevaucouleursModel::addForSource(), SourceXtractor::FlexibleModelFittingSersicModel::addForSource(), and main().

Here is the call graph for this function:

static std::shared_ptr<LeastSquareEngine> ModelFitting::createLevmarEngine ( unsigned  max_iterations)
static

Definition at line 34 of file LevmarEngine.cpp.

static std::shared_ptr<LeastSquareEngine> ModelFitting::createLevmarEngine ( unsigned  max_iterations)
static

Definition at line 34 of file GSLEngine.cpp.

static std::map<std::string, LeastSquareEngineManager::FactoryMethod>& ModelFitting::getEngineFactories ( )
static
ModelFitting::m_rotation ( rotation  )

Definition at line 17 of file CompactModelBase.icpp.

References SExtractor::Mat22::GetInverse(), SExtractor::Mat22::GetTranspose(), and SourceXtractor::transform().

Referenced by ModelFitting::CompactModelBase< ImageType >::getCombinedTransform(), and DummyWCS::getFitsHeaders().

Here is the call graph for this function:

ModelFitting::m_x_scale ( x_scale  )
ModelFitting::m_y_scale ( y_scale  )
template<typename T >
auto ModelFitting::operator* ( v,
const ImageTraits< WriteableInterfaceTypePtr >::WriteableSetter &  setter 
) -> decltype(v * WriteableInterfaceType::PixelType( 0))

Definition at line 223 of file WriteableImageInterfaceTraits.h.

template<typename T >
auto ModelFitting::operator* ( const ImageTraits< WriteableInterfaceTypePtr >::WriteableSetter &  setter,
v 
) -> decltype( WriteableInterfaceType::PixelType(0) * v)

Definition at line 230 of file WriteableImageInterfaceTraits.h.

Variable Documentation

ModelFitting::height

Definition at line 16 of file CompactModelBase.icpp.

Referenced by ModelFitting::_impl::addExtendedModels(), ModelFitting::ImageTraits< ImageInterfaceTypePtr >::addImageToImage(), ModelFitting::_impl::addSharp(), ModelFitting::_impl::addSmooth(), SourceXtractor::MeasurementFrameGroupRectangleTask::computeProperties(), SourceXtractor::MeasurementFrameRectangleTask::computeProperties(), SourceXtractor::DetectionFrameGroupStampTask::computeProperties(), SourceXtractor::DetectionFrameSourceStampTask::computeProperties(), SourceXtractor::ImageChunk< T >::create(), SourceXtractor::FFT< T >::createForwardPlan(), SourceXtractor::FFT< T >::createInversePlan(), SourceXtractor::FitsImageSource< T >::FitsImageSource(), SourceXtractor::BgConvolutionImageSource::generateTile(), SourceXtractor::InterpolatedImageSource< T >::generateTile(), SourceXtractor::BgDFTConvolutionImageSource::generateTile(), SourceXtractor::WeightMapImageSource::generateTile(), SourceXtractor::ProcessedImage< T, P >::getChunk(), SourceXtractor::ProcessingImageSource< DetectionImage::PixelType >::getImageTile(), SourceXtractor::FitsImageSource< T >::getImageTile(), SourceXtractor::TypedSplineModelWrapper< T >::getImageTile(), SourceXtractor::CheckImages::getWriteableCheckImage(), main(), SourceXtractor::FitsWriter::newImage(), SourceXtractor::FitsWriter::newTemporaryImage(), readFrames(), readImage(), SourceXtractor::readPsfEx(), SourceXtractor::FitsImageSource< T >::saveTile(), and SourceXtractor::UniversalImageChunk< T >::UniversalImageChunk().

LeastSquareEngineManager::StaticEngine ModelFitting::levmar_engine {"gsl", createLevmarEngine}
static

Definition at line 38 of file GSLEngine.cpp.

LeastSquareEngineManager::StaticEngine ModelFitting::levmar_engine {"levmar", createLevmarEngine}
static

Definition at line 38 of file LevmarEngine.cpp.

ModelFitting::rotation
ModelFitting::width

Definition at line 16 of file CompactModelBase.icpp.

Referenced by ModelFitting::_impl::addExtendedModels(), ModelFitting::ImageTraits< ImageInterfaceTypePtr >::addImageToImage(), ModelFitting::_impl::addSharp(), ModelFitting::_impl::addSmooth(), SourceXtractor::MeasurementFrameGroupRectangleTask::computeProperties(), SourceXtractor::MeasurementFrameRectangleTask::computeProperties(), SourceXtractor::DetectionFrameGroupStampTask::computeProperties(), SourceXtractor::DetectionFrameSourceStampTask::computeProperties(), SourceXtractor::ImageChunk< T >::create(), SourceXtractor::FFT< T >::createForwardPlan(), SourceXtractor::FFT< T >::createInversePlan(), SourceXtractor::FitsImageSource< T >::FitsImageSource(), SourceXtractor::BgConvolutionImageSource::generateTile(), SourceXtractor::InterpolatedImageSource< T >::generateTile(), SourceXtractor::BgDFTConvolutionImageSource::generateTile(), SourceXtractor::WeightMapImageSource::generateTile(), SourceXtractor::ProcessedImage< T, P >::getChunk(), SourceXtractor::ProcessingImageSource< DetectionImage::PixelType >::getImageTile(), SourceXtractor::FitsImageSource< T >::getImageTile(), SourceXtractor::TypedSplineModelWrapper< T >::getImageTile(), SourceXtractor::CheckImages::getWriteableCheckImage(), SourceXtractor::Lutz::labelImage(), main(), SourceXtractor::FitsWriter::newImage(), SourceXtractor::FitsWriter::newTemporaryImage(), readFrames(), readImage(), SourceXtractor::readPsfEx(), SourceXtractor::FitsImageSource< T >::saveTile(), and SourceXtractor::UniversalImageChunk< T >::UniversalImageChunk().

ModelFitting::x
ModelFitting::x_scale
ModelFitting::y
ModelFitting::y_scale