Template Class GaussianFunction2¶
Defined in File FunctionLibrary.h
Inheritance Relationships¶
Base Type¶
public lsst::afw::math::Function2< ReturnT >
(Template Class Function2)
Class Documentation¶
-
template<typename
ReturnT
>
classGaussianFunction2
: public lsst::afw::math::Function2<ReturnT>¶ 2-dimensional Gaussian
f(x,y) = A e^((-pos1^2 / 2 sigma1^2) - (pos2^2 / 2 sigma2^2)) where:
A = 1 / (2 pi sigma1 sigma2)
pos1 = cos(angle) x + sin(angle) y
pos2 = -sin(angle) x + cos(angle) y coefficients c0 = sigma1, c1 = sigma2, c2 = angle
- Note
if sigma1 > sigma2 then angle is the angle of the major axis
Public Functions
-
GaussianFunction2
(double sigma1, double sigma2, double angle = 0.0)¶ - Parameters
sigma1
: sigma along the pos1 axissigma2
: sigma along the pos2 axisangle
: angle of pos1 axis, in rad (along x=0, y=pi/2)
Construct a 2-dimensional Gaussian function
-
GaussianFunction2
(GaussianFunction2 const&)¶
-
GaussianFunction2
(GaussianFunction2&&)¶
-
GaussianFunction2 &
operator=
(GaussianFunction2 const&)¶
-
GaussianFunction2 &
operator=
(GaussianFunction2&&)¶
-
~GaussianFunction2
()¶
-
std::shared_ptr<Function2<ReturnT>>
clone
() const¶ Return a pointer to a deep copy of this function
This function exists instead of a copy constructor so one can obtain a copy of an actual function instead of a useless copy of the base class.
Every non-virtual function must override this method.
- Return
a pointer to a deep copy of the function
-
ReturnT
operator()
(double x, double y) const¶
-
std::string
toString
(std::string const&) const¶ Return a string representation of the function
- Return
a string representation of the function
-
bool
isPersistable
() const¶ Return true if this particular object can be persisted using afw::table::io.
Protected Functions
-
std::string
getPersistenceName
() const¶ Return the unique name used to persist this object and look up its factory.
Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.
-
void
write
(afw::table::io::OutputArchiveHandle &handle) const¶ Write the object to one or more catalogs.
The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.
-
GaussianFunction2
()¶