NON-MARKOVIAN QUANTUM TRAJECTORIES FOR SPECTRAL DETECTION