openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Macros | Functions
IGBdft.cc File Reference
#include <fftw3.h>
#include <math.h>
#include <string>
#include <iostream>
#include <algorithm>
#include "IGBheader.h"
#include "dft_cmdline.h"
#include "Filter.h"
Include dependency graph for IGBdft.cc:

Go to the source code of this file.

Macros

#define creal(A)   (A[0])
 
#define cimag(A)   (A[1])
 
#define cmag(A)   sqrt(A[0]*A[0]+A[1]*A[1])
 

Functions

void do_phase (double **in, int n, fftw_plan fftp, fftw_plan bftp, fftw_complex **out, int t)
 
void bp_filt (double **in, int n, fftw_plan fftp, fftw_plan bftp, fftw_complex **out, int t, float dt, float low, float high)
 
void bp_notch (double **in, int n, fftw_plan fftp, fftw_plan bftp, fftw_complex **out, int t, float dt, float notch, int nwidth)
 
void do_PSD (double **in, int n, fftw_plan ftp, fftw_complex **out, int t, float dt)
 
void do_domF (double **in, int n, fftw_plan ftp, fftw_complex **out, float t, float dt)
 
template<class T >
void write_traces (T **data, int nr, int n, IGBheader *ohead)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ cimag

#define cimag (   A)    (A[1])

Definition at line 35 of file IGBdft.cc.

◆ cmag

#define cmag (   A)    sqrt(A[0]*A[0]+A[1]*A[1])

Definition at line 36 of file IGBdft.cc.

◆ creal

#define creal (   A)    (A[0])

Definition at line 34 of file IGBdft.cc.

Function Documentation

◆ bp_filt()

void bp_filt ( double **  in,
int  n,
fftw_plan  fftp,
fftw_plan  bftp,
fftw_complex **  out,
int  t,
float  dt,
float  low,
float  high 
)

frequency domain band pass filter

Parameters
intime series
nnumber of time series
fftpforward fftw3 plan
bftpbackward fftw3 plan
outarray to hold the DFT
tnumber of time samples
dtsampling period in ms
lowbottom of band
hightop of band
Postcondition
in is overwritten

Definition at line 85 of file IGBdft.cc.

Here is the caller graph for this function:

◆ bp_notch()

void bp_notch ( double **  in,
int  n,
fftw_plan  fftp,
fftw_plan  bftp,
fftw_complex **  out,
int  t,
float  dt,
float  notch,
int  nwidth 
)

frequency domain notch filter

Parameters
intime series
nnumber of time series
fftpforward fftw3 plan
bftpbackward fftw3 plan
outarray to hold the DFT
tnumber of time samples
dtsampling period in ms
notchfilter around this
nwidthwidth of notch
Postcondition
in is overwritten

Definition at line 125 of file IGBdft.cc.

Here is the caller graph for this function:

◆ do_domF()

void do_domF ( double **  in,
int  n,
fftw_plan  ftp,
fftw_complex **  out,
float  t,
float  dt 
)

determine dominant frequencies

Parameters
intime series
nnumber of time series
ftpfftw3 plan
outarray to hold the DFT
tnumber of time samples
dtsampling period in ms

Definition at line 187 of file IGBdft.cc.

Here is the caller graph for this function:

◆ do_phase()

void do_phase ( double **  in,
int  n,
fftw_plan  fftp,
fftw_plan  bftp,
fftw_complex **  out,
int  t 
)

compute phase by Hilbert transform

Parameters
ina bunch of time series
nnumber of time series
fftpforward fftw3 plan
bftpbackward fftw3 plan
outarray to hold the DFT
tnumber of time samples
Postcondition
in is overwritten

Definition at line 50 of file IGBdft.cc.

Here is the caller graph for this function:

◆ do_PSD()

void do_PSD ( double **  in,
int  n,
fftw_plan  ftp,
fftw_complex **  out,
int  t,
float  dt 
)

compute the Power Spectral Density

Parameters
intime series data
nnumber of time series
ftpfftw3 plan
outarray to hold the DFT
tnumber of time samples
dtsampling period in ms

Definition at line 158 of file IGBdft.cc.

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 240 of file IGBdft.cc.

◆ write_traces()

template<class T >
void write_traces ( T **  data,
int  nr,
int  n,
IGBheader ohead 
)

output a portion of the data

Parameters
datathe data to output
nrnumber of data traces
noffset of first data set
oheadheader of output file

Definition at line 226 of file IGBdft.cc.

Here is the caller graph for this function: