Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Sep 29 23:08

    megies on master

    magnitude estimation: some clar… Merge pull request #3154 from o… fdsn: fix typo in get stations … and 7 more (compare)

  • Sep 29 23:07

    megies on fix_basic_responsestage_decimation


  • Sep 29 23:07

    megies on maintenance_1.3.x

    stationxml: add test+data for a… stationxml: avoid dropping deci… stationxml: adjust values of on… and 1 more (compare)

  • Sep 29 23:07
    megies closed #3159
  • Sep 29 23:06
    megies commented #3160
  • Sep 29 23:05
    megies labeled #3160
  • Sep 29 23:05
    megies opened #3160
  • Sep 29 23:05
    megies milestoned #3160
  • Sep 29 20:47
    trichter commented #3155
  • Sep 29 20:45
    trichter commented #3124
  • Sep 29 20:38
    trichter commented #3155
  • Sep 29 20:20
    trichter commented #3124
  • Sep 29 20:19
    trichter commented #3124
  • Sep 29 19:08
  • Sep 29 15:27
    megies synchronize #3159
  • Sep 29 15:27

    megies on fix_basic_responsestage_decimation

    stationxml: adjust values of on… (compare)

  • Sep 29 15:06

    megies on fix_basic_responsestage_decimation

    stationxml: avoid dropping deci… (compare)

  • Sep 29 15:06
    megies synchronize #3159
  • Sep 29 15:01
    megies milestoned #3118
  • Sep 29 15:01
    megies unlabeled #3118
John Aiken
also what is N in the equation? maybe i just dont understand how its calculated
Tobias Megies
@aaaaa-ch it is the thresholds to activate and then again deactivate the trigger, see e.g. https://docs.obspy.org/citations.html#withers1998
Hello everyone, I don't how to read the waveform in this format with the obspy. Hope to get help.
i dont know this css file format but it has some files that have .w as ending maybe it is something like that, not sure
Great thanks.
Tobias Megies
CSS seems to usually have a file that lists contents of other files though.. not sure if its easy to workaround that file missing
usually its discouraged to use private, low level reader functions but you can see it anything of these can help you
Yes, Thanks for your selfless help.
Hello everyone. Do you know how to calculate the site amplifying factor and quality factor?
Dan Burk

Hi everyone,
I have been experimenting with the PPSD spectral_estimation.py code, adding some colorization to the various plot overlays such as the mean, mode, and percentile graphs. I want to add a little bit of optimization to the PPSD plot, as the overlays default to black. How would I go about becoming a first-time contributor to the project ?


Hello all,
Something weird happens when I try to trim a trace (both with trim and slide commands). The start-time of the trimmed output is like 4 milliseconds ahead of the start-time that I provide in the code, irrespective of the time I give (unless I give an integer value in second+ say 4 millisecond). I kinda need to trim different stations' data all at the same point in time to run a cross-correlation code on it... but this glitch is keeping me from it.
I tried playing around with resampling, but that doesn't work.
Anybody else face such issues?? How did you solve it??
Tobias Megies
@tychoaussie you can just open a pull request on github with your version of the code, let us know if u need more help how to go about it. Since that is a feature change you should base your work off of master branch
@anirudhakumar619 what is your sampling rate? Data will always be cut to one of your samples, depending on setting of nearest_sample that sample might be left or right of the given time. If you need to have the same time and the samples dont align you could resample your data to have the exact same sampling points, but personally I would not do that and rather adjust the timing in the cross correlation function that you get as output
Joseph Rapula Maritinkole
Hello everyone.
I am an obspy beginner. I want to get the events catalog from ISC, including arrival information and pick-trace information, and then use this information to download the corresponding waveform from IRIS. (I am labeling the dataset for deep learning training).
I am encountering some problems here,
from obspy.clients.fdsn import Client
from obspy import UTCDateTime
-->client = Client("ISC")
-->t0 = UTCDateTime(2020, 1, 2)
-->t1 = UTCDateTime(2020, 1, 4)
-->cat = client.get_events(t0, t1, minlatitude=-30, maxlatitude=-16,
minlongitude=20, maxlongitude=28, includearrivals=True)
The output I am getting has an error in the Network code. WaveformStreamID
network_code: 'IR'
station_code: 'KHWEE'
channel_code: ''
location_code: '--'
The network is supposed to be BX here. Now I cannot get waveforms from IRIS, I will be happy to discuss this further because I am getting lots of errors. Maybe because I am a newbie.
Tobias Megies
Maybe you should talk to ISC why they use this alternate code for those stations. I am guessing you are trying to download data based on the WaveformStreamID of the picks in the event files in an automated way? That's a good approach and you can simply fix the network code on the fly in your program, something like..
from obspy.clients.fdsn import Client
client = Client('IRIS')
inv = client.get_stations(network='BX', level='station')
sta_codes_bx = [sta.code for net in inv for sta in net]

for pick in event.picks:
    is_IR = pick.waveform_id.network_code == 'IR'
    should_be_BX = pick.waveform_id.station_code in sta_codes_bx
    if is_IR and should_be_BX:
        pick.waveform_id.network_code = 'BX'
Roberto Guardo

Hi everyone,
If I use the command scan inside a script.py it raises an error like this:
PermissionError: [WinError 5] Access denied: '/$Recycle.Bin\S-1-5-18'
on Ubuntu the error is almost the same.

What I do is the following:
from obspy.imaging.scripts.scan import scan

Trying to emulate what I do from the shell:
obspy-scan input_trace_path -v -o outputTracePath

From the shell I do not have any problem, from the script it doesn't work.
Any clue?

6 replies
Hi all,
I want to make a recod_section. According to the page obspy.core.stream.Stream.plot in the "section" part, I must define distance or event coordinates to plot section type. Is there a documentation or example code you would know that can help me how do I add them in the sac header?
3 replies
Hai, how to plot psd in 3 components like that?
6 replies
@megies @krischer
Adebayo Ojo

Hello all,

I need help with instrument response removal using poles and zeros. All the information I have about the seismometer is stated here (https://www.gfz-potsdam.de/en/section/geophysical-imaging/infrastructure/geophysical-instrument-pool-potsdam-gipp/pool-components/poles-and-zeros/3d-geophone) and below:

No Damping Resistor
Gs = 28.8 V/(m/s); Ds = 0.56; fs = 4.5 Hz

2 Zeros
z1 = 0
z2 = 0

2 Poles
p1 = -15.88 23.43i
p2 = -15.88 -23.43i

Normalisation Factor
a = 1.0

I can see the code example using PAZ dictionary here: https://docs.obspy.org/tutorial/code_snippets/seismometer_correction_simulation.html#using-a-paz-dictionary but not sure which of these parameters correspond to the ones used in the example.

There is also a response file available here: https://www.gfz-potsdam.de/fileadmin/gfz/sec22/pdf_doc/GIPP/RESP.XX.NS532..SLZ.HG6.375.100000.4_5B.28_8.txt and also on IRIS NRL: http://ds.iris.edu/NRL/sensors/hgs/RESP.XX.NS532..SLZ.HG6.375.9090.4_5B.27_7 but didn't work with ObsPy.

I kept getting "ValueError: No matching response information found" error when I use these files (after modifying the channel name, station name and start and end dates).

Kindly provide me some guidance on using the parameters or response file successfully.


6 replies
Hello all, I want to read a MSD file,Why is the running result displayed:“known blockette length for type 1002”“msr_unpack(GD_TST1_00_BHN_D): Unknown blockette length for type 1002”....Looking forward to the help of kind people
1 reply
Hello the Obspy community ! I don't know if it is the right place for that but I think we found a bug with the instrumental correction tool. The bug occur only with low waterlevel (<60 dB) and when a change from velocity to acceleration or inversely is requested. I have prepare a few plot to explain it more in detail...
Hello, I am able to write sac files to SEGY format, however while writing to SEGY network,station,channel and location information are getting lost. Can you please suggest some solution or how can be the header information be inserted in SEGY header.Thanks
6 replies
@megies @ThomasLecocq @calum-chamberlain @krischer , i am looking forward to hearing from you regarding my query.Thanks.
Hii, I need to see the real time recording on my computer screen, I am not finding any links to it on obspy tutorial.can you please suggest some example links...Thanks in advance.
2 replies
Munkhsaikhan Amarsanaa
Hello Obspy developers. I would like to know if there is an easy way in Obspy to remove instrument response using PAZ as the SAC program do. For example: read SAC file and read its paz then SAC.remove_response(paz, 'ACC'). If there is not it is possible to develop it in Obspy? I have a ton of SAC data with its paz. Thank you.
Hi, I am having problems reading seg2 files if the keyword 'NOTE' exists but has no contents behind. I would propose to change function "parse_free_form" near the end and add a try-except structure around line 327 in file seg2.py:
4 replies
        if key == 'NOTE':
                value = [cleanup_and_decode_string(line)
                         for line in value.split(self.line_terminator)
                         if line]
                value = ''
            value = cleanup_and_decode_string(value)
Hello all, how to know availability percentage of data waveform from observation data?