bpmrf/rf_mixer.c

Go to the documentation of this file.
00001 
00005 #include <bpm/bpm_interface.h>
00006 #include <bpm/bpm_rf.h>
00007 
00013 int rf_mixer( double *RF_Re, double *RF_Im, double **LO, double *IF ) {
00014 
00015 
00016   if ( ! RF_Re || ! RF_Im || ! LO || ! IF ) {
00017     bpm_error( "Invalid pointer arguments in rf_mixer(...)",
00018                __FILE__, __LINE__ );
00019     return BPM_FAILURE;
00020   }
00021 
00022   int i;
00023 
00024   // mix the waveforms
00025   for( i = 0; i < rf_nsamples; i++ ) {
00026 
00027     IF[i] = RF_Re[i] * LO[i][Re] + RF_Im[i] * LO[i][Im];
00028 
00029   }
00030 
00031   return BPM_SUCCESS;
00032 }
00033 // end of file

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