Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 04 22:55
    trichter commented #3264
  • Feb 03 15:01
    megies edited #3264
  • Feb 03 15:01
    megies edited #3264
  • Feb 03 15:01
    megies edited #3264
  • Feb 03 15:01
    megies synchronize #3264
  • Feb 03 15:01

    megies on fdsn_raspi_url

    changelog (compare)

  • Feb 03 15:01
    megies labeled #3264
  • Feb 03 15:01
    megies milestoned #3264
  • Feb 03 15:01
    megies milestoned #3264
  • Feb 03 15:01
    megies labeled #3264
  • Feb 03 15:01
    megies opened #3264
  • Feb 03 14:59
    megies milestoned #3263
  • Feb 03 14:59
    megies labeled #3263
  • Feb 03 14:59
    megies unlabeled #3263
  • Feb 03 14:59

    megies on fdsn_raspi_url

    fdsn: update raspi shake URL (compare)

  • Feb 03 14:13
    gpetricca labeled #3263
  • Feb 03 14:13
    gpetricca opened #3263
  • Feb 02 16:56
    foteinidd starred obspy/obspy
  • Feb 02 08:47
    obspy-bot commented #3049
  • Jan 31 20:32
    levist7 starred obspy/obspy
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
uky-jps
@uky-jps
Question, not entirely related to obspy but hoping for help or direction. I was curious if obspy or any other module exits that can read in Antelope formatted database files into python (output format doesn't really matter, could be a dictionary object, or even sqlite db) that I could then query? I have some css3.0 formatted catalogs and I want to pull data from IRIS for those queried events, but most of the modules I've come across require you to install Antelope. I'm trying to find a work around that doesn't require me to install the Antelope software. I have been fruitless up till now and just curious if anyone else was aware of something I might have missed. If this is not an appropriate ask on this forum, please feel free to delete this comment. Thanks in advance.
Tom Eulenfeld
@trichter
@QuLogic Yes min supported python version is 3.7 now. Where did you find 3.6?
Elliott Sales de Andrade
@QuLogic
MarcoEsposito890
@MarcoEsposito890

Hi! I'm kind of new to obspy, and I was wondering if it is possible to save files of a given time duration? Let's say I am receiving miniSEED files from a Ringserver. After receiving 10 minutes worth of data, I want to save them in a single .sac file after merging them.

My first approach would be to look at the miniSEED files timestamps, save each trace contained in the miniSEED files inside a stream, and after I received 10 minutes of data I would save the stream into a .sac file (after merging the traces with the Stream.merge() function to avoid gaps). Then I would start over with another stream and so on. Or I guess I could do something similar by using the sampling frequency and number of samples in the packet.

I feel like the approach is kind of clunky though, and I was wondering if there is maybe a better way or a dedicated function?

2 replies
MARCELO PERES ROCHA
@mprocha
image.png
4 replies
Hello everyone!!! I'm using the obspy plot with the dayplot option, but when I zoom in on the seismogram the plot comes out like the one in the figure above. The data has a sampling rate of 100 Hz. Does anyone know how to make it so that I can see all the samples in the plot?
datseismo
@datseismo
hii, while converting data from sac to miniseed format all the header information such as station lat lon, event lat lon, are lost. So here I need some suggestion so that miniseed data would contain proper header info. Thanks in advance.
Calum Chamberlain
@calum-chamberlain
miniseed headers do not include station location information (see the IRIS page on the SEED format). Station location information is more commonly handled in metadata such as dataless SEED or stationxml. Event data are commonly handled in event files such as QuakeML. Full SEED format contains the combined dataless SEED and miniSEED, and hence can contain the station location information.
Emmanuel D. Castillo Taborda
@ecastillot

Hi everyone,

I want to load a request client for specific data structure archive on local filesystem. The structure is:
"{year}-{month}/{year}-{month}-{day}/{network}.{station}.{location}.{channel}.{year}-{julianday}"

Do you know any way to do this?
Thank you very much for your help.

Emmanuel Castillo

Tobias Megies
@megies
@ecastillot you can do that with the SDS client but simply replacing FMTSTR on the client instance
https://docs.obspy.org/master/packages/autogen/obspy.clients.filesystem.sds.Client.FMTSTR.html#obspy.clients.filesystem.sds.Client.FMTSTR