bpmrf/rf_amplify.c

Go to the documentation of this file.
00001 
00005 #include <bpm/bpm_interface.h>
00006 #include <bpm/bpm_rf.h>
00007 
00015 int rf_amplify( double *RF, double dB ) {
00016 
00017   int i;
00018  
00019   if ( ! RF ) {
00020     bpm_error( "Invalid pointer arguments in rf_amplify(...)",
00021                __FILE__, __LINE__ );
00022     return BPM_FAILURE;
00023   }
00024 
00025   double volt_gain = sqrt( pow ( 10., dB / 20. ) );
00026 
00027   // Loop over the RF signal
00028   for ( i = 0; i < rf_nsamples; i++ ) {
00029 
00030     RF[i] *= volt_gain;
00031     //RF[i][Im] *= volt_gain;
00032   }
00033 
00034   return BPM_SUCCESS;
00035 }
00036 // end of file

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