Public Member Functions

ComplexData< N_rank > Class Template Reference
[Classes of the ODIN data processing framework (odindata library)]

#include <complexdata.h>

Inheritance diagram for ComplexData< N_rank >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ComplexData ()
 ComplexData (const TinyVector< int, N_rank > &dimvec)
 ComplexData (int extent1)
 ComplexData (const ComplexData< N_rank > &cd)
 ComplexData (const Data< STD_complex, N_rank > &a)
template<class T_expr >
 ComplexData (BZ_ETPARM(_bz_ArrayExpr< T_expr >) expr)
ComplexData< N_rank > & operator= (const ComplexData< N_rank > &d)
ComplexData< N_rank > & operator= (const Array< STD_complex, N_rank > &a)
ComplexData< N_rank > & operator= (const STD_complex &val)
template<class T_expr >
ComplexData< N_rank > & operator= (BZ_ETPARM(_bz_ArrayExpr< T_expr >) expr)
void fft (bool forward=true, bool cyclic_shift=true)
void partial_fft (const TinyVector< bool, N_rank > &do_fft, bool forward=true, bool cyclic_shift=true)
void modulate_offset (const TinyVector< float, N_rank > &rel_offset)
void shift_subpixel (const TinyVector< float, N_rank > &shiftvec)
Data< float, N_rank > phasemap () const

Detailed Description

template<int N_rank>
class ComplexData< N_rank >

This template class holds multidimensional complex data, most suitable for NMR signal. In addition to functionality provided by the Data Array class, it offers advanced numerical routines (FFT) and block-wise processing of large data files.

Definition at line 43 of file complexdata.h.


Constructor & Destructor Documentation

template<int N_rank>
ComplexData< N_rank >::ComplexData (  )  [inline]

Default constructor

Definition at line 50 of file complexdata.h.

template<int N_rank>
ComplexData< N_rank >::ComplexData ( const TinyVector< int, N_rank > &  dimvec  )  [inline]

Constructs a complex array with the given dimensionality

Definition at line 56 of file complexdata.h.

template<int N_rank>
ComplexData< N_rank >::ComplexData ( int  extent1  )  [inline]

Constructor with a variable list of arguments to specify the extend in each dimension, the number of args must match N_rank

Definition at line 64 of file complexdata.h.

template<int N_rank>
ComplexData< N_rank >::ComplexData ( const ComplexData< N_rank > &  cd  )  [inline]

Copy constructor

Definition at line 78 of file complexdata.h.

template<int N_rank>
ComplexData< N_rank >::ComplexData ( const Data< STD_complex, N_rank > &  a  )  [inline]

Copy constructor from Data

Definition at line 84 of file complexdata.h.

template<int N_rank>
template<class T_expr >
ComplexData< N_rank >::ComplexData ( BZ_ETPARM(_bz_ArrayExpr< T_expr >)  expr  )  [inline]

Constructor from expression template

Definition at line 91 of file complexdata.h.


Member Function Documentation

template<int N_rank>
void ComplexData< N_rank >::fft ( bool  forward = true,
bool  cyclic_shift = true 
)

Performs an in-place FFT with the following properties:

  • forward: Whether to do a forward (true) or backward (false) FFT
  • cyclic_shift: Whether to shift data cyclically so that zero frequency is in the middle of the array after FFT

Definition at line 178 of file complexdata.h.

template<int N_rank>
void ComplexData< N_rank >::modulate_offset ( const TinyVector< float, N_rank > &  rel_offset  ) 

Modulate a phase gradient onto the array so that after FFT, the data will be shifted in each dimension by 'rel_offset' which is given as a fraction relative to the full size, i.e. a value of 0.5 shifts the array by half its size.

Definition at line 276 of file complexdata.h.

template<int N_rank>
ComplexData<N_rank>& ComplexData< N_rank >::operator= ( const ComplexData< N_rank > &  d  )  [inline]

Assignment operator

Definition at line 97 of file complexdata.h.

template<int N_rank>
template<class T_expr >
ComplexData<N_rank>& ComplexData< N_rank >::operator= ( BZ_ETPARM(_bz_ArrayExpr< T_expr >)  expr  )  [inline]

Assignment operator for expression templates

Reimplemented from Data< STD_complex, N_rank >.

Definition at line 116 of file complexdata.h.

template<int N_rank>
ComplexData<N_rank>& ComplexData< N_rank >::operator= ( const Array< STD_complex, N_rank > &  a  )  [inline]

Assignment operator from Blitz::Array

Reimplemented from Data< STD_complex, N_rank >.

Definition at line 103 of file complexdata.h.

template<int N_rank>
ComplexData<N_rank>& ComplexData< N_rank >::operator= ( const STD_complex &  val  )  [inline]

Fills all elements with 'val'

Reimplemented from Data< STD_complex, N_rank >.

Definition at line 109 of file complexdata.h.

template<int N_rank>
void ComplexData< N_rank >::partial_fft ( const TinyVector< bool, N_rank > &  do_fft,
bool  forward = true,
bool  cyclic_shift = true 
)

Performs an in-place FFT over a partial number of dimensions with the following properties:

  • do_fft: A vector where the index should be set to 'true' if the FFT should be performed for the corresponding dimension
  • forward: Whether to do a forward (true) or backward (false) FFT
  • cyclic_shift: Whether to shift data cyclically so that zero frequency is in the middle of the array after FFT

Definition at line 205 of file complexdata.h.

template<int N_rank>
Data< float, N_rank > ComplexData< N_rank >::phasemap (  )  const

Returns the phase of the complex array, whereby the phase is unwrapped in the last dimension

Definition at line 315 of file complexdata.h.

template<int N_rank>
void ComplexData< N_rank >::shift_subpixel ( const TinyVector< float, N_rank > &  shiftvec  ) 

Shift the data by the number of pixels given in 'shiftvec' for each dimension using the FFT, i.e. this is possible even with fractions.

Definition at line 289 of file complexdata.h.


The documentation for this class was generated from the following file: