LatticeTwoPtCorr.h

Classes

LatticeTwoPtCorr -- Compute two point auto-correlation functions from a lattice (full description)

template <class T> class LatticeTwoPtCorr

Types

enum Method

UNDEFINED
Undefined
STRUCTUREFUNCTION
Structure Function
NMETHODS
nMethods

Interface

Public Members
LatticeTwoPtCorr()
LatticeTwoPtCorr (const LatticeTwoPtCorr<T>& other)
LatticeTwoPtCorr& operator=(const LatticeTwoPtCorr<T>& other)
~LatticeTwoPtCorr()
void autoCorrelation (MaskedLattice<T>& out, const MaskedLattice<T>& in, const IPosition& axes, IPosition method, Bool showProgress=True) const
static IPosition setUpShape (const IPosition& inShape, const IPosition& axes)
static Method fromString (const String& method)
static String toString (Method method)
Private Members
typedef T (LatticeTwoPtCorr<T>::*FuncPtr)(T d1, T d2) const
void autoCorrelation (MaskedLattice<T>& out, const MaskedLattice<T>& in, const IPosition& axes, FuncPtr, Bool showProgress) const
void check (LogIO& os, const MaskedLattice<T>& latOut, const MaskedLattice<T>& latIn, const IPosition& axes) const
T structureFunction (T d1, T d2) const

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Synopsis

This class allows you to compute two point correlation functions from lattices over planes of the specified two axes. At present, only autocorrelation is implemented and only the structure function is available.

The structure function is S(x,y) = < [lat(i,j) - lat(i+x,j+y)]**2 > where x and y are absolute integer shifts (or lags).

Example


 

  • Add additional algorithms other than the structure function
  • Allow cross correlation algorithms as well as autocorrelation

    Member Description

    enum Method

    LatticeTwoPtCorr()

    Default constructor

    LatticeTwoPtCorr (const LatticeTwoPtCorr<T>& other)

    Copy constructor (copy semantics)

    LatticeTwoPtCorr& operator=(const LatticeTwoPtCorr<T>& other)

    Assignment (copy semantics)

    ~LatticeTwoPtCorr()

    Destructor

    void autoCorrelation (MaskedLattice<T>& out, const MaskedLattice<T>& in, const IPosition& axes, IPosition method, Bool showProgress=True) const

    Compute specified autocorrelation function for the planes of the given TWO axes. If the output lattice has a mask, it will first be set to False (bad) and then any output pixel with some contributing values will be set to True (good).

    static IPosition setUpShape (const IPosition& inShape, const IPosition& axes)

    Helper function to provide output lattice shape give the input shape and the axes to find the structure function over.

    static Method fromString (const String& method)
    static String toString (Method method)

    Helper functions to convert method types to and from strings

    typedef T (LatticeTwoPtCorr<T>::*FuncPtr)(T d1, T d2) const

    Function Pointer typedef

    void autoCorrelation (MaskedLattice<T>& out, const MaskedLattice<T>& in, const IPosition& axes, FuncPtr, Bool showProgress) const

    Do the iteration work

    void check (LogIO& os, const MaskedLattice<T>& latOut, const MaskedLattice<T>& latIn, const IPosition& axes) const

    Check Output lattice shape

    T structureFunction (T d1, T d2) const

    Compute structure function