The energy levels and energy eigenstates for a single NV depend on the orientation of the NV axis with respect to the applied magnetic field. However, the ODMR lineshape includes contributions from an ensemble of NVs randomly distributed in solid angle and with randomly distributed strain $E$. For a given member of the ensemble, we obtain three states (with three corresponding energy levels) when solving the Hamiltonian. Call them $|0\u232a$, $|1\u232a$, and $|2\u232a$, with $|0\u232a$ consisting primarily of the $ms=0$ state and $|1\u232a$ and $|2\u232a$ consisting of superpositions of the $ms=\xb11$ states. Label their eigenenergies as $E0$, $E1$, and $E2$, respectively, so the two spin transitions occur at the following microwave frequencies: $\omega 1=(E1\u2212E0)/\u210f$ and $\omega 2=(E2\u2212E0)/\u210f$. The Rabi frequency for each transition is Display Formula
$\Omega i(E,\alpha ,\beta ,\gamma )=g\mu B2\u210f\u23290|B1\xb7S|i\u232a,$(2)
with $i\u2208{1,2}$ referring to the spin transition number, $\alpha $, $\beta $, and $\gamma $ referring to the Euler angles that rotated the NV into its current position relative to the $z^$ axis of the lab frame, and $B1$ referring to the microwave magnetic field magnitude and orientation.