Plotting Data Spectrum, raw

Good afternoon, I’m really new at Python and ObsPy and I need to plot the data spectrum raw of some earthquakes.
I am using a code from ObsPy documentation Seismometer Correction/Simulation — ObsPy 1.3.0 documentation
“”"
t1 = UTCDateTime(“2009-01-7T16:41:43.000”)
t2 = UTCDateTime(“2009-01-7T16:42:03.000”)
fdsn_client = Client(‘IRIS’)
st = fdsn_client.get_waveforms(network=‘G’, station=‘HDC’, location=‘00’,
channel=‘BHZ’, starttime=t1, endtime=t2,
attach_response=True)
st.remove_response(plot=True)
“”"
When I run this code, plots the raw data, the pre_filt applied and water level applied.
How can I just plot de data spectrum raw, only that?

Can someone help me, I feel lost

Thank you

Maybe this?

https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.psd.html

I’m sorry for bother, I am trying to do a graph like this (image below) highlighted in a green rectangle.


But with the code from ObsPy (above), it plots another graphs that I don’t need. How can I plot only and alone, that graph in the green rectangle? :pleading_face:

The source code has all the plotting right there, if you want to reproduce the plot. :wink:

https://docs.obspy.org/master/_modules/obspy/core/trace.html#Trace.remove_response

Really Thank you for all the help :raised_hands:

1 Like