WireCellToolkit
Wire Cell Simulation, Signal Process and Reconstruction Toolki for Liquid Argon Detectors
WireCell::Array Namespace Reference

Typedefs

typedef Eigen::ArrayXf array_xf
 
typedef Eigen::ArrayXcf array_xc
 
typedef Eigen::Array< short, Eigen::Dynamic, Eigen::Dynamic > array_xxs
 A 16 bit short integer 2D array. More...
 
typedef Eigen::Array< int, Eigen::Dynamic, Eigen::Dynamic > array_xxi
 Integer. More...
 
typedef Eigen::Array< long, Eigen::Dynamic, Eigen::Dynamic > array_xxl
 Integer. More...
 
typedef Eigen::ArrayXXf array_xxf
 A real, 2D array. More...
 
typedef Eigen::ArrayXXcf array_xxc
 A complex, 2D array. More...
 

Functions

array_xxc dft (const array_xxf &arr)
 
array_xxf idft (const array_xxc &arr)
 
array_xxc dft_rc (const array_xxf &arr, int dim=0)
 
array_xxc dft_cc (const array_xxc &arr, int dim=1)
 
array_xxc idft_cc (const array_xxc &arr, int dim=1)
 
array_xxf idft_cr (const array_xxc &arr, int dim=0)
 
array_xxf deconv (const array_xxf &arr, const array_xxc &filter)
 

Typedef Documentation

◆ array_xc

typedef Eigen::ArrayXcf WireCell::Array::array_xc

Definition at line 42 of file Array.h.

◆ array_xf

typedef Eigen::ArrayXf WireCell::Array::array_xf

Definition at line 41 of file Array.h.

◆ array_xxc

typedef Eigen::ArrayXXcf WireCell::Array::array_xxc

A complex, 2D array.

Definition at line 57 of file Array.h.

◆ array_xxf

typedef Eigen::ArrayXXf WireCell::Array::array_xxf

A real, 2D array.

Definition at line 54 of file Array.h.

◆ array_xxi

typedef Eigen::Array<int, Eigen::Dynamic, Eigen::Dynamic> WireCell::Array::array_xxi

Integer.

Definition at line 48 of file Array.h.

◆ array_xxl

typedef Eigen::Array<long, Eigen::Dynamic, Eigen::Dynamic> WireCell::Array::array_xxl

Integer.

Definition at line 51 of file Array.h.

◆ array_xxs

typedef Eigen::Array<short, Eigen::Dynamic, Eigen::Dynamic> WireCell::Array::array_xxs

A 16 bit short integer 2D array.

Definition at line 45 of file Array.h.

Function Documentation

◆ deconv()

WireCell::Array::array_xxf WireCell::Array::deconv ( const array_xxf arr,
const array_xxc filter 
)

Perform 2D deconvolution.

This will perform a 2D forward DFT, do an element-by-element multiplication of that periodicity/frequency space matrix by the filter and then perform an 2D inverse DFT.

Definition at line 187 of file Array.cxx.

◆ dft()

WireCell::Array::array_xxc WireCell::Array::dft ( const array_xxf arr)

Perform full, 2D discrete Fourier transform on a real 2D array.

The full 2D DFT first performs a 1D DFT (real->complex) on each individual row and then a 1D DFT (complex->complex) on each resulting column.

const_shared_array_xxf arr = ...; const_shared_array_xxc spec = dft(*arr);

...

    const_shared_array_xxf arr2 = idft(*spec);

Definition at line 15 of file Array.cxx.

Here is the caller graph for this function:

◆ dft_cc()

WireCell::Array::array_xxc WireCell::Array::dft_cc ( const array_xxc arr,
int  dim = 1 
)

Definition at line 67 of file Array.cxx.

Here is the caller graph for this function:

◆ dft_rc()

WireCell::Array::array_xxc WireCell::Array::dft_rc ( const array_xxf arr,
int  dim = 0 
)

Partial, 1D DFT and inverse DFT along one dimension of an array. Each row is transformed if dim=0, each column if dim=1. The transfer is either real->complex (rc), complex->complex(cc) or complex->real(cr).

The full 2D DFT should be used unless an intermediate filter is required as it will avoid producing some temporaries.

Conceptually:

auto xxc = dft(xxf);

is equivalent to

auto tmp = dft_rc(xxf, 0); auto xxc = dft_cc(tmp, 1);

and:

auto xxf = idft(xxc)

is equivalent to:

auto tmp = idft_cc(xxc, 1);
auto xxf = idft_rc(tmp, 0);

Definition at line 40 of file Array.cxx.

Here is the caller graph for this function:

◆ idft()

WireCell::Array::array_xxf WireCell::Array::idft ( const array_xxc arr)

Definition at line 96 of file Array.cxx.

◆ idft_cc()

WireCell::Array::array_xxc WireCell::Array::idft_cc ( const array_xxc arr,
int  dim = 1 
)

Definition at line 125 of file Array.cxx.

Here is the caller graph for this function:

◆ idft_cr()

WireCell::Array::array_xxf WireCell::Array::idft_cr ( const array_xxc arr,
int  dim = 0 
)

Definition at line 153 of file Array.cxx.