Optimize Spectrum-Analyzer Settings For TOI Measurements