bpmrf/rf_phase_shifter.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_nr.h>
00008 #include <bpm/bpm_wf.h>
00009 
00016 int rf_phase_shifter( complexwf_t *RF, double rotation ) {
00017 
00018   double phi;
00019   complex_t f;
00020  
00021   if ( ! RF ) {
00022     bpm_error( "Invalid pointer arguments in rf_amplify(...)",
00023                __FILE__, __LINE__ );
00024     return BPM_FAILURE;
00025   }
00026 
00027   phi = PI * rotation/180.;
00028   f.re = cos (phi);
00029   f.im = sin (phi);
00030 
00031   complexwf_scale( f, RF );
00032 
00033   return BPM_SUCCESS;
00034 }
00035 // end of file

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