Modified small bug in timeseries_analysis.py, line 638