```json
{
"title": "MathJax math/tex Script Elements",
"author": "",
"site": "",
"published": ""
}
```
We call these energy differences $E_u$ and $E_l$ (subscripts refer to "upper" and "lower"), or in units of frequency, $f_u$ and $f_l$ (where $E_{l,u} = hf_{l,u}$).
As a special case, when $\mathbf{B}$ is aligned with the NV axis (i.e., $\theta = 0$), the above relation reduces to:
$$
f_u = D+\gamma B \quad \text{and} \quad f_l = D-\gamma B.
$$
The key result is:
$$
B= \frac{1}{\sqrt{3}\gamma}\sqrt{f_u^2+f_l^2-f_u f_l-D^2}
$$
Here, $\gamma = 28$ GHz/T is the gyromagnetic ratio.