Frequency-domain method for separating signal and noise