MSSelUtil.h

Classes

MSSelUtil -- Helper class for MSFlagger with templated static function (full description)
MSSelUtil2 -- Helper class for MSSelector/DOms with templated static functions (full description)

template <class T> class MSSelUtil

Interface

Public Members
static Array<Float> diffData(const Array<T>& data, const Array<Bool>& flag, const Array<Bool>& flagRow, Int diffAxis, Int window, Bool doMedian=False)

Description

Synopsis

Helper class for MSFlagger/DOms with templated static function to difference data in one of two directions.

Member Description

static Array<Float> diffData(const Array<T>& data, const Array<Bool>& flag, const Array<Bool>& flagRow, Int diffAxis, Int window, Bool doMedian=False)

Compute the absolute difference of the data, subtracting either the previous value (window==2) or the average over the window (window>2). If doMedian==True is specified, the median difference over the window is returned for window>2. Takes flagging into account. diffAxis==2,3: row or time, diffAxis==1: channel Handles 3d and 4d data arrays.

template <class T> class MSSelUtil2

Interface

static void reorderData(Array<T>& data, const Vector<Int>& ifrSlot, Int nIfr, const Vector<Int>& timeSlot, Int nTime, const T& defvalue)
static void reorderData(Array<T>& data, const Matrix<Int>& rowIndex, Int nRow)
static void timeAverage(Array<Bool>& dataFlag, Array<T>& data, const Array<Bool>& flag, const Array<Float>& weight)

Description

Synopsis

Helper class for MSSelector/DOms with templated static functions to reorder data to include or exclude an interferometer axis and a function to time average data.

Member Description

static void reorderData(Array<T>& data, const Vector<Int>& ifrSlot, Int nIfr, const Vector<Int>& timeSlot, Int nTime, const T& defvalue)

reorder data from 3d (corr,chan,row) to 4d (corr,chan,ifr,time)

static void reorderData(Array<T>& data, const Matrix<Int>& rowIndex, Int nRow)

reorder data from 4d (corr,chan,ifr,time) to 3d (corr,chan,row)

static void timeAverage(Array<Bool>& dataFlag, Array<T>& data, const Array<Bool>& flag, const Array<Float>& weight)

average data (with flags & weights applied) over it's last axis (time or row), return in data (overwritten), dataFlag gives new flags.