SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
ModelFitting::ScaledModelComponent Class Reference

#include <ScaledModelComponent.h>

Inheritance diagram for ModelFitting::ScaledModelComponent:
Collaboration diagram for ModelFitting::ScaledModelComponent:

Public Member Functions

 ScaledModelComponent (std::unique_ptr< ModelComponent > component, std::shared_ptr< BasicParameter > x_scale, std::shared_ptr< BasicParameter > y_scale)
 ScaledModelComponent (ScaledModelComponent &&other)
virtual ~ScaledModelComponent ()
double getValue (double x, double y) override
void updateRasterizationInfo (double scale, double r_max) override
std::vector< ModelSamplegetSharpSampling () override
bool insideSharpRegion (double x, double y) override
Public Member Functions inherited from ModelFitting::ModelComponent
virtual ~ModelComponent ()=default

Private Attributes

std::unique_ptr< ModelComponentm_component
std::shared_ptr< BasicParameterm_x_scale
std::shared_ptr< BasicParameterm_y_scale

Additional Inherited Members

Public Types inherited from ModelFitting::ModelComponent
using ModelSample = std::tuple<double, double, double>

Detailed Description

Decorates a model component, scaling the axes by the given parameters.

For instance, for a model scaled by 2 in each axes, a call to getValue(1,1) is equivalent to a getValue(0.5, 0.5) to the underlying function.

Note
The integral value is not kept, but rather increased approximately by (x_scale * y_scale)

Definition at line 41 of file ScaledModelComponent.h.

Constructor & Destructor Documentation

◆ ScaledModelComponent() [1/2]

ModelFitting::ScaledModelComponent::ScaledModelComponent ( std::unique_ptr< ModelComponent > component,
std::shared_ptr< BasicParameter > x_scale,
std::shared_ptr< BasicParameter > y_scale )

Constructor

Parameters
componentThe component to be decorated. The ownership is acquired by the new object.
x_scaleScale for the X axis
y_scaleScale for the Y axis

Definition at line 28 of file ScaledModelComponent.cpp.

References m_component, m_x_scale, m_y_scale, and std::move().

Referenced by ScaledModelComponent().

Here is the call graph for this function:

◆ ScaledModelComponent() [2/2]

ModelFitting::ScaledModelComponent::ScaledModelComponent ( ScaledModelComponent && other)

Definition at line 34 of file ScaledModelComponent.cpp.

References m_component, m_x_scale, m_y_scale, std::move(), and ScaledModelComponent().

Here is the call graph for this function:

◆ ~ScaledModelComponent()

ModelFitting::ScaledModelComponent::~ScaledModelComponent ( )
virtualdefault

Member Function Documentation

◆ getSharpSampling()

auto ModelFitting::ScaledModelComponent::getSharpSampling ( )
overridevirtual

Returns the samples computed only for the sharp area, if any.

The returned value is the integrated value of the function for the area corresponding to the sample, not the value of the function. A pixel may be computed adding up the samples that fall within.

Implements ModelFitting::ModelComponent.

Definition at line 51 of file ScaledModelComponent.cpp.

References m_component, m_x_scale, and m_y_scale.

◆ getValue()

double ModelFitting::ScaledModelComponent::getValue ( double x,
double y )
overridevirtual

Returns the value of the point value of the model at the given coordinates.

Implements ModelFitting::ModelComponent.

Definition at line 41 of file ScaledModelComponent.cpp.

References m_component, m_x_scale, and m_y_scale.

◆ insideSharpRegion()

bool ModelFitting::ScaledModelComponent::insideSharpRegion ( double x,
double y )
overridevirtual

Returns true if the coordinates fall inside the sharp region

Implements ModelFitting::ModelComponent.

Definition at line 62 of file ScaledModelComponent.cpp.

References m_component, m_x_scale, and m_y_scale.

◆ updateRasterizationInfo()

void ModelFitting::ScaledModelComponent::updateRasterizationInfo ( double scale,
double r_max )
overridevirtual
Parameters
scale
r_max

Implements ModelFitting::ModelComponent.

Definition at line 45 of file ScaledModelComponent.cpp.

References m_component, m_x_scale, m_y_scale, and std::min().

Here is the call graph for this function:

Member Data Documentation

◆ m_component

std::unique_ptr<ModelComponent> ModelFitting::ScaledModelComponent::m_component
private

◆ m_x_scale

std::shared_ptr<BasicParameter> ModelFitting::ScaledModelComponent::m_x_scale
private

◆ m_y_scale

std::shared_ptr<BasicParameter> ModelFitting::ScaledModelComponent::m_y_scale
private

The documentation for this class was generated from the following files: