# Automatically generated by GPRPy
import gprpy.gprpy as gp
mygpr = gp.gprpyProfile()
mygpr.importdata('../exampledata/GSSI/FILE____032.DZT')
mygpr.setZeroTime(5)
mygpr.dewow(999999)
mygpr.remMeanTrace(9999999)
mygpr.setVelocity(0.14)
mygpr.fkMigration()
mygpr.topoCorrect('../exampledata/GSSI/FILE____032p.txt',delimiter='\t')

# To draw your picked line on top of your profile, after writing the script,
# replace the plotting line

# mygpr.printProfile('myFig.pdf', color='bwr',
#                    contrast=4, yrng=[16.5,19.7],
#                    xrng=[0,20.8], asp=2, dpi=600)

# with the following few lines:

import numpy as np
pickeddata=np.loadtxt('../exampledata/pickedSurfaceData/testpick2_profile.txt',delimiter='\t')
# In the previous line, replace the path/filename with the path/filename of the
# picked points

import matplotlib.pyplot as plt
# The following line prepares the figure. Use the same variable values as the print command
# you commented out earlier
mygpr.showProfile(color='bwr', contrast=4, yrng=[16.5,19.7], xrng=[0,20.8], asp=2)
# The following lines use Matplotlib, which has almost the same commands as Matlab
# Here I'm plotting a line with the picked data
plt.plot(pickeddata[:,0],pickeddata[:,1],color='green',linewidth=3)
# Here I'm plotting the dots on top of it
plt.plot(pickeddata[:,0],pickeddata[:,1],'ko',linewidth=1)
# If you want to just look at it without creating a pdf, uncomment the following
#plt.show()
# To create a pdf, use the following
plt.savefig('ProfileWithPicked.pdf',dpi=600)


