Bruce's changes - new function to calculate spectral acc, and added time to plot x-axis