gixed a couple bugs in timeseries, added persistence_diagrams.py