set up the rawFlux,smoothFlux,detValue correctly for external sources; remove some deprecated test code