Change the function for the long time series spectrum calculation