bpmsimulation/add_excitation.c

Go to the documentation of this file.
00001 
00006 #include <bpm/bpm_messages.h>
00007 #include <bpm/bpm_simulation.h>
00008 #include <bpm/bpm_rf.h>
00009 #include <math.h>
00010 
00019 int add_excitation( double ttrig, double *RF ) {
00020 
00021   double curr_time = 0;
00022   int i = 0;
00023 
00024   if ( ! RF ) {
00025     bpm_error( "Invalid pointer argument in add_wave(...)",
00026                __FILE__, __LINE__ );
00027     return BPM_FAILURE;
00028   }
00029 
00030   while (curr_time < ttrig) {
00031    
00032     i++;
00033     curr_time = i / rf_samplefreq;
00034 
00035   }
00036 
00037   RF[i] += 1.;
00038 
00039   return BPM_SUCCESS;
00040 }
00041 
00042 // end of file
00043 

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