Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 20:32
    levist7 starred obspy/obspy
  • Jan 31 14:58
    nackerley edited #3262
  • Jan 31 14:58
    nackerley labeled #3262
  • Jan 31 14:58
    nackerley opened #3262
  • Jan 31 13:52
    wx60159999 starred obspy/obspy
  • Jan 30 20:47
    firstkingofrome commented #3259
  • Jan 30 20:16
    firstkingofrome synchronize #3259
  • Jan 30 18:08
    etmseed commented #3255
  • Jan 30 13:48
    etmseed commented #3255
  • Jan 30 06:53
    chad-earthscope commented #3255
  • Jan 30 00:58
    filefolder edited #3261
  • Jan 30 00:22
    filefolder synchronize #3261
  • Jan 29 18:02
    StoneBored starred obspy/obspy
  • Jan 25 15:39
    trichter commented #3033
  • Jan 25 15:26
    ThomasLecocq commented #3033
  • Jan 25 15:23
    lpk-py commented #3033
  • Jan 25 09:46
    filefolder edited #3261
  • Jan 25 09:11
    megies commented #3259
  • Jan 25 09:09
    megies commented #3259
  • Jan 25 01:28
    filefolder synchronize #3261
Thomas Lecocq
@ThomasLecocq
I suspect you passed obspy-scan *.* in a folder with millions of files ? then the * are converted to a huge list by bash
brioglade
@brioglade
hi why the loading data file turn out unknown format when i use obspy in colab ?
Elliott Sales de Andrade
@QuLogic
you need to restart after installing for the file loaders to work
niralas12
@niralas12
Hii, experts i saved the ppsd plot data as ppsd.save_npz("myfile.npz") and i obtained a ppsd plot, however i want to plot the same ppsd graph outside the matplotlib, so can anybody suggest me among these files which is the x ,y axis values, noisemodel data etc. ( _binned_psds.npy _nlap.npy _psd_periods.npy
_db_bin_edges.npy numpy_version.npy sampling_rate.npy
id.npy obspy_version.npy skip_on_gaps.npy overlap.npy special_handling.npy
_len.npy _period_binning.npy _times_data.npy
matplotlib_version.npy ppsd_length.npy _times_gaps.npy
_nfft.npy ppsd_version.npy _times_processed.npy).Thanks in advance.
Thomas Lecocq
@ThomasLecocq
you can have a look in https://github.com/obspy/obspy/blob/master/obspy/signal/spectral_estimation.py for the plot, plot_spectrogram methods which shows you how the different arrays are used
Thomas Lecocq
@ThomasLecocq
hey crew, who did the job of converting the Travis CI etc to github actions ? I need to do the same for msnoise, but don't really know where to start... thaaanks
niralas12
@niralas12
how to use other cmap in ppsd plot except a default one and pqlx,can anybody suggest ?? I am not getting the list
4 replies
Calum Chamberlain
@calum-chamberlain
@ThomasLecocq I think it was Derrick Chambers who led the github actions migration. I have done the same for EQcorrscan and a few other simple projects as well. Derrick knows his stuff though, and ObsPlus and EQcorrscan have a couple of examples of doing it.
1 reply
fontiela
@fontiela
I'm looking to your advice to convert a catalog in NORDIC format into QUAKEML. My ideia is create an obspy event catalog reading Nordic catalog, then take obspy event catalog and save into QUAKEML. Is it OK?
datseismo
@datseismo
I have many sac files, however in these files network and location information is not there, but while i try to insert the same info using tr.stats.sac=AttribDict() other header information get lost.can anybody suggest me a solution so that header info will not lost.
Calum Chamberlain
@calum-chamberlain
@datseismo and @fontiela : these questions would be better on the obspy discord which is monitored more regularly for this type of question.
4 replies
fablindner
@fablindner
Hi there! I am wondering about the details of the beamforming formulation in array_processing (from module obspy.signal.array_analysis)? As far as I understand, it uses a "shared library built during ObsPy installation with ctypes". Can anyone help?
Calum Chamberlain
@calum-chamberlain
The details are exposed in the source code - much of the work is done in an underlying C-routine (the code for this is here) and this is called by the Python code here
datseismo
@datseismo
is it possible to calculate epicentral distance in degrees if i have station to event azimuth(baz) info and slowness information ?? please suggest..
1 reply
fontiela
@fontiela
I received a bunch of daily waveforms where date is wrong due to the GPS WNRO. Does anyone have a code that can fix this problem?
2 replies
PatrickChawah
@PatrickChawah

Hi.
I am using event_client.get_events method to find events, 1- everywhere, 2- near from a certain location (in a 30° radius) , 3- far from this location (out of 30° radius).
for events happening everywhere:
cat = event_client.get_events(starttime=UTCDateTime(research_time["starttime"]), endtime=UTCDateTime(research_time["endtime"]),
minmagnitude=magnitude["min"], maxmagnitude=magnitude["max"])
working great.
Far events:
minradius = 30
maxradius = 180
cat = event_client.get_events(starttime=UTCDateTime(research_time["starttime"]), endtime=UTCDateTime(research_time["endtime"]),
minmagnitude=magnitude["min"], maxmagnitude=magnitude["max"],
latitude = station["latitude"], longitude = station["longitude"],
minradius = minradius, maxradius = maxradius)
working great.
But for near events I tried many options without getting what I want. It always shows me the same result as the "everywhere" options.
Here's what I tried:
minradius = 0
maxradius = 30
cat = event_client.get_events(starttime=UTCDateTime(research_time["starttime"]), endtime=UTCDateTime(research_time["endtime"]),
minmagnitude=magnitude["min"], maxmagnitude=magnitude["max"],
latitude = station["latitude"], longitude = station["longitude"],
minradius = minradius, maxradius = maxradius)
or
minlatitude = 39.9
maxlatitude = 64
minlongitude = -19
maxlongitude = 27.84
cat = event_client.get_events(starttime=UTCDateTime(research_time["starttime"]), endtime=UTCDateTime(research_time["endtime"]),
minmagnitude=magnitude["min"], maxmagnitude=magnitude["max"],
minlatitude = minlatitude, maxlatitude = maxlatitude, minlongitude = minlongitude, maxlongitude = maxlongitude).

In both methods it shows me events happening on all the globe

Thomas Lecocq
@ThomasLecocq
What server are you accessing for this request?
PatrickChawah
@PatrickChawah
Salut Thomas,
IRIS and USGS
drezgarcia
@drezgarcia
Hello there, I have an array of acceleration data that I extracted from a seismic data file (format not compatible w/ obspy) and I want to be able to treat it as a stream so that i can use the Stream.filter() commands. Can someone suggest a way to do this? Thank you merci
Calum Chamberlain
@calum-chamberlain
@drezgarcia this page might be helpful - this should provide sufficient examples to convert your array to a Stream
1 reply
Calum Chamberlain
@calum-chamberlain

@PatrickChawah - I just tried with IRIS for event_client = Client("IRIS")your final example and did not get a global catalogue. Can you check yours, and if the problem still exists copy and paste a minimal, but complete example of the code to reproduce your issue please.

The code I ran is:

from obspy import UTCDateTime
from obspy.clients.fdsn import Client

event_client = Client("IRIS")
minlatitude, maxlatitude, minlongitude, maxlongitude = 39.9, 64, -19, 27.84
cat = event_client.get_events(
     starttime=UTCDateTime(2019, 1, 1), endtime=UTCDateTime(2019, 6, 1),
     minmagnitude=2, maxmagnitude=7, minlatitude=minlatitude,
     minlongitude=minlongitude, maxlatitude=maxlatitude, maxlongitude=maxlongitude)
PatrickChawah
@PatrickChawah
@calum-chamberlain
mi culpa. I found my coding mistake.
Sorry for bothering.
Thank you.
Atikul Haque Farazi
@ahfarazi-kU
Hello!
Is anybody here familiar with hvgramm? If so, could you kindly suggest me anything available to produce hvgramm from H/V spectral ratio curve?
Thomas Lecocq
@ThomasLecocq
Hi, what do you call a hvgramm ? A time-dependent HV spectrum ? Like a HV-spectrogram ?
1 reply
Atikul Haque Farazi
@ahfarazi-kU
image.png
Hello! I want to merge 2 traces or many together continuously, i.e., without any time gap. It is like the attached figure. This is beacuse I want to compute average H/v from different earthquake signals.
Is it possible in geopsy?
N.B.: I have already tried the merge command, i can plot it with time gap.
2 replies
nirala se
@nirala_se:matrix.org
[m]
Hii experts, can you please let me know if the other wavelet implementation except morlet can be implemented in continuous wavelet transfrom obspy.signal.tf_misfit.cwt
1 reply
Casertao
@Casertao
image.png
Hello experts. I have met a problem when I read the miniseed file into st and tried to plot them. Some traces are separated as the figure above. I was wondering why this happen?
1 reply
Casertao
@Casertao
I found that there is a gap inside the trace so it makes it separated. How can I ignore the gap and join them together for all the traces with similar problem in a string?
5 replies
chiseo36
@chiseo36
This message was deleted
3 replies
chiseo36
@chiseo36
I have a miniseed data file that contain 10 number of traces and none of the traces are of equal length,however out of 10 one trace contain highest number of data points. so i want to make all other 9 traces to be as equal as the trace that contain highest number of data point by appending zero.Can anybody suggest a solution to me.
2 replies
Thomas Lecocq
@ThomasLecocq
just saying :-) victory dance (for now) on #2920 :-)
Gillian Sharer
@gillian-iris

Hi All, I'm running into an issue with obspy.clients.get_stations where it is telling me "TypeError: The parameter 'includerestricted' is not supported by the service". However, the station service does appear to support includerestricted and a straight web service request to the url is successful. Does anyone have a solution for this?

Example:

client = obspy.clients.fdsn.Client("SCEDC")
inventory = client.get_stations(network="CI", station="ABL",channel="EHZ",level="channel",includerestricted="TRUE")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/lib/python3.8/site-packages/obspy/clients/fdsn/client.py", line 722, in get_stations
url = self._create_url_from_parameters(
File "/lib/python3.8/site-packages/obspy/clients/fdsn/client.py", line 1226, in _create_url_from_parameters
raise TypeError(msg)
TypeError: The parameter 'includerestricted' is not supported by the service.

But the following url works fine, with the includerestricted parameter:
http://service.scedc.caltech.edu/fdsnws/station/1/query?net=CI&sta=ABL&cha=EHZ&level=channel&includerestricted=TRUE&format=text

1 reply
Tom Eulenfeld
@trichter
@ThomasLecocq Could you have a glance on #2720?
Jonathan Schaeffer
@joschaeffer_gitlab
Hello there,
I'm preparing a PR for obspy and need an advice. It's a very simple change : jschaeff/obspy@47cf3b8
I'm on writing a new test but meanwhile could you tell me which branch name would fit ? Is it a feature, a fix or a maintain ?
I branched from master, maybe I should have branched from another branch ?
Jonathan Schaeffer
@joschaeffer_gitlab
There is no test exemple in obspy.clients.fdsn :'(
Claudio Satriano
@claudiodsf

I branched from master, maybe I should have branched from another branch ?

Hi Jonathan, it’s ok to branch from master, since it’s the only branch for which CI is working right now. We will release soon 1.3.0 from master and then rework the branches.

Jonathan Schaeffer
@joschaeffer_gitlab
OK, I will submit my PR hoping it will make it for 1.3.0
chiseo36
@chiseo36
Hii, i have 3 events in the catalog, out of these 3 events first and last events is recorded in a station and middle one is not recorded. And for downloading the events i followed https://docs.obspy.org/packages/autogen/obspy.clients.fdsn.client.Client.get_events.html. Does any script exist in obspy where i can skip the events if it is not recorded in a given station.Please let me know.
Calum Chamberlain
@calum-chamberlain

Nothing for a specific station - the closest is catalog.filter. Otherwise just use something like:

cat.events = [ev for ev in cat if bob in {pick.waveform_id.station_code for pick in ev.picks}]

where bob is your chosen station.

chiseo36
@chiseo36
can .csv catalogue file be converted to QUAKEML format, please let me know
John Aiken
@mnky9800n
is there a way to replace data within a time window. there is a big spike in the data when we unplug and plug back in the data logger and it would be nice to just smooth that time out to zero
Calum Chamberlain
@calum-chamberlain

@mnky9800n you can just trim the trace (using trace.trim or trace.slice) around the time and then merge the cut traces using fill_value=0, e.g. (this is deliberately verbose and could be shortened):

glitch_start, glitch_end = UTCDateTime(1990, 1, 1, 1, 0, 0), UTCDateTime(1990, 1, 1, 1, 0, 5)
# Assuming your trace is called tr
before_glitch = tr.slice(tr.stats.starttime, glitch_start)
after_glitch = tr.slice(glitch_end, tr.stats.endtime)
tr_deglitched = before_glitch + after_glitch
tr_deglitched.merge(fill_value=0)

Or you could just edit the tr.data numpy array to set to zero where you want zeros.

@chiseo36 - that depends on what is in the csv - you can always make Catalog and Event objects from any information. The supported formats for reading catalogs are here, but csv is not a well described format - you will probably have to convert yourself to obspy Events and write out to QUAKEML that way.
chiseo36
@chiseo36
I want the compute new lat lon of a region from a given lat lon after adding some degrees(let say 1 degree) to the given lat lon, can it be possible using obspy, please suggest
8 replies
Elliott Sales de Andrade
@QuLogic
Is the minimum 3.7 now? it says 3.6 in setup.py, but tests don't run on it
igmuhlmann
@igmuhlmann
Hi! Is there a way, to add further noise-curves to PPSD-plot (thinking about instrument nominal noise curves to compare the measured ppsd with what can possibly be)?
3 replies