bpmrf/bpm_rf.h

Go to the documentation of this file.
00001 
00015 #ifndef BPMRF_H__
00016 #define BPMRF_H__
00017 
00018 /* -----------------------------------------------------------------------------
00019    includes
00020    -------------------------------------------------------------------------- */
00021 #include <math.h>
00022 #include <bpm/bpm_defs.h>
00023 #include <bpm/bpm_interface.h>
00024 
00025 /* -----------------------------------------------------------------------------
00026    macro definitions
00027    -------------------------------------------------------------------------- */
00028 
00029 /* -----------------------------------------------------------------------------
00030    typedefs, enums and other declarations
00031    -------------------------------------------------------------------------- */
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 /* -----------------------------------------------------------------------------
00037    function prototypes and declarations
00038    -------------------------------------------------------------------------- */
00043   EXTERN int      rf_nsamples; 
00044 
00049   EXTERN double   rf_samplefreq; 
00050 
00051 
00052   EXTERN int      rf_setup( int nsamples, double sfreq );
00053 
00054   EXTERN int      rf_rectify( double **IF );
00055   
00056   EXTERN int      rf_filter( double **RF, enum rffiltertype_t filttype, int nfiltpar, 
00057                              double *pars );
00058 
00059   /*
00060     Helper function that calls individual filter routines given the parameters
00061   */
00062   EXTERN int      rf_butterworthlowpass( double **RF, int order, double fc );
00063   /*
00064     Apply a low pass butterworth filter to the given waveform
00065   */
00066 
00067   EXTERN int      rf_butterworthbandpass( double **RF, int order, double f0, double BW );
00068   /*
00069     Apply a band pass butterworth filter to the given waveform
00070   */
00071 
00072   EXTERN int      rf_butterworthhighpass( double **RF, int order, double fc );
00073   /*
00074     Apply a high pass butterworth filter to the given waveform
00075   */
00076   EXTERN int      rf_complexFFT( double **in, double **out, int dir );
00077   /*
00078     Perform a complex fft of the given waveform. if dir == NR_FFTFORWARD, forward
00079     fft is calculated, if dir == NR_FFTBACKWARD, the inverse is calcuated
00080   */
00081 
00082   EXTERN int      rf_addLO( double amp, double lofreq, enum bpmphase_t type,
00083                             double phi0, double d_phi, double **LO );
00084   /*
00085     Generates an LO waveform with an amplitude amp, frequency
00086     lofreq, constant phase phi0 if d_phi = 0, constant phase phi0
00087     and phase jitter d_phi if d_phi<>0 and bpmphase_t = locked,
00088     random phase between phi0-d_phi and phi0+d_phi otherwise
00089   */
00090   EXTERN int rf_mixer( double *RF_Re, double *RF_Im, double **LO, double *IF );
00091 
00092   /*
00093     ideal mixer
00094   */
00095   EXTERN int rf_amplify( double *RF, double dB );
00096   /*
00097     need to put in the proper compression point stuff etc...
00098   */
00099 
00100 
00101 #ifdef __cplusplus
00102 }
00103 #endif
00104 
00105 #endif /* #ifndef BPMRF_H__ */
00106 
00107 /* ================================ end of file ============================= */

Generated on Fri Nov 9 21:17:11 2007 for libbpm by  doxygen 1.5.1