casa
$Rev:20696$
|
Parameter handling for 3 dimensional Gaussian class. More...
#include <Gaussian3DParam.h>
Public Types | |
enum | { H, CX, CY, CZ, AX, AY, AZ, THETA, PHI, NPAR } |
Parameter handling for the functional for 3D Gaussian Class. More... | |
Public Member Functions | |
Gaussian3DParam () | |
Constructs the three dimensional Gaussians. | |
Gaussian3DParam (Type height, const Vector< Type > ¢er, const Vector< Type > &width, Type theta, Type phi) | |
Gaussian3DParam (Type &height, Type &xCenter, Type &yCenter, Type &zCenter, Type &xWidth, Type &yWidth, Type &zWidth, Type &theta, Type &phi) | |
Gaussian3DParam (const Gaussian3DParam< Type > &other) | |
Copy construcor. | |
template<class W > | |
Gaussian3DParam (const Gaussian3DParam< W > &other) | |
Gaussian3DParam< Type > & | operator= (const Gaussian3DParam< Type > &other) |
Copy assignment. | |
virtual | ~Gaussian3DParam () |
Destructor. | |
virtual const String & | name () const |
Give name of function. | |
virtual uInt | ndim () const |
Return dimensionality. | |
Type | height () const |
Get or set the peak height of the Gaussian. | |
void | setHeight (const Type &height) |
Type | flux () const |
Get or set the total flux of the Gaussian. | |
void | setFlux (const Type &flux) |
Vector< Type > | center () const |
Get or cet the center coordinates of the Gaussian. | |
void | setCenter (const Vector< Type > ¢er) |
Type | xCenter () const |
void | setXcenter (const Type &xcenter) |
Type | yCenter () const |
void | setYcenter (const Type &ycenter) |
Type | zCenter () const |
void | setZcenter (const Type &zcenter) |
Vector< Type > | width () const |
Get or set the sigma-width of the Gaussian. | |
void | setWidth (const Vector< Type > &width) |
void | setXwidth (const Type &xwidth) |
Type | xWidth () const |
void | setYwidth (const Type &ywidth) |
Type | yWidth () const |
void | setZwidth (const Type &zwidth) |
Type | zWidth () const |
Type | theta () const |
Get or set the rotation angles of the Gaussian. | |
void | settheta (const Type &sT) |
Type | phi () const |
void | setphi (const Type &sP) |
Protected Member Functions | |
void | settrigvals () const |
Protected Attributes | |
Type | fwhm2int |
Type | stoT_p |
Type | stoP_p |
Type | cosT_p |
Type | sinT_p |
Type | cosP_p |
Type | sinP_p |
Type | cosTcosP_p |
Type | cosTsinP_p |
Type | sinTcosP_p |
Type | sinTsinP_p |
Parameter handling for 3 dimensional Gaussian class.
Internal
A 3-dimensional Gaussian's parameters.
A Gaussian3D
is described by a height, center, width, and two position angles.
The width of the Gaussian is now specified in terms of the full width at half maximum (FWHM), as with the 1D and 2D Gaussian functional classes.
The three axis values refer to the x, y, and z axes, and unlike with the 2D Gaussian any of the three axes may be the longest. Instead, the position angles are restricted: The first position angle, theta, is the longitudinal angle, referring to the rotation (counterclockwise) around the z-axis. The second, phi, is the latidudinal angle, referring to the rotation around the theta-rotated y axis. The domain of both angles is -pi/4 < A < pi/4. (Note that the use of theta and phi corresponds to the mathematical convention for these angles, not the physics convention.)
The parameter interface (see FunctionParam class), is used to provide an interface to the Fitting classes.
There are 9 parameters that are used to describe the Gaussian:
height
member function. xCenter
member function. yCenter
member function. zCenter
member function. An enumeration for the H
, CX
, CY
,CZ
, AX
, AY
, AZ
, THETA
, PHI
parameter index is provided, enabling the setting and reading of parameters with the []
operator. The mask()
methods can be used to check and set the parameter masks.
This class is in general used implicitly by the Gaussian3D
class only.
Tip: Other points to bear in mind when fitting this class to measured data are:
Gaussian3D<Double> g(9.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0); Vector<Double> x(3); x(0) = 1.0; x(1) = 0.5; x(2) = 0.0 cout << "g(" << x(0) << "," << x(1) << "," << x(2) << ")=" << g(x) << endl;
Definition at line 149 of file Gaussian3DParam.h.
anonymous enum |
Parameter handling for the functional for 3D Gaussian Class.
Similar to Gaussian2DParam, but width parameters are not adjusted for FWHM; they are identical to the parameters used in the function.
Position angle parameters are restricted to -PI/4 < angle < PI/4.
Definition at line 160 of file Gaussian3DParam.h.
casa::Gaussian3DParam< Type >::Gaussian3DParam | ( | ) |
Constructs the three dimensional Gaussians.
Defaults: height = 1, center = {0,0,0}, width = {1,1,1}, theta = phi = 0
casa::Gaussian3DParam< Type >::Gaussian3DParam | ( | Type | height, |
const Vector< Type > & | center, | ||
const Vector< Type > & | width, | ||
Type | theta, | ||
Type | phi | ||
) |
casa::Gaussian3DParam< Type >::Gaussian3DParam | ( | Type & | height, |
Type & | xCenter, | ||
Type & | yCenter, | ||
Type & | zCenter, | ||
Type & | xWidth, | ||
Type & | yWidth, | ||
Type & | zWidth, | ||
Type & | theta, | ||
Type & | phi | ||
) |
casa::Gaussian3DParam< Type >::Gaussian3DParam | ( | const Gaussian3DParam< Type > & | other | ) |
Copy construcor.
casa::Gaussian3DParam< Type >::Gaussian3DParam | ( | const Gaussian3DParam< W > & | other | ) | [inline] |
Definition at line 189 of file Gaussian3DParam.h.
virtual casa::Gaussian3DParam< Type >::~Gaussian3DParam | ( | ) | [virtual] |
Destructor.
Vector<Type> casa::Gaussian3DParam< Type >::center | ( | ) | const |
Get or cet the center coordinates of the Gaussian.
Type casa::Gaussian3DParam< Type >::flux | ( | ) | const |
Get or set the total flux of the Gaussian.
(Note: Since this changes the height of the Gaussian but not its width, always set the width before setting the flux.)
Type casa::Gaussian3DParam< Type >::height | ( | ) | const |
Get or set the peak height of the Gaussian.
virtual const String& casa::Gaussian3DParam< Type >::name | ( | ) | const [inline, virtual] |
Give name of function.
Reimplemented from casa::Function< Type >.
Definition at line 202 of file Gaussian3DParam.h.
virtual uInt casa::Gaussian3DParam< Type >::ndim | ( | ) | const [inline, virtual] |
Return dimensionality.
Implements casa::Function< Type >.
Definition at line 206 of file Gaussian3DParam.h.
Gaussian3DParam<Type>& casa::Gaussian3DParam< Type >::operator= | ( | const Gaussian3DParam< Type > & | other | ) |
Copy assignment.
Type casa::Gaussian3DParam< Type >::phi | ( | ) | const |
void casa::Gaussian3DParam< Type >::setCenter | ( | const Vector< Type > & | center | ) |
void casa::Gaussian3DParam< Type >::setFlux | ( | const Type & | flux | ) |
void casa::Gaussian3DParam< Type >::setHeight | ( | const Type & | height | ) |
void casa::Gaussian3DParam< Type >::setphi | ( | const Type & | sP | ) |
void casa::Gaussian3DParam< Type >::settheta | ( | const Type & | sT | ) |
void casa::Gaussian3DParam< Type >::settrigvals | ( | ) | const [protected] |
Referenced by casa::Gaussian3DParam< T >::Gaussian3DParam().
void casa::Gaussian3DParam< Type >::setWidth | ( | const Vector< Type > & | width | ) |
void casa::Gaussian3DParam< Type >::setXcenter | ( | const Type & | xcenter | ) |
void casa::Gaussian3DParam< Type >::setXwidth | ( | const Type & | xwidth | ) |
void casa::Gaussian3DParam< Type >::setYcenter | ( | const Type & | ycenter | ) |
void casa::Gaussian3DParam< Type >::setYwidth | ( | const Type & | ywidth | ) |
void casa::Gaussian3DParam< Type >::setZcenter | ( | const Type & | zcenter | ) |
void casa::Gaussian3DParam< Type >::setZwidth | ( | const Type & | zwidth | ) |
Type casa::Gaussian3DParam< Type >::theta | ( | ) | const |
Get or set the rotation angles of the Gaussian.
Theta=logitude, phi=latitude
Vector<Type> casa::Gaussian3DParam< Type >::width | ( | ) | const |
Get or set the sigma-width of the Gaussian.
Type casa::Gaussian3DParam< Type >::xCenter | ( | ) | const |
Type casa::Gaussian3DParam< Type >::xWidth | ( | ) | const |
Type casa::Gaussian3DParam< Type >::yCenter | ( | ) | const |
Type casa::Gaussian3DParam< Type >::yWidth | ( | ) | const |
Type casa::Gaussian3DParam< Type >::zCenter | ( | ) | const |
Type casa::Gaussian3DParam< Type >::zWidth | ( | ) | const |
Type casa::Gaussian3DParam< Type >::cosP_p [mutable, protected] |
Definition at line 264 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::cosT_p [mutable, protected] |
Definition at line 263 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::cosTcosP_p [mutable, protected] |
Definition at line 265 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::cosTsinP_p [mutable, protected] |
Definition at line 266 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::fwhm2int [protected] |
Definition at line 259 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::sinP_p [mutable, protected] |
Definition at line 264 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::sinT_p [mutable, protected] |
Definition at line 263 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::sinTcosP_p [mutable, protected] |
Definition at line 267 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::sinTsinP_p [mutable, protected] |
Definition at line 268 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::stoP_p [mutable, protected] |
Definition at line 262 of file Gaussian3DParam.h.
Type casa::Gaussian3DParam< Type >::stoT_p [mutable, protected] |
Definition at line 261 of file Gaussian3DParam.h.