Added calculation of STM spectra

and corrected error in main slave routine (Npp not initialized)