29 #ifndef COMPONENTS_FLUX_H
30 #define COMPONENTS_FLUX_H
42 class RecordInterface;
43 template <
class Qtype>
class Quantum;
320 void scaleValue(
const T& factor0,
const T& factor1,
321 const T& factor2,
const T& factor3);
453 template<
class T>
class Flux
466 Flux(T i, T q, T u, T v);
619 void scaleValue(
const T& factor0,
const T& factor1,
620 const T& factor2,
const T& factor3);
734 #ifndef CASACORE_NO_AUTO_TEMPLATES
735 #include <components/ComponentModels/Flux.tcc>
736 #endif //# CASACORE_NO_AUTO_TEMPLATES
static void circularToLinear(casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > &out, const casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > &in)
This function converts between a casacore::Vector in Circular representation and one in Linear repres...
A 1-D Specialization of the Array class.
casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > itsVal
casacore::CountedPtr< FluxRep< T > > itsFluxPtr
ComponentType::Polarisation itsPol
ComponentType::Polarisation pol() const
These two functions return the current polarisation representation.
static void linearToStokes(casacore::Vector< T > &out, const casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > &in)
This function converts between a casacore::Vector in Linear representation and one in casacore::Stoke...
Flux()
The default constructor makes an object with I = 1, Q=U=V=0, a casacore::Stokes representation, and units of "Jy".
void convertUnit(const casacore::Unit &unit)
This function sets the current units to the supplied value and additionally converts the internal flu...
const casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > & value() const
This function returns the flux values.
FluxRep()
The default constructor makes an object with I = 1, Q=U=V=0, a casacore::Stokes representation, and units of "Jy".
casacore::Bool ok() const
casacore::Function which checks the internal data of this class for correct dimensionality and consis...
void scaleValue(const T &factor)
Scale the Flux value by the specified amount.
FluxRep< T > & operator=(const FluxRep< T > &other)
The assignment operator uses copy semantics.
void convertPol(ComponentType::Polarisation pol)
This function sets the current polarisation representation to the supplied value and additionally con...
Flux< T > & operator=(const Flux< T > &other)
The assignment operator uses reference semantics.
static casacore::Unit _getConversionUnit(const casacore::Unit &unit)
returns the conversion unit to which unit conforms.
A class that represents the Flux (copy semantics)
void setPol(ComponentType::Polarisation pol)
This function sets the current polarisation representation.
ComponentType::Polarisation pol() const
These two functions return the current polarisation representation.
void setErrors(const typename casacore::NumericTraits< T >::ConjugateType &error0, const typename casacore::NumericTraits< T >::ConjugateType &error1, const typename casacore::NumericTraits< T >::ConjugateType &error2, const typename casacore::NumericTraits< T >::ConjugateType &error3)
Set/get the errors in the flux.
StokesTypes
The Stokes types are defined by this enum.
static void circularToStokes(casacore::Vector< T > &out, const casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > &in)
This function converts between a casacore::Vector in Circular representation and one in casacore::Sto...
static const std::vector< casacore::Unit > _allowedUnits
static void stokesToLinear(casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > &out, const casacore::Vector< T > &in)
This function converts between a casacore::Vector in casacore::Stokes representation and one in Linea...
Char ConjugateType
Conjugate (real<->complex) type.
void setValue(T value)
This function sets the Flux values assuming the supplied value represents the casacore::Stokes I flux...
Referenced counted pointer for constant data.
A class that represents the Flux (reference semantics)
~FluxRep()
The destructor is trivial.
casacore::Bool fromRecord(casacore::String &errorMessage, const casacore::RecordInterface &record)
This functions convert between a casacore::RecordInterface and a FluxRep object and define how the Fl...
void setUnit(const casacore::Unit &unit)
This function sets the current unit.
void setPol(ComponentType::Polarisation pol)
This function sets the current polarisation representation.
casacore::Bool fromRecord(casacore::String &errorMessage, const casacore::RecordInterface &record)
This functions convert between a casacore::RecordInterface and a Flux object and define how the Flux ...
void convertUnit(const casacore::Unit &unit)
This function sets the current units to the supplied value and additionally converts the internal flu...
bool Bool
Define the standard types used by Casacore.
const casacore::Unit & unit() const
These two functions return the current units.
Quantities (i.e. dimensioned values)
casacore::Bool toRecord(casacore::String &errorMessage, casacore::RecordInterface &record) const
void scaleValue(const T &factor)
Scale the Flux value by the specified amount.
casacore::Bool toRecord(casacore::String &errorMessage, casacore::RecordInterface &record) const
const casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > & errors() const
static void stokesToCircular(casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > &out, const casacore::Vector< T > &in)
This function converts between a casacore::Vector in casacore::Stokes representation and one in Circu...
~Flux()
The destructor is trivial.
casacore::Bool ok() const
casacore::Function which checks the internal data of this class for correct dimensionality and consis...
const casacore::Unit & unit() const
These two functions return the current units.
Polarisation
The ways the Flux polarisation can be represented.
String: the storage and methods of handling collections of characters.
void setErrors(const typename casacore::NumericTraits< T >::ConjugateType &error0, const typename casacore::NumericTraits< T >::ConjugateType &error1, const typename casacore::NumericTraits< T >::ConjugateType &error2, const typename casacore::NumericTraits< T >::ConjugateType &error3)
Set/get the errors in the flux.
static void linearToCircular(casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > &out, const casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > &in)
This function converts between a casacore::Vector in Linear representation and one in Circular repres...
const casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > & errors() const
Flux< T > copy() const
Return a distinct copy of this flux.
Abstract base class for Record classes.
void convertPol(ComponentType::Polarisation pol)
This function sets the current polarisation representation to the supplied value and additionally con...
casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > itsErr
const casacore::Vector< typename casacore::NumericTraits< T >::ConjugateType > & value() const
This function returns the flux values.
void setValue(T value)
This function sets the Flux values assuming the supplied value represents the casacore::Stokes I flux...
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
void setUnit(const casacore::Unit &unit)
This function sets the current unit.