Loading...
Searching...
No Matches
casacore::GaussianConvert Class Reference
coordinates package (libcasa_coordinates) » Coordinates_module

More...

`#include <GaussianConvert.h>`

## Public Member Functions

| GaussianConvert ()
| Default constructor.
| GaussianConvert (const CoordinateSystem &cSys, const Vector< uInt > &worldAxes)
| Constructor.
| ~GaussianConvert ()
| Destructor.
| GaussianConvert (const GaussianConvert &other)
| Copy constructor.
GaussianConvert & | operator= (const GaussianConvert &other)
| Assignment operator.
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.
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.
Bool | toPixel (Vector< Double > &pixel, const Vector< Quantum< Double > > &world)
| Convert location.
Bool | toWorld (Vector< Quantum< Double > > &world, const Vector< Double > &pixel)
String | errorMessage () const
| Recover error messages from the conversion functions.

## Private Member 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)

## Private Attributes

CoordinateSystem | itsCSys
Vector< uInt > | itsWorldAxes
String | itsErrorMessage
Bool | itsValid

## Detailed Description

Converts Gaussian parameters between pixel and world

### Intended use:

Public interface

### Prerequisite

- CoordinateSystem

### 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

- Position angle signs require more thinking in Casacore

Definition at line 70 of file GaussianConvert.h.

## Constructor & Destructor Documentation

## GaussianConvert() [1/3]

casacore::GaussianConvert::GaussianConvert | ( |  | ) |

Default constructor.

Referenced by GaussianConvert(), and operator=().

## GaussianConvert() [2/3]

casacore::GaussianConvert::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()

casacore::GaussianConvert::~GaussianConvert | ( |  | ) |

Destructor.

## GaussianConvert() [3/3]

casacore::GaussianConvert::GaussianConvert | ( | const GaussianConvert & | other | ) |

Copy constructor.

Uses copy semantics.

References GaussianConvert().

## Member Function Documentation

## checkCoordinateSystem()

void casacore::GaussianConvert::checkCoordinateSystem | ( |  | ) |

private

## checkWorldAxes()

void casacore::GaussianConvert::checkWorldAxes | ( |  | ) |

private

## convertAxes()

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

private

## errorMessage()

String casacore::GaussianConvert::errorMessage | ( |  | ) | const

inline

Recover error messages from the conversion functions.

Definition at line 127 of file GaussianConvert.h.

References itsErrorMessage.

## operator=()

GaussianConvert & casacore::GaussianConvert::operator= | ( | const GaussianConvert & | other | ) |

Assignment operator.

Uses copy semantics.

References GaussianConvert().

## positionAngleRange()

Double casacore::GaussianConvert::positionAngleRange | ( | Double | pa | ) |

private

References casacore::pa().

## setCoordinateSystem()

void casacore::GaussianConvert::setCoordinateSystem | ( | const CoordinateSystem & | cSys | ) |

(Re)set the coordinate system

## setWorldAxes()

void casacore::GaussianConvert::setWorldAxes | ( | const Vector< uInt > & | worldAxes | ) |

Re(set) the world axes.

## toPixel() [1/2]

Bool casacore::GaussianConvert::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.

## toPixel() [2/2]

Bool casacore::GaussianConvert::toPixel | ( | Vector< Double > & | pixel,
|  | const Vector< Quantum< Double > > & | world )

Convert location.

## toWorld() [1/2]

Bool casacore::GaussianConvert::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.

## toWorld() [2/2]

Bool casacore::GaussianConvert::toWorld | ( | Vector< Quantum< Double > > & | world,
|  | const Vector< Double > & | pixel )

## Member Data Documentation

## itsCSys

CoordinateSystem casacore::GaussianConvert::itsCSys

private

Definition at line 132 of file GaussianConvert.h.

## itsErrorMessage

String casacore::GaussianConvert::itsErrorMessage

private

Definition at line 134 of file GaussianConvert.h.

Referenced by errorMessage().

## itsValid

Bool casacore::GaussianConvert::itsValid

private

Definition at line 135 of file GaussianConvert.h.

## itsWorldAxes

Vector<uInt> casacore::GaussianConvert::itsWorldAxes

private

Definition at line 133 of file GaussianConvert.h.

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

- coordinates/Coordinates/GaussianConvert.h