  The optimization of dynamical decoupling and quantum error correction for a
particular qubit realization is based on a detailed knowledge of the noise
properties. Spectroscopy of single-axis noise using dynamical decoupling pulse
sequences has garnered much recent attention. Here we consider noise
spectroscopy based on a spin-locking type pulse sequence, i.e. a
continuous-wave (CW) on-resonance driving field. We show that a heuristic
filter function approach produces a qualitatively correct (but quantitatively
incorrect) result, whereas a 0th-order average Hamiltonian calculation is shown
to agree with the result predicted by the generalized Bloch equations. We
further calculate up to 2nd-order average Hamiltonian corrections and show the
deviation from the generalized Bloch equation result. This shows that noise
spectroscopy using continuous fields, in some cases simpler to implement and
more robust to errors than pulsed schemes, can be rigorously analyzed and
criteria for reliable measurements can be established. Finally, a solid-state
nuclear magnetic resonance experiment is presented which demonstrates that the
CW and pulsed methods agree within experimental error. The noise, due to
magnetization fluctuations in a dipolar coupled proton spin bath, is found to
obey a roughly 1/\omega\ power law decay in the range of frequencies \omega\
investigated.
