Theory of coherent averaging in magnetic resonance using effective Hamiltonians.