
import os, sys
import numpy as np

import matplotlib
matplotlib.use("AGG")
matplotlib.rcParams.update({'font.size': 18})
from matplotlib import pyplot as plt
from matplotlib import cm

inputFileDirectory="/home/mcoughlin/Seismon/Text_Files/Timeseries/H1_ISI-GND_STS_HAM2_Z_DQ/64/"
accelerationFileDirectory="/home/mcoughlin/Seismon/Text_Files/Acceleration/H1_ISI-GND_STS_HAM2_Z_DQ/64/"
predictionFile="/home/mcoughlin/Seismon/H1/H1O1/1126073342-1137283217/earthquakes/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/H1O1/"
lockFile="/home/mcoughlin/seismon/segments/H1-LOCK.txt"

#os.system("python seismon_prediction_vs_actual -i %s -p %s -o %s -a %s -l %s"%(inputFileDirectory,predictionFile,outputDirectory,accelerationFileDirectory,lockFile))

inputFileDirectory="/home/mcoughlin/Seismon/Text_Files/Timeseries/H1_ISI-GND_STS_HAM2_Z_DQ/64/"
accelerationFileDirectory="/home/mcoughlin/Seismon/Text_Files/Acceleration/H1_ISI-GND_STS_HAM2_Z_DQ/64/"
predictionFile="/home/mcoughlin/Seismon/H1/H1postO1/1137283217-1164646717/earthquakes/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/H1postO1/"
lockFile="/home/mcoughlin/seismon/segments/H1-LOCK.txt"

#os.system("python seismon_prediction_vs_actual -i %s -p %s -o %s -a %s -l %s"%(inputFileDirectory,predictionFile,outputDirectory,accelerationFileDirectory,lockFile))

inputFileDirectory="/home/mcoughlin/Seismon/Text_Files/Timeseries/H1_ISI-GND_STS_HAM2_Z_DQ/64/"
accelerationFileDirectory="/home/mcoughlin/Seismon/Text_Files/Acceleration/H1_ISI-GND_STS_HAM2_Z_DQ/64/"
predictionFile="/home/mcoughlin/Seismon/H1/H1O2/1164646717-1177972930/earthquakes/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/H1O2/"
lockFile="/home/mcoughlin/seismon/segments/H1-LOCK.txt"

#os.system("python seismon_prediction_vs_actual -i %s -p %s -o %s -a %s -l %s"%(inputFileDirectory,predictionFile,outputDirectory,accelerationFileDirectory,lockFile))

inputFiles = "/home/mcoughlin/Seismon/Predictions/H1O1/earthquakes.txt,/home/mcoughlin/Seismon/Predictions/H1postO1/earthquakes.txt,/home/mcoughlin/Seismon/Predictions/H1O2/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/H1O1O2/"
#os.system("python seismon_prediction_vs_actual_combine -i %s -o %s"%(inputFiles,outputDirectory))

inputFiles = "/home/mcoughlin/Seismon/Predictions/H1O1/earthquakes.txt,/home/mcoughlin/Seismon/Predictions/H1postO1/earthquakes.txt,/home/mcoughlin/Seismon/Predictions/H1O2/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/H1O1O2_GPR/"
#os.system("python seismon_prediction_vs_actual_combine_gpr -i %s -o %s --doLockloss"%(inputFiles,outputDirectory))
#print stop

inputFileDirectory="/home/mcoughlin/Seismon/Text_Files/Timeseries/L1_ISI-GND_STS_HAM2_Z_DQ/64/"
accelerationFileDirectory="/home/mcoughlin/Seismon/Text_Files/Acceleration/L1_ISI-GND_STS_HAM2_Z_DQ/64/"
predictionFile="/home/mcoughlin/Seismon/L1/L1O1/1126073342-1137283217/earthquakes/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/L1O1/"
lockFile="/home/mcoughlin/seismon/segments/L1-LOCK.txt"

#os.system("python seismon_prediction_vs_actual -i %s -p %s -o %s -a %s -l %s"%(inputFileDirectory,predictionFile,outputDirectory,accelerationFileDirectory,lockFile))

inputFileDirectory="/home/mcoughlin/Seismon/Text_Files/Timeseries/L1_ISI-GND_STS_HAM2_Z_DQ/64/"
accelerationFileDirectory="/home/mcoughlin/Seismon/Text_Files/Acceleration/L1_ISI-GND_STS_HAM2_Z_DQ/64/"
predictionFile="/home/mcoughlin/Seismon/L1/L1postO1/1137283217-1164646717/earthquakes/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/L1postO1/"
lockFile="/home/mcoughlin/seismon/segments/L1-LOCK.txt"

#os.system("python seismon_prediction_vs_actual -i %s -p %s -o %s -a %s -l %s"%(inputFileDirectory,predictionFile,outputDirectory,accelerationFileDirectory,lockFile))

inputFileDirectory="/home/mcoughlin/Seismon/Text_Files/Timeseries/L1_ISI-GND_STS_HAM2_Z_DQ/64/"
accelerationFileDirectory="/home/mcoughlin/Seismon/Text_Files/Acceleration/L1_ISI-GND_STS_HAM2_Z_DQ/64/"
predictionFile="/home/mcoughlin/Seismon/L1/L1O2/1164646717-1177972930/earthquakes/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/L1O2/"
lockFile="/home/mcoughlin/seismon/segments/L1-LOCK.txt"
lockChannel="L1:GRD-ISC_LOCK_STATE_N"

os.system("python seismon_prediction_vs_actual -i %s -p %s -o %s -a %s -l %s"%(inputFileDirectory,predictionFile,outputDirectory,accelerationFileDirectory,lockFile))

inputFiles = "/home/mcoughlin/Seismon/Predictions/L1O1/earthquakes.txt,/home/mcoughlin/Seismon/Predictions/L1postO1/earthquakes.txt,/home/mcoughlin/Seismon/Predictions/L1O2/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/L1O1O2/"
#os.system("python seismon_prediction_vs_actual_combine -i %s -o %s"%(inputFiles,outputDirectory))

inputFiles = "/home/mcoughlin/Seismon/Predictions/L1O1/earthquakes.txt,/home/mcoughlin/Seismon/Predictions/L1postO1/earthquakes.txt,/home/mcoughlin/Seismon/Predictions/L1O2/earthquakes.txt"
outputDirectory="/home/mcoughlin/Seismon/Predictions/L1O1O2_GPR/"
os.system("python seismon_prediction_vs_actual_combine_gpr -i %s -o %s --doLockloss"%(inputFiles,outputDirectory))
