bpmrf/rf_rectify.c

Go to the documentation of this file.
00001 
00005 #include <bpm/bpm_interface.h>
00006 #include <bpm/bpm_rf.h>
00007 #include <bpm/bpm_units.h>
00008 
00015 int rf_rectify( doublewf_t *D, complexwf_t *RF ) {
00016 
00017   
00018   if ( ( ! RF) || ( ! D) ) {
00019     bpm_error( "Invalid IF pointer in rf_rectify(...)",
00020                __FILE__, __LINE__ );
00021     return BPM_FAILURE;
00022   }
00023 
00024   complexwf_getreal( D, RF);
00025 
00026   int i;
00027 
00028   for ( i = 0; i < D->ns; i++ ) {
00029 
00030     if ( D->wf[i] < 0 ) D->wf[i] = 0.;
00031 
00032   }  return BPM_SUCCESS;
00033 }
00034 // end of file

Generated on Thu Jan 10 10:18:04 2008 for libbpm by  doxygen 1.5.1