Advertisement
johnjohn1000

FBA-11 data, 6th floor, ML=4.6 with RESP from IRIS

Jan 8th, 2014
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.48 KB | None | 0 0
  1. from obspy import read
  2. import matplotlib.pyplot as plt
  3. from obspy.core import UTCDateTime
  4.  
  5. kwargs = dict(water_level=60, pre_filt=(1, 3, 20, 30))
  6. resp="/home/hd/Dropbox/projects/current/RESP.FABD.FA.6N.HNE"
  7. data="2007221075749.60.FABD.HNE_6N.gz"
  8.  
  9. plt.figure(1)
  10. plt.subplot(311)
  11. plt.title('Uncorrected FBA-11 sensor data (ACC)')
  12. tr = read("2007221075749.60.FABD.HNE_6N.gz")
  13. plt.plot(tr[0].data)
  14.  
  15. plt.subplot(312)
  16. plt.title('Corrected data with RESP file (ACC)')
  17. tr = read(data)
  18. tr.simulate(seedresp={"filename": resp,'date': UTCDateTime("2007-10-22T07:57:49.000"),"units": "ACC"},**kwargs)
  19. #tr.filter(type="highpass", freq=0.1)
  20. plt.plot(tr[0].data)
  21. plt.subplot(313)
  22. plt.title('Corrected via RESP file for [DIS,VEL+integrate,ACC+2xintegrate]+highpass filter')
  23. tr = read(data)
  24. tr.simulate(seedresp={"filename": resp,'date': UTCDateTime("2007-10-22T07:57:49.000"),"units": "DIS"},**kwargs)
  25. #tr.filter(type="highpass", freq=0.1)
  26. plt.plot(tr[0].data)
  27. tr = read(data)
  28. tr.simulate(seedresp={"filename": resp,'date': UTCDateTime("2007-10-22T07:57:49.000"),"units": "VEL"},**kwargs)
  29. tr.integrate()
  30. #tr.filter(type="highpass", freq=0.1)
  31. plt.plot(tr[0].data)
  32. tr = read(data)
  33. tr.simulate(seedresp={"filename": resp,'date': UTCDateTime("2007-10-22T07:57:49.000"), "units": "ACC"},**kwargs)
  34. tr.integrate()
  35. tr.integrate()
  36. tr.filter(type="highpass", freq=0.1)
  37. plt.plot(tr[0].data)
  38. plt.savefig("plot.pdf",format='pdf')
  39. plt.savefig("plot.eps",format='eps')
  40. plt.savefig("plot.png",format='png')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement