src/HSLib/SpinSystem.cc
/* These functions allow users to obtain or set electon g-factors.  These are
   NOT applicable to nuclear spin! The g-factor is a unitless quantity that
   will typically have a value near that of g for a free electron: 2.00232.
   Frequency <-> Field conversions can be made based on this value using the
   conversion factor Gauss2Hz which is planks constant (6.6262e-27 erg-s/cycle)
   over the Bohr magneton (9.2471e-21 erg/G). Gauss2Hz = 0.714474e-6 G/Hz.
   GAMMA also can track an "electron shift" which is the electon resonance at
   a particular filed strength relative to a base Larmor frequency of a free
   electron.  Note that e- has a negative gyromagnetic ratio, thus electrons
   with a positive shift are shielded!                                       */
These functions allow users to obtain or set electon g-factors.  These are
NOT applicable to nuclear spin. The g-factor is a unitless quantity that
will typically have a value near that of g for a free electron: 2.00232.
Frequency <-> Field conversions can be made based on this value using the
conversion factor Gauss2Hz which is planks constant (6.6262e-27 erg-s/cycle)
over the Bohr magneton (9.2471e-21 erg/G).
These functions allow users to obtain or set electon g - factors . These are NOT applicable to nuclear spin . The g - factor is a unitless quantity that will typically have a value near that of g for a free electron : 2 . 00232 . Frequency < - > Field conversions can be made based on this value using the conversion factor Gauss2Hz which is planks constant ( 6 . 6262e - 27 erg - s / cycle ) over the Bohr magneton ( 9 . 2471e - 21 erg / G ) .
double spin_system::gfactor(int spin) const
  {
  if(!check_spin(spin,1)) SYSTerror(109,Gdec(spin),1);	
  if(!checkNotN(spin,1)) { SYSTerror(19); return 0; } 	
  return gfacts[spin];					
  }
double spin_system :: gfactor ( int spin ) const { if ( ! check_spin ( spin , 1 ) ) SYSTerror ( 109 , Gdec ( spin ) , 1 ) ; if ( ! checkNotN ( spin , 1 ) ) { SYSTerror ( 19 ) ; return 0 ; } return gfacts [ spin ] ; }
These functions allow users to obtain or set electon g-factors.
These functions allow users to obtain or set electon g - factors .
// Insure spin exists // Insure not nucleus // Return g-factor