SourceXtractorPlusPlus  0.11
Please provide a description of the project.
Classes | Typedefs | Enumerations | Functions | Variables
ModelFitting Namespace Reference

Classes

class  AsinhChiSquareComparator
 Data vs model comparator which computes a modified \(\chi^2\) residual, using asinh. More...
 
class  AutoSharp
 
class  BasicParameter
 The parameter base class. More...
 
class  ChiSquareComparator
 Data vs model comparator which computes the \(\chi^2\) residual. More...
 
class  CircularlySymmetricModelComponent
 
class  CompactExponentialModel
 
class  CompactModelBase
 
class  CompactSersicModel
 
class  ConstantModel
 
class  CoordinateConverter
 The coordinate converter interface. More...
 
class  DataVsModelInputTraits
 Traits class the DataVsModelResiduals class uses for accessing its inputs. More...
 
struct  DataVsModelInputTraits< cv::Mat >
 
struct  DataVsModelInputTraits< ImageInterfaceTypePtr >
 
class  DataVsModelResiduals
 ResidualBlockProvider for weighted comparison between data and a model. 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  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  ExpSigmoidConverter
 CoordinateConverter implementation using the Exponantiated Sigmoid function. More...
 
class  ExtendedModel
 
class  FlattenedMoffatComponent
 
class  FrameModel
 
class  FrameModelPsfContainer
 
class  FrameModelPsfContextContainer
 
class  GSLEngine
 LeastSquareEngine implementation which uses the GNU Scientific Library. More...
 
class  GslVectorConstIterator
 
class  GslVectorIterator
 
struct  ImageTraits
 
struct  ImageTraits< cv::Mat >
 
struct  ImageTraits< ImageInterfaceTypePtr >
 
struct  ImageTraits< WriteableInterfaceTypePtr >
 
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...
 
class  ManualParameter
 
class  ModelComponent
 
class  NeutralConverter
 CoordinateConverter implementation which performs no conversion. More...
 
class  NormalizedConverter
 CoordinateConverter implementation which performs normalization. More...
 
class  NullPsf
 
class  OldSharp
 
class  OnlySmooth
 
class  OpenCvPsf
 
class  PointModel
 
class  PositionedModel
 
struct  PsfTraits
 
struct  PsfTraits< SourceXtractor::ImagePsf >
 
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  RotatedModelComponent
 
class  ScaledModelComponent
 
class  SersicProfile
 
class  SharpRegionManager
 
class  SigmoidConverter
 CoordinateConverter implementation using the sigmoid function. More...
 
class  TransformedModel
 
class  TransformModelComponent
 
class  WorldValueResidual
 ResidualBlockProvider implementation for adding a prior to a parameter world value. More...
 

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)
 
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< LeastSquareEnginecreateLevmarEngine (unsigned max_iterations)
 
static std::map< std::string, LeastSquareEngineManager::FactoryMethod > & getEngineFactories ()
 
static std::shared_ptr< LeastSquareEnginecreateLevmarEngine (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

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

◆ ImageInterfaceType

Definition at line 50 of file ImageInterfaceTraits.h.

◆ ImageInterfaceTypePtr

Definition at line 51 of file ImageInterfaceTraits.h.

◆ SersicModelComponent

Definition at line 73 of file CircularlySymmetricModelComponent.h.

◆ WriteableInterfaceType

Definition at line 52 of file ImageInterfaceTraits.h.

◆ WriteableInterfaceTypePtr

Definition at line 53 of file ImageInterfaceTraits.h.

Enumeration Type Documentation

◆ interpenum

Enumerator
INTERP_NEARESTNEIGHBOUR 
INTERP_BILINEAR 
INTERP_LANCZOS2 
INTERP_LANCZOS3 
INTERP_LANCZOS4 

Definition at line 47 of file ImageInterfaceTraits.h.

Function Documentation

◆ computeResidual() [1/2]

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

◆ computeResidual() [2/2]

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

Definition at line 31 of file WorldValueResidual.cpp.

◆ createDataVsModelResiduals()

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.

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

◆ createDependentParameter()

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:

◆ createLevmarEngine() [1/2]

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

Definition at line 34 of file GSLEngine.cpp.

◆ createLevmarEngine() [2/2]

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

Definition at line 34 of file LevmarEngine.cpp.

◆ getEngineFactories()

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

◆ operator*() [1/2]

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.

◆ operator*() [2/2]

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

◆ levmar_engine [1/2]

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

Definition at line 38 of file GSLEngine.cpp.

◆ levmar_engine [2/2]

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

Definition at line 38 of file LevmarEngine.cpp.