bpmsimulation/get_phase.c

Go to the documentation of this file.
00001 
00005 #include <bpm/bpm_messages.h>
00006 #include <bpm/bpm_simulation.h>
00007 #include <bpm/bpm_rf.h>
00008 
00012 int get_phase( double **RF, double *wf ) {
00013 
00014   int i;
00015 
00016   if ( ! RF ) {
00017     bpm_error( "Invalid pointer argument in reset_complex_wave(...)", 
00018                __FILE__, __LINE__ );
00019     return BPM_FAILURE;
00020   }
00021 
00022   for ( i = 0; i < rf_nsamples; i++ ) {
00023     wf[i] = asin( RF[i][Im] / sqrt( RF[i][Re]*RF[i][Re] + RF[i][Im]*RF[i][Im] ) );
00024   }
00025   
00026   return BPM_SUCCESS;
00027 }
00028 
00029 // end of file

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