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)

class DDMapper

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 ()

Description

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

DDMapper ()

mask of affected correlations

virtual ~DDMapper ()

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.

uShort corrMask () const

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

Bool isValid ()

Tells if mapper is valid


class DDDummy : public DDMapper

Interface

DDDummy ()
~DDDummy ()
virtual void puke () const
virtual Bool reset ( const Vector<Int> & )
virtual Float map ( const Cube<Complex> &,uInt,uInt ) const

Description

Member Description

DDDummy ()

~DDDummy ()

virtual void puke () const

virtual Bool reset ( const Vector<Int> & )

virtual Float map ( const Cube<Complex> &,uInt,uInt ) const


class DDFunc : public DDMapper

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 )

Description

Member Description

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&)

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 DDMapper * getMapper ( String &desc,const Vector<String> &expr,Bool throw_excp=False )

Static function to map string expression into a DDMapper Possible syntax is: SUM DIFF SUM DIFF


class DDSumFunc : public DDFunc

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

Description

Member Description

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


class DDFuncSum : public DDSumFunc

Interface

DDFuncSum ( FuncSignature fsig,const String &corr1,const String &corr2 )
virtual ~DDFuncSum()
virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const

Description

Member Description

DDFuncSum ( FuncSignature fsig,const String &corr1,const String &corr2 )

virtual ~DDFuncSum()

virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const


class DDFuncDiff : public DDSumFunc

Interface

DDFuncDiff ( FuncSignature fsig,const String &corr1,const String &corr2 )
virtual ~DDFuncDiff()
virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const

Description

Member Description

DDFuncDiff ( FuncSignature fsig,const String &corr1,const String &corr2 )

virtual ~DDFuncDiff()

virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const


class DDDiffFunc : public DDSumFunc

Interface

DDDiffFunc ( FuncSignature fsig,const String &corr1,const String &corr2 )
virtual ~DDDiffFunc()
virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const

Description

Member Description

DDDiffFunc ( FuncSignature fsig,const String &corr1,const String &corr2 )

virtual ~DDDiffFunc()

virtual Float map ( const Cube<Complex> &vis,uInt ich,uInt irow ) const