DDMapper.h
Classes
- DDMapper -- Abstract Derived Data Mapper class (full description)
- DDDummy -- DDDummy: dummy mapper, throws an excpetion if any methods are called (full description)
- DDFunc -- DDFunc: maps correlation A into func(A) (full description)
- DDSumFunc -- DDSumFunc: maps two correlations A and B into func(A)+func(B) (full description)
- DDFuncSum -- DDFuncSum: maps two correlations A and B into func(A+B) (full description)
- DDFuncDiff -- DDFuncDiff: maps two correlations A and B into func(A-B) (full description)
- DDDiffFunc -- DDDiffFunc: maps two correlations A and B into func(A)-func(B) (full description)
Interface
- Public Members
- DDMapper ()
- virtual ~DDMapper ()
- virtual Bool reset ( const Vector<Int> &corr ) =0
- virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const =0
- uShort corrMask () const
- Bool masked (uInt icorr) const
- Bool isValid ()
Synopsis
The DDMapper class defines an interface for mapping complex visibilities
into Float derived values. DDMappers are used by several flagging
agents.
Motivation
A lot of algorithms are expressed in terms of some real value
derived from a set of visibilities (i.e., |XX|, |XX|-|YY|, etc.). The
DDMapper hierarchy provides a uniform interface for deriving such values.
To Do
Member Description
mask of affected correlations
virtual Bool reset ( const Vector<Int> &corr ) =0
Given a vector of correlation types, recomputes internal indices.
returns True if all indices were found successfully.
virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const =0
Maps a slice of visibilities at (*,ich,irow) from the given
viscube into a the derived value.
Returns the "mask" of correlations which are used by this mapper.
by this mapper. Bit "i" is set if corr. "i" is used.
Bool masked (uInt icorr) const
Returns True if given correlations is masked
Tells if mapper is valid
Interface
- DDDummy ()
- ~DDDummy ()
- virtual void puke () const
- virtual Bool reset ( const Vector<Int> & )
- virtual Float map ( const Cube<Complex> &,uInt,uInt ) const
Member Description
virtual void puke () const
virtual Bool reset ( const Vector<Int> & )
virtual Float map ( const Cube<Complex> &,uInt,uInt ) const
Interface
- typedef Float (*FuncSignature)(const Complex &)
- DDFunc ( FuncSignature fsig,const String &corr )
- ~DDFunc()
- virtual Bool reset ( const Vector<Int> &corr )
- virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const
- static Float real (const Complex&)
- static Float imag (const Complex&)
- static FuncSignature getFunction( const String &name )
- static DDMapper * getMapper ( String &desc,const Vector<String> &expr,Bool throw_excp=False )
Member Description
typedef Float (*FuncSignature)(const Complex &)
DDFunc ( FuncSignature fsig,const String &corr )
virtual Bool reset ( const Vector<Int> &corr )
virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const
static Float real (const Complex&)
Define these functions, because using std::real/imag in getFunction
matches multiple functions.
static Float imag (const Complex&)
static FuncSignature getFunction( const String &name )
Static function to map a function name into a function pointer
Functions currently recognized: ABS ARG NORM RE IM
Static function to map string expression into a DDMapper
Possible syntax is:
SUM
DIFF
SUM
DIFF
Interface
- DDSumFunc ( FuncSignature fsig,const String &corr1,const String &corr2 )
- virtual ~DDSumFunc()
- virtual Bool reset ( const Vector<Int> &corr )
- virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const
Member Description
DDSumFunc ( FuncSignature fsig,const String &corr1,const String &corr2 )
virtual Bool reset ( const Vector<Int> &corr )
virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const
Interface
- DDFuncSum ( FuncSignature fsig,const String &corr1,const String &corr2 )
- virtual ~DDFuncSum()
- virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const
Member Description
DDFuncSum ( FuncSignature fsig,const String &corr1,const String &corr2 )
virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const
Interface
- DDFuncDiff ( FuncSignature fsig,const String &corr1,const String &corr2 )
- virtual ~DDFuncDiff()
- virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const
Member Description
DDFuncDiff ( FuncSignature fsig,const String &corr1,const String &corr2 )
virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const
Interface
- DDDiffFunc ( FuncSignature fsig,const String &corr1,const String &corr2 )
- virtual ~DDDiffFunc()
- virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const
Member Description
DDDiffFunc ( FuncSignature fsig,const String &corr1,const String &corr2 )
virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const