save waveform with instrument correction

Dear Obspy forum

Wishing you all the best for the holydays…I have some questions and doubts

When I apply the instrument correction following the obspy example I got a nice waveform, I would like to save the waveform on a new mseed file, so the question:


The new corrected waveform is under st.simulate?.

or the new waveform is under , as the example used to plot

tr = st[0]
tr_orig = st_orig[0]
t = np.arange(tr.stats.npts) / tr.stats.sampling_rate
plt.plot(t,, ‘k’)
plt.ylabel(‘Amplitud [counts]’)
plt.plot(t,, ‘k’)

When I do the following comand

tr1.write(r’D:\Seismic_Inves\SARA\OSC DATA_2014-04-01-mww69-near-coast-of-northern-chile\20140401_BHN.mseed’,format=‘MSEED’)

I get the following error:

Traceback (most recent call last):
File “<pyshell#21>”, line 1, in
AttributeError: ‘numpy.float64’ object has no attribute ‘plot’

Where the new waveform corrected is stored?, thank yor for your time and patient.

Best regards.


Dear Gonzalo,

When I do the following comand

here you copy the numpy array into tr1 which does not have the method
plot() - instead you want to do

tr1 = tr.copy()

and tr1.plot() and tr1.write(...) should work as expected


- --
Dr. Robert Barsch

EGU Office Munich
Luisenstr. 37
80333 Munich

Phone: +49-89-21806565
Fax: +49-89-218017855