created the spectra_average() method in the plotter_helper.py