GaussianConvert.h

Classes

GaussianConvert -- Converts Gaussian parameters between pixel and world (full description)

class GaussianConvert

Interface

Public Members
GaussianConvert ()
GaussianConvert (const CoordinateSystem& cSys, const Vector<uInt>& worldAxes)
~GaussianConvert ()
GaussianConvert(const GaussianConvert& other)
GaussianConvert& operator=(const GaussianConvert& other)
void setCoordinateSystem (const CoordinateSystem& cSys)
void setWorldAxes (const Vector<uInt>& worldAxes)
Bool toWorld(Quantum<Double>& majorAxisOut, Quantum<Double>& minorAxisOut, Quantum<Double>& positionAngleOut, Double majorAxisIn, Double minorAxisIn, const Quantum<Double>& positionAngleIn)
Bool toPixel(Double& majorAxisOut, Double& minorAxisOut, Quantum<Double>& positionAngleOut, const Quantum<Double>& majorAxisIn, const Quantum<Double>& minorAxisIn, const Quantum<Double>& positionAngleIn)
Bool toPixel(Vector<Double>& pixel, const Vector<Quantum<Double> >& world)
Bool toWorld(Vector<Quantum<Double> >& world, const Vector<Double>& pixel)
static Bool deconvolve(Quantum<Double>& majorAxisModel, Quantum<Double>& minorAxisModel, Quantum<Double>& positionAngleModel, const Quantum<Double>& majorAxisSource, const Quantum<Double>& minorAxisSource, const Quantum<Double>& positionAngleSource, const Quantum<Double>& majorAxisBeam, const Quantum<Double>& minorAxisBeam, const Quantum<Double>& positionAngleBeam)
String errorMessage() const
Private Members
void convertAxes (Double& minorAxisOut, Double& majorAxisOut, Quantum<Double>& positionAngleOut, Double minorAxisIn, Double majorAxisIn, const Quantum<Double>& positionAngleIn, const CoordinateSystem& cSys, String dir)
void checkCoordinateSystem()
void checkWorldAxes()
Double positionAngleRange(Double pa)

Description

Prerequisite

Synopsis

Converts Gaussian parameters between world and pixel. In the pixel coordinate system ([0,0] in center of image) the position angle is positive +y to -x. This is consistent with Gaussian2D. In the world coordinate system the pa is positive N through E

Example


 

To Do

Member Description

GaussianConvert ()

Default constructor

GaussianConvert (const CoordinateSystem& cSys, const Vector<uInt>& worldAxes)

Constructor. You specify which world axes (must be length 2) of the coordinate system are the relevant ones for your gaussian (x then y)

~GaussianConvert ()

Destructor

GaussianConvert(const GaussianConvert& other)

Copy constructor. Uses copy semantics.

GaussianConvert& operator=(const GaussianConvert& other)

Assignment operator. Uses copy semantics.

void setCoordinateSystem (const CoordinateSystem& cSys)

(Re)set the coordinate system

void setWorldAxes (const Vector<uInt>& worldAxes)

Re(set) the world axes

Bool toWorld(Quantum<Double>& majorAxisOut, Quantum<Double>& minorAxisOut, Quantum<Double>& positionAngleOut, Double majorAxisIn, Double minorAxisIn, const Quantum<Double>& positionAngleIn)

Convert Gaussian parameters from pixels to world. Returns False if it fails with an error message recoverable with function errorMessage. If you set the units of the output axis quanta they will be honoured, otherwise they will come out in the axis units of the coordinate system. For the output position angle, if the output units are not set, the units of the input position angle will be used.

Bool toPixel(Double& majorAxisOut, Double& minorAxisOut, Quantum<Double>& positionAngleOut, const Quantum<Double>& majorAxisIn, const Quantum<Double>& minorAxisIn, const Quantum<Double>& positionAngleIn)

Convert Gaussian parameters from world to pixel. Returns False if it fails with an error message recoverable with function errorMessage. For the output position angle, if the output units are not set, the units of the input position angle will be used.

Bool toPixel(Vector<Double>& pixel, const Vector<Quantum<Double> >& world)
Bool toWorld(Vector<Quantum<Double> >& world, const Vector<Double>& pixel)

Convert location

static Bool deconvolve(Quantum<Double>& majorAxisModel, Quantum<Double>& minorAxisModel, Quantum<Double>& positionAngleModel, const Quantum<Double>& majorAxisSource, const Quantum<Double>& minorAxisSource, const Quantum<Double>& positionAngleSource, const Quantum<Double>& majorAxisBeam, const Quantum<Double>& minorAxisBeam, const Quantum<Double>& positionAngleBeam)

Deconvolve the parameters of a source Gaussian from a beam Gaussian to give a model Gaussian. The return is True if the model appears to be a point source and the output model will be set to the parameters of the beam. If the units of the model are not given, they will be set to the units of the source.

String errorMessage() const

Recover error messages from the conversion functions

void convertAxes (Double& minorAxisOut, Double& majorAxisOut, Quantum<Double>& positionAngleOut, Double minorAxisIn, Double majorAxisIn, const Quantum<Double>& positionAngleIn, const CoordinateSystem& cSys, String dir)

void checkCoordinateSystem()

void checkWorldAxes()

Double positionAngleRange(Double pa)