Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 05 21:01
    dependabot[bot] opened #3233
  • Dec 05 21:01

    dependabot[bot] on github_actions

    Bump pypa/gh-action-pypi-publis… (compare)

  • Dec 05 21:01
    dependabot[bot] labeled #3233
  • Dec 04 00:28
    yjtangcug starred obspy/obspy
  • Dec 03 15:11
    wjie0309 starred obspy/obspy
  • Dec 03 08:18
    kaspervanwijk commented #3070
  • Dec 03 06:56
    robinthibaut starred obspy/obspy
  • Dec 02 16:24
    timronan commented #2864
  • Dec 02 15:53
    heavelock closed #2761
  • Dec 02 15:53
    heavelock commented #2761
  • Dec 02 14:24
    megies commented #2987
  • Dec 02 14:21
    megies milestoned #3231
  • Dec 02 14:21
    megies unlabeled #3231
  • Dec 02 14:21
    megies labeled #3231
  • Dec 02 14:21
    megies labeled #3231
  • Dec 02 14:20
    megies synchronize #3232
  • Dec 02 14:20

    megies on seedlink_get_info

    seedlink: add regression test f… (compare)

  • Dec 02 14:19
    megies unlabeled #3232
  • Dec 02 14:19
    megies edited #3232
  • Dec 02 14:19
    megies edited #3232
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
John F. Rudge
@johnrudge
An advert: Ever wanted an ellipticity correction for a taup ray path? Well, now you can with EllipticiPy: https://github.com/StuartJRussell/EllipticiPy
Ultimately EllipticiPy should probably end up in the main obspy package, but for now it is separate. Please do test if you're interested and let me know any issues you find.
Tobias Megies
@megies
:thumbsup:
Derrick Chambers
@d-chambers
@barsch we aren't doing this liberapay thing anymore to support ObsPy right? Or are you still getting money from that source to run the server? I ask because my yearly donation is coming up and I need to know if I should cancel.
Robert Barsch
@barsch
@d-chambers I stopped everything - any payment therefore shouldn't go through - but canceling may be better to prevent any issues
Derrick Chambers
@d-chambers
:thumbsup:
aaaaa-ch
@aaaaa-ch
Hello everyone, Why are two thresholds set when using classic sta lta.
aaaaa-ch
@aaaaa-ch
plot_trigger(trace, cft, 1.5, 0.5) I think 1.5 and 0.5 represent two thresholds in the script, right?
John Aiken
@mnky9800n
This may be a question that is not exactly an "obspy" question. why does aic trigger often pick after an event when the event is tapered/zeropadded/etc?
Figure 3 (1).png
the way i understand it, aic is basically a comparison of the aic score where the model is the signal variance https://docs.obspy.org/packages/autogen/obspy.signal.trigger.aic_simple.html
image.png
so if you minimize the tiny equation why is the minimum AIC after the signal?
John Aiken
@mnky9800n
also what is N in the equation? maybe i just dont understand how its calculated