4.5 KiB
4.5 KiB
In [ ]:
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('ggplot')
plt.rcParams['figure.figsize'] = 12, 8In [ ]:
from obspy import read_inventory
# real-world StationXML files often deviate from the official schema definition
# therefore file-format autodiscovery sometimes fails and we have to force the file format
inventory = read_inventory("./data/station_PFO.xml", format="STATIONXML")
print(type(inventory))In [ ]:
!head data/station_BFO.xmlIn [ ]:
print(inventory)In [ ]:
network = inventory[0]
print(network)In [ ]:
station = network[0]
print(station)In [ ]:
channel = station[0]
print(channel)In [ ]:
print(channel.response)In [ ]:
from obspy import read
st = read("./data/waveform_PFO.mseed")
print(st)In [ ]:
inv = read_inventory("./data/station_PFO.xml", format="STATIONXML")In [ ]:
print(st[0].stats)In [ ]:
st.plot()
st.remove_response(inventory=inv)
st.plot()In [ ]:
st = read("./data/waveform_PFO.mseed")
st.remove_response(inventory=inv, water_level=60, pre_filt=(0.01, 0.02, 8, 10), output="DISP")
st.plot()