We will now use the FDSN client to download the observed data as well as the instrument response.

In [4]:

# The `attach_response` argument will cause a second request to the# station service which fetches the instrument response.st=c.get_waveforms(network="IU",station="ANMO",location="00",channel="BHZ",starttime=obspy.UTCDateTime(2010,5,24,16,18,28),endtime=obspy.UTCDateTime(2010,5,24,17,18,28),attach_response=True)st.plot()

The next step is to convert it to physical units. The pre filter here is very wide but it is a very good station so that is ok here.

In the generated plot the observed data is on the top, and the synthetic on the bottom.

In [8]:

# Combine into a single Stream object.st_all=st.copy()+st_synth.copy()# Filter to a period band from 1 to 10 seconds to highlight# the P phase and force the same band limit on both.st_all.detrend("demean")st_all.taper(0.05)st_all.filter("bandpass",freqmin=0.1,freqmax=1.0,corners=3)# Cut window around the P arrivalstarttime=st_synth[0].stats.starttime+470endtime=st_synth[0].stats.starttime+550st_all.trim(starttime,endtime)st_all.plot()

This website does not host notebooks, it only renders notebooks
available on other websites.