Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 30 23:51
    kaspervanwijk commented #3070
  • Nov 30 11:18
    dylanmikesell commented #3070
  • Nov 30 10:46
    megies commented #3070
  • Nov 29 15:54
    dylanmikesell commented #3070
  • Nov 29 14:19
    megies commented #3161
  • Nov 29 14:18
    megies labeled #3161
  • Nov 29 14:18
    megies labeled #3161
  • Nov 29 14:18
    megies milestoned #3161
  • Nov 29 14:18
    megies milestoned #3161
  • Nov 28 23:29
    michaelbuerger starred obspy/obspy
  • Nov 25 10:18
    megies commented #824
  • Nov 25 10:18
    megies commented #824
  • Nov 25 10:08
    steve8x8 commented #824
  • Nov 25 10:07
    steve8x8 commented #824
  • Nov 25 09:59
    steve8x8 commented #824
  • Nov 25 09:54
    steve8x8 commented #824
  • Nov 25 09:18
    trichter closed #2490
  • Nov 25 09:18
    trichter commented #2490
  • Nov 25 00:47
    grahamwaters starred obspy/obspy
  • Nov 24 14:25

    trichter on master

    remove collections.abc work-aro… remove more code only necessary… remove work-arounds for old req… and 13 more (compare)

Atikul Haque Farazi
@ahfarazi-kU
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
you will have to subclass from SDS client and override that one private function, because currently 'month' and 'day' are not used in that format string
2 replies
Tobias Megies
@megies
Sam
@samuelchodur
I am trying to modify the function array_processing to also output F-Statistic. I am confused about the call to generalizedBeamFormer . Is there code within generalizedBeamFormer that is a duplicate of some of the Python code above the call to it (generalizedBeamFormer)?
Alexandre Kazantsev
@aliex_gitlab
Hey everyone ! In array_processing - line 975, shouldn't it be if prewhiten==1 instead of if method==1 ? It would seem logic to me and I don't see where prewhiten is used otherwise. Please correct me if I am wrong.
Thanks
Alex
Tobias Megies
@megies
2 replies
igmuhlmann
@igmuhlmann
Hi. Can I use simulate_seismometer to simulate the response of a theoretical instrument to simulated ground motion (i.e. assume a step function as displacement and run simulate_seismometer in order to get what a real sensor would see)? I don't see how I can tell simulate_seismometer what it currently sees (displacement, velocity or acceleration) as input parameters. Thanks for a short answer - and sorry if my question is trivial.
2 replies
Munkhsaikhan Amarsanaa
@BoDoNgAhAi
Hello everyone! Does someone know how to read GeoSIG data in obspy? or an alternative way? Thank you.
4 replies
aaaaa-ch
@aaaaa-ch
Hello, Does someone know how to change the .sgy to .txt file? Thank you.
starr34
@starr34
@aaaaa-ch you can perform this work by adopting from obspy.io.segy.core import _read_segy and simply write it to ASCII format
branyan12
@branyan12
Hello everyone, does anyone know how to add different levels of noise to the waveform in .mseed format?
Tobias Megies
@megies
You can add another array on top of your Trace's data
tr.data = tr.data + np.random.randn(len(tr)) * 1000
The real question is what kind of noise do you want to add and how to create the sample noise ;-)
@branyan12
branyan12
@branyan12
Ok, super thanks