SourceXtractorPlusPlus  0.16
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  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  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  PsfTraits< SourceXtractor::DownSampledImagePsf >
 
struct  ImageTraits< ImageInterfaceTypePtr >
 
struct  PsfTraits< SourceXtractor::ImagePsf >
 
struct  DataVsModelInputTraits< ImageInterfaceTypePtr >
 
struct  ImageTraits< WriteableInterfaceTypePtr >
 
class  OnnxCompactModel
 

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< LeastSquareEnginecreateGslEngine (unsigned max_iterations)
 
static LeastSquareSummary::StatusFlag getStatusFlag (int ret)
 
static std::map< std::string, LeastSquareEngineManager::FactoryMethod > & getEngineFactories ()
 
static std::shared_ptr< LeastSquareEnginecreateLevmarEngine (unsigned max_iterations)
 
static LeastSquareSummary::StatusFlag getStatusFlag (const std::array< double, 10 > &info, int res)
 
static double computeResidual (double current, double expected, double weight)
 

Variables

static LeastSquareEngineManager::StaticEngine gsl_engine {"gsl", createGslEngine}
 
static Elements::Logging logger = Elements::Logging::getLogger("LevmarEngine")
 
static LeastSquareEngineManager::StaticEngine levmar_engine {"levmar", createLevmarEngine}
 
static Elements::Logging logger = Elements::Logging::getLogger("ModelFitting")
 
static Elements::Logging logger = Elements::Logging::getLogger("ModelFitting")
 
static auto logger = Elements::Logging::getLogger("FlexibleModelFitting")
 

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::FlexibleModelFittingTask::computeProperties(), SourceXtractor::MoffatModelFittingTask::computeProperties(), and SourceXtractor::FlexibleModelFittingIterativeTask::fitSourcePrepareModels().

◆ 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(), and SourceXtractor::FlexibleModelFittingSersicModel::addForSource().

Here is the call graph for this function:

◆ createGslEngine()

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

Definition at line 34 of file GSLEngine.cpp.

◆ createLevmarEngine()

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

Definition at line 81 of file LevmarEngine.cpp.

◆ getEngineFactories()

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

◆ getStatusFlag() [1/2]

static LeastSquareSummary::StatusFlag ModelFitting::getStatusFlag ( const std::array< double, 10 > &  info,
int  res 
)
static

◆ getStatusFlag() [2/2]

static LeastSquareSummary::StatusFlag ModelFitting::getStatusFlag ( int  ret)
static

Variable Documentation

◆ gsl_engine

LeastSquareEngineManager::StaticEngine ModelFitting::gsl_engine {"gsl", createGslEngine}
static

Definition at line 38 of file GSLEngine.cpp.

◆ levmar_engine

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

Definition at line 85 of file LevmarEngine.cpp.

◆ logger [1/4]

Elements::Logging ModelFitting::logger = Elements::Logging::getLogger("LevmarEngine")
static

◆ logger [2/4]

Elements::Logging ModelFitting::logger = Elements::Logging::getLogger("ModelFitting")
static

Definition at line 34 of file ExpSigmoidConverter.cpp.

◆ logger [3/4]

Elements::Logging ModelFitting::logger = Elements::Logging::getLogger("ModelFitting")
static

Definition at line 34 of file SigmoidConverter.cpp.

◆ logger [4/4]

auto ModelFitting::logger = Elements::Logging::getLogger("FlexibleModelFitting")
static

Definition at line 22 of file OnnxCompactModel.h.