Binary detection codes utilizing spectral-energy distribution fitting