SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
sourcextractor.config.model_fitting.Range Class Reference
Inheritance diagram for sourcextractor.config.model_fitting.Range:
Collaboration diagram for sourcextractor.config.model_fitting.Range:

Public Member Functions

 __init__ (self, limits, type)
 get_min (self, v, o)
 get_max (self, v, o)
 get_type (self)
 __str__ (self)

Private Attributes

 __limits = limits
 __callable = limits if hasattr(limits, '__call__') else lambda v, o: limits
 __type = type

Detailed Description

Limit, and normalize, the range of values for a model fitting parameter.


Parameters
----------
limits : a tuple (min, max), or a callable that receives a source, and returns a tuple (min, max)
type : RangeType

Notes
-----
RangeType.LINEAR
    Normalized to engine space using a sigmoid function

    .. math::

        engine = \ln \frac{world - min}{max-world} \\
        world = min + \frac{max - min}{1 + e^{engine}}

RangeType.EXPONENTIAL
    Normalized to engine space using an exponential sigmoid function

    .. math::

        engine = \ln \left( \frac{\ln(world/min)}{\ln(max /world)} \right) \\
        world = min * e^\frac{ \ln(max / min) }{ (1 + e^{-engine}) }

Definition at line 42 of file model_fitting.py.

Constructor & Destructor Documentation

◆ __init__()

sourcextractor.config.model_fitting.Range.__init__ ( self,
limits,
type )
Constructor.

Definition at line 72 of file model_fitting.py.

Member Function Documentation

◆ __str__()

sourcextractor.config.model_fitting.Range.__str__ ( self)
Returns
-------
str
    Human readable representation for the object

Definition at line 114 of file model_fitting.py.

References __limits, and __type.

◆ get_max()

sourcextractor.config.model_fitting.Range.get_max ( self,
v,
o )
Parameters
----------
v : initial value
o : object being fitted

Returns
-------
The maximum acceptable value for the range

Definition at line 93 of file model_fitting.py.

References __callable.

◆ get_min()

sourcextractor.config.model_fitting.Range.get_min ( self,
v,
o )
Parameters
----------
v : initial value
o : object being fitted

Returns
-------
The minimum acceptable value for the range

Definition at line 80 of file model_fitting.py.

References __callable.

◆ get_type()

sourcextractor.config.model_fitting.Range.get_type ( self)
Returns
-------
RangeType

Definition at line 106 of file model_fitting.py.

References __type.

Member Data Documentation

◆ __callable

sourcextractor.config.model_fitting.Range.__callable = limits if hasattr(limits, '__call__') else lambda v, o: limits
private

◆ __limits

sourcextractor.config.model_fitting.Range.__limits = limits
private

Definition at line 76 of file model_fitting.py.

Referenced by __str__().

◆ __type

sourcextractor.config.model_fitting.Range.__type = type
private

Definition at line 78 of file model_fitting.py.

Referenced by __str__(), and get_type().


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