If the angular frequency of the rotating magnetic field is chosen such that ω r = − 2 ω 0 {\displaystyle \omega _{r}=-2\omega _{0}} , in the rotating frame the state vector will precess around x ^ {\displaystyle {\hat {x}}} with frequency 2 ω 1 {\displaystyle 2\omega _{1}} , and will thus flip from down to up releasing energy in the form of detectable photons[citation needed]. This is the fundamental basis for NMR, and in practice is accomplished by scanning ω r {\displaystyle \omega _{r}} until the resonant frequency is found at which point the sample will emit light. Similar calculations are done in atomic physics, and in the case that the field is not rotating, but oscillating with a complex amplitude, use is made of the rotating wave approximation in deriving such results.