Improved Spectrometer Based on Nonlinear Optics