Pulsar::WaveletTransform Class Reference

Performs 1-D discrete wavelet transforms (DWT) More...

#include <WaveletTransform.h>

Inheritance diagram for Pulsar::WaveletTransform:
Reference::Able Reference::HeapTracked

Public Types

enum  State { Wavelet, Time, Empty }
 Possible states of the data.
 

Public Member Functions

 WaveletTransform ()
 Constructor.
 
 ~WaveletTransform ()
 Destructor.
 
void set_type (const gsl_wavelet_type *t)
 Set wavelet type. More...
 
void set_order (int o)
 Set wavelet order. More...
 
void set_wavelet (std::string s)
 Set wavelet type and order using short string notation.
 
void set_decimate (bool _dec=true)
 Set whether or not to decimate during transform.
 
void transform (unsigned npts, const float *in)
 Perform forward transform.
 
void transform (const std::vector< float > &in)
 Perform forward transform.
 
void transform (const Pulsar::Profile *in)
 Perform forward transform.
 
void invert ()
 Perform inverse transform in-place.
 
const bool get_decimate () const
 Get decimation setting.
 
State get_state ()
 Get current state.
 
double get_data (int level, int k)
 Get wavelet data.
 
double get_data (int n)
 Get data element.
 
double * get_data ()
 Get pointer to data array.
 
const double * get_data () const
 Get const pointer to data array.
 
const int get_npts () const
 Get number of pts currently in use.
 
const int get_log2_npts () const
 Get log2 of number of pts currently in use.
 
const int get_ncoeff () const
 Get total number of wavelet coeffs computed.
 
const int get_ncoeff (int level) const
 Get number of coeffs at a given level.
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Protected Attributes

const gsl_wavelet_type * type
 Wavelet type.
 
bool decimate
 Use decimated (standard) or undecimated transform.
 
int order
 Wavelet order.
 
gsl_wavelet * wave
 Wavelet coeffs.
 
int npts
 Number of points.
 
int log2_npts
 Log2 of npts.
 
double * data
 Data storage.
 
double mean
 Mean of data.
 
State state
 Current state of the data.
 
gsl_wavelet_workspace * work
 GSL workspace.
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Detailed Description

Performs 1-D discrete wavelet transforms (DWT)

This class is basically a wrapper for the GSL wavelet implementation. Refer to GSL documentation for more info.

Member Function Documentation

◆ set_order()

void Pulsar::WaveletTransform::set_order ( int  o)
inline

Set wavelet order.

Implemented values (as of GSL 1.11) are:

  1. daubechies: order=4,6,...,20 (even values only).
  2. haar: order=2 only.
  3. bspline: order=103,105,202,204,206,208,301,303,305,307,309.

◆ set_type()

void Pulsar::WaveletTransform::set_type ( const gsl_wavelet_type *  t)
inline

Set wavelet type.

Possible types (as of GSL 1.11) are:

  1. gsl_wavelet_daubechies
  2. gsl_wavelet_haar
  3. gsl_wavelet_bspline

All types can have _centered appended to their name to get centered versions.


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

Generated using doxygen 1.8.17