[Tutor] obspy.imaging.spectrogram

Alan Gauld alan.gauld at yahoo.co.uk
Thu Jun 18 05:35:05 EDT 2020


On 18/06/2020 09:53, Guro Anne Brækken wrote:
> Hi there,
> 
> Is there anyone out there who would know how to output the data from the
> obspy function spectrogram (and not only an image file)?
> 

This is a pretty specialized question for a general group like tutor
especially since its not a standard library package.

I suggest reaching out to the folks on the SciPy forum, they are more
likely to include users of obspy. There is also an obspy mailing list:

http://lists.obspy.org/cgi-bin/mailman/listinfo/obspy-users

> My code is the following:

I hope not!

> st=obspy.read(\seismic\trace.segy)

The filename should be in quotes and, since you use
backslashes prepended with an 'r'

> st_spec=st.spectrogram(log=True, wlen=0.02, samp_rate=32000, per_lap=0.9,
> outfile="st_spec_image")
> st_spec.write('st_spec_data', format='SEGY'

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list