Skip to content

Commit

Permalink
Updated ARMA workshop slides and add plotting script
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjm committed Jul 21, 2022
1 parent 834f9fc commit 25a4c7e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Binary file modified doc/workshop/ARMA/ARMA.pptx
Binary file not shown.
32 changes: 32 additions & 0 deletions doc/workshop/ARMA/inputs/plot_synth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python

import sys
import os
import matplotlib.pyplot as plt
import pandas as pd

def main():
try:
synth_fp = os.path.abspath(sys.argv[1])
real_fp = os.path.abspath(os.path.join(os.path.dirname(synth_fp), "dataSet_0.csv"))
except IndexError:
print("ERROR: Filepath to synthetic data not provided")


synth = pd.read_csv(synth_fp)
real = pd.read_csv(real_fp)

fig, ax = plt.subplots()

ax.plot(synth.iloc[:, 0], synth.iloc[:, 1], color="goldenrod", label='Synthetic Signal')
ax.plot(real.iloc[:, 0], real.iloc[:, 1], label='Original Signal')
ax.set_xlabel('Time')
ax.set_ylabel('Value')
ax.legend()

output_fp = os.path.join(os.path.dirname(real_fp), "results.png")
plt.savefig(output_fp)


if __name__ == '__main__':
main()

0 comments on commit 25a4c7e

Please sign in to comment.