casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Static Private Attributes
casa::ConverterIntensity Class Reference

Converts intensity units: Jy/Beam, Kelvin, Fraction of Peak, etc. More...

#include <ConverterIntensity.h>

List of all members.

Public Member Functions

virtual ~ConverterIntensity ()

Static Public Member Functions

static bool isSupportedUnits (const QString &yUnit)
static void convert (Vector< float > &values, const Vector< float > hertzValues, const QString &oldUnits, const QString &newUnits, double maxValue, const QString &maxUnits)
 Hertz values are needed corresponding to the values for Jy/Beam Kelvin conversions only.
static void setSolidAngle (double angle)
 A solid angle in sr units is needed in order to do Kelvin conversions.
static void setBeamArea (double beamArea)
 Beam area in "sr".
static double convertJyBeams (const QString &sourceUnits, const QString &destUnits, double value)
 Converts between Jy/Beam units.
static double convertJY (const QString &oldUnits, const QString &newUnits, double value)
static double convertJYSR (const QString &oldUnits, const QString &newUnits, double value)
static double convertKelvin (const QString &oldUnits, const QString &newUnits, double value)

Static Public Attributes

static const QString FRACTION_OF_PEAK
static const QString KELVIN
static const QString JY_SR
static const QString JY_ARCSEC
static const QString JY_BEAM
static const QString JY
static const QString ADU
static const QString TIMES_PIXELS

Private Member Functions

 ConverterIntensity ()

Static Private Member Functions

static double percentToValue (double yValue, double maxValue)
static double valueToPercent (double yValue, double maxValue)
static double convertQuantity (double yValue, double frequencyValue, const QString &oldUnits, const QString &newUnits)
static void convertJansky (Vector< float > &values, const QString &oldUnits, const QString &newUnits)
static void convertKelvin (Vector< float > &values, const QString &oldUnits, const QString &newUnits)
static bool isJansky (const QString &units)
static bool isKelvin (const QString &units)
static double convertNonKelvinUnits (double yValue, const QString &oldUnits, const QString &newUnits)
static QString getJanskyBaseUnits (const QString &units)
static QString getKelvinBaseUnits (const QString &units)
static QString stripPixels (const QString &units)
static double beamToArcseconds (double yValue)
static double arcsecondsToBeam (double yValue)
static double srToArcseconds (double yValue)
static double arcsecondsToSr (double yValue)

Static Private Attributes

static const QList< QString > BEAM_UNITS
static const QList< QString > JY_UNITS
static const QList< QString > JY_SR_UNITS
static const QList< QString > KELVIN_UNITS
static double beamSolidAngle
static const double SPEED_LIGHT_FACTOR
static const double FREQUENCY_FACTOR
static const double ARCSECONDS_PER_STERADIAN
static double beamArea

Detailed Description

Converts intensity units: Jy/Beam, Kelvin, Fraction of Peak, etc.

Definition at line 39 of file ConverterIntensity.h.


Constructor & Destructor Documentation


Member Function Documentation

static double casa::ConverterIntensity::arcsecondsToBeam ( double  yValue) [static, private]
static double casa::ConverterIntensity::arcsecondsToSr ( double  yValue) [static, private]
static double casa::ConverterIntensity::beamToArcseconds ( double  yValue) [static, private]
static void casa::ConverterIntensity::convert ( Vector< float > &  values,
const Vector< float >  hertzValues,
const QString &  oldUnits,
const QString &  newUnits,
double  maxValue,
const QString &  maxUnits 
) [static]

Hertz values are needed corresponding to the values for Jy/Beam Kelvin conversions only.

Both oldUnits and newUnits refer to the old and new units of the values array. In order to do FRACTION_OF_PEAK conversions, a maximum value with corresponding maximum units must be passed in.

static void casa::ConverterIntensity::convertJansky ( Vector< float > &  values,
const QString &  oldUnits,
const QString &  newUnits 
) [static, private]
static double casa::ConverterIntensity::convertJY ( const QString &  oldUnits,
const QString &  newUnits,
double  value 
) [static]
static double casa::ConverterIntensity::convertJyBeams ( const QString &  sourceUnits,
const QString &  destUnits,
double  value 
) [static]

Converts between Jy/Beam units.

For example, MJy/Beam <-> Jy/Beam

static double casa::ConverterIntensity::convertJYSR ( const QString &  oldUnits,
const QString &  newUnits,
double  value 
) [static]
static double casa::ConverterIntensity::convertKelvin ( const QString &  oldUnits,
const QString &  newUnits,
double  value 
) [static]
static void casa::ConverterIntensity::convertKelvin ( Vector< float > &  values,
const QString &  oldUnits,
const QString &  newUnits 
) [static, private]
static double casa::ConverterIntensity::convertNonKelvinUnits ( double  yValue,
const QString &  oldUnits,
const QString &  newUnits 
) [static, private]
static double casa::ConverterIntensity::convertQuantity ( double  yValue,
double  frequencyValue,
const QString &  oldUnits,
const QString &  newUnits 
) [static, private]
static QString casa::ConverterIntensity::getJanskyBaseUnits ( const QString &  units) [static, private]
static QString casa::ConverterIntensity::getKelvinBaseUnits ( const QString &  units) [static, private]
static bool casa::ConverterIntensity::isJansky ( const QString &  units) [static, private]
static bool casa::ConverterIntensity::isKelvin ( const QString &  units) [static, private]
static bool casa::ConverterIntensity::isSupportedUnits ( const QString &  yUnit) [static]
static double casa::ConverterIntensity::percentToValue ( double  yValue,
double  maxValue 
) [static, private]
static void casa::ConverterIntensity::setBeamArea ( double  beamArea) [static]

Beam area in "sr".

Needed for Jy/beam <-> Jy/arcsec^2 and Jy/sr conversions.

static void casa::ConverterIntensity::setSolidAngle ( double  angle) [static]

A solid angle in sr units is needed in order to do Kelvin conversions.

static double casa::ConverterIntensity::srToArcseconds ( double  yValue) [static, private]
static QString casa::ConverterIntensity::stripPixels ( const QString &  units) [static, private]
static double casa::ConverterIntensity::valueToPercent ( double  yValue,
double  maxValue 
) [static, private]

Member Data Documentation

const QString casa::ConverterIntensity::ADU [static]

Definition at line 47 of file ConverterIntensity.h.

Definition at line 99 of file ConverterIntensity.h.

const QList<QString> casa::ConverterIntensity::BEAM_UNITS [static, private]

Definition at line 92 of file ConverterIntensity.h.

double casa::ConverterIntensity::beamArea [static, private]

Definition at line 100 of file ConverterIntensity.h.

double casa::ConverterIntensity::beamSolidAngle [static, private]

Definition at line 96 of file ConverterIntensity.h.

Definition at line 41 of file ConverterIntensity.h.

const double casa::ConverterIntensity::FREQUENCY_FACTOR [static, private]

Definition at line 98 of file ConverterIntensity.h.

const QString casa::ConverterIntensity::JY [static]

Definition at line 46 of file ConverterIntensity.h.

const QString casa::ConverterIntensity::JY_ARCSEC [static]

Definition at line 44 of file ConverterIntensity.h.

const QString casa::ConverterIntensity::JY_BEAM [static]

Definition at line 45 of file ConverterIntensity.h.

const QString casa::ConverterIntensity::JY_SR [static]

Definition at line 43 of file ConverterIntensity.h.

const QList<QString> casa::ConverterIntensity::JY_SR_UNITS [static, private]

Definition at line 94 of file ConverterIntensity.h.

const QList<QString> casa::ConverterIntensity::JY_UNITS [static, private]

Definition at line 93 of file ConverterIntensity.h.

const QString casa::ConverterIntensity::KELVIN [static]

Definition at line 42 of file ConverterIntensity.h.

const QList<QString> casa::ConverterIntensity::KELVIN_UNITS [static, private]

Definition at line 95 of file ConverterIntensity.h.

const double casa::ConverterIntensity::SPEED_LIGHT_FACTOR [static, private]

Definition at line 97 of file ConverterIntensity.h.

Definition at line 48 of file ConverterIntensity.h.


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