Questions tagged [obspy]

ObsPy is a seismology toolbox for Python

ObsPy is a Python library that provides routines useful in seismology. Routines include parsers for common file formats and signal processing for data analysis and manipulation.

42 questions
3
votes
2 answers

Using beach ball maps (focal mechanism) in Python

I'm very new to focal mechanisms (beach balls) and would like to plot these on to a global map using Python. I already have installed the Anaconda suite, and would like to know if I need to install any further modules to get this working (i.e. is…
pymat
  • 1,090
  • 1
  • 23
  • 45
3
votes
2 answers

Python - How to transform counts in to m/s using the obspy module

I have a miniseed file with a singlechannel trace and I assume the data is in counts (how can i check the units of the trace?). I need to transform this in to m/s. I already checked the obspy tutorial and my main problem is that i dont know how to…
2
votes
1 answer

Obspy spectrogram ValueError (noverlap must be less than n)

I working with seismic data using obspy and I want to get a spectrogram for my data. When I apply the spectrogram function to the initial data everything works fine. st.spectrogram(log=True, title='BW.RJOB ' + str(st[0].stats.starttime)) However…
arisAbCy
  • 71
  • 7
2
votes
0 answers

Is obspy able to compute the magnitude of a trace or stream?

Anyone here an expert in obspy? I'm making a obspy based application that detects earthquakes with intensity 3 above using the magnitude produced. Is it possible to compute the magnitude using obspy?
2
votes
1 answer

Decimation of files with python and obspy

I am trying to make a decimation to mseed format files. For now I am using this code. import numpy as np import matplotlib.pyplot as plt import obspy import sys with open(sys.argv[1],"rb") as fh: fh.seek(512) st =…
2
votes
1 answer

What is the correct way to call the Obspy trace filter function?

I am trying to bandpass filter a trace (loaded correctly) using tr.filter('bandpass', freqmin, freqmax, df, corners=corners, zerophase=False) Unfortunately this returns: Traceback (most recent call last): File "nm_data_analysis.py", line 44, in…
Alex
  • 59
  • 3
1
vote
1 answer

Python x axis datetime with numpy array and 2 labels type

I was using obspy to plot seismogram, but when you want to customize a little the plot you must use matplotlib. But this way I don't succeed to have a x axis using date time, with a first label display the all date, then only seconds (or %M:%S…
BenjiBoy
  • 141
  • 7
1
vote
4 answers

Mplstereonet azimuth labels

For my thesis I use the mplstereonet package to plot stereographic projections of points and planes obtained by using the ObsPy package. For my application I want to use azimuth labels that plot at a given angle outside of the circle. I am not using…
1
vote
1 answer

Using Obspy and the Spectrogram function, how can I limit my Y axis

I am using obspy to look at some hydroacoustic data, and I need to view the data as a spectrogram. The spectrogram seems to be OK, but I would like to cut off the top (near the nyquist) of my plot around the y=100 mark. I am having a lot of trouble…
1
vote
0 answers

why EvtBadHeaderError appears when reading an .evt file in obspy

I am using a command called read on the Obspy library in Python. I am just trying to read a .evt file. However the following error appears: EvtBadHeaderError: Bad Frame values And my code is: from obspy import readdt =…
john
  • 49
  • 1
  • 6
1
vote
1 answer

Creating a trigger to detect low amplitude earthquakes using cross correlation

Hello I am new to python and obspy community. I have been using obspy and have managed to cross correlate to known earthquake signals to find a suitable correlation coefficient to then use on unknown seismic signals to detect earthquakes. I have…
1
vote
1 answer

In Obspy, how can I get an amplitude value at a specific time?

Suppose I have an object Trace, say trace, already and I want to have an amplitude data at the time 30 sec. I think I can do it like below, assuming begin time is 0 for simplicity, delta = trace.stats.delta count = int(30 / delta) target_value =…
kensuke1984
  • 949
  • 1
  • 11
  • 21
1
vote
1 answer

Accessing seismographic data via fdsn with obspy (using network, station, location, channel)

I want to download seismographic data from the region around the vulcano Tungurahua. In the obspy documentation for the function obspy.clients.fdsn the steps for downloading data is described: from obspy import UTCDateTime t =…
Oliver Wilken
  • 2,654
  • 1
  • 24
  • 34
1
vote
1 answer

Obspy, reading files from SDS file structure

I am using the obspy module to read miniseed files from a local SDS file structure into an obspy stream object. I have organised my files into a local SDS file structure according to the SeisComP formatting instructions, initialised the obspy…
Nukolas
  • 465
  • 1
  • 7
  • 17
1
vote
1 answer

ObsPy Plot Beachball in Time Series

I am trying to plot an ObsPy (or any python) seismic focal mechanism in time series. import matplotlib.pyplot as plt import datetime import numpy as np from obspy.imaging.beachball import Beach # x = np.arange(0,100,4) x =…
skytaker
  • 4,159
  • 1
  • 21
  • 31
1
2 3