Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 27 09:54
    krishna-byte-cmd opened #2888
  • Oct 25 05:04
    WallsnBridges starred obspy/obspy
  • Oct 24 13:10
    hirotoyoshidome starred obspy/obspy
  • Oct 23 21:55
    kibwolf starred obspy/obspy
  • Oct 21 15:46
    sheng09 edited #2887
  • Oct 21 15:44
    sheng09 opened #2887
  • Oct 21 14:42
  • Oct 21 07:05
    flixha edited #2886
  • Oct 20 16:47
    flixha synchronize #2886
  • Oct 20 16:40
    flixha opened #2886
  • Oct 20 16:29
    moebious414 starred obspy/obspy
  • Oct 20 09:12
    JandyZ22 starred obspy/obspy
  • Oct 19 10:10
    filefolder commented #2834
  • Oct 19 09:30
    ThomasLecocq commented #2284
  • Oct 19 06:13
    Chen-Sue starred obspy/obspy
  • Oct 18 16:01
    leafwell starred obspy/obspy
  • Oct 18 09:21
    flixha commented #2814
  • Oct 18 09:02
    ThomasLecocq commented #2814
  • Oct 18 08:59
    flixha commented #2814
  • Oct 18 08:38
    flixha synchronize #2814
niralas12
@niralas12
This message was deleted
1 reply
Thomas Lecocq
@ThomasLecocq

You shouldn't need to use st+= anywhere, just loop over your streams and use the ppsd.add(st) method according to the tutorial. Have you tried following the tutorial?

is the way:

so:

for i, file in enumerate(files):
    st = read(file)
    if i == 0:
        ppsd = PPSD(stats=st[0].stats, metadata = inv)
    else:
        ppsd.add(st)
Thomas Lecocq
@ThomasLecocq
forgot ppsd.add(st) in the first if ; or remove the else and de-indent
niralas12
@niralas12
ok @ThomasLecocq @calum-chamberlain i will try and let you know..Thanks.
niralas12
@niralas12
Thanks it worked now @ThomasLecocq @calum-chamberlain
niralas12
@niralas12
@ThomasLecocq is it possible to change the title, xlabel, ylabel of the ppsd plot using ppsd.plot().,Its always taking the default parameters.can you suggest some solution for the same.
Thomas Lecocq
@ThomasLecocq
no, not easily, save to PDF or SVG and edit in inkscape is the easiest. Or create your own script based on the PPSD plot method to the changes you want, but that's more work
niralas12
@niralas12
Thanks for the information @ThomasLecocq
sadalsuud
@sadalsuud
hi, I want to write a code for write file format seg2 ... somebody helpme ? ...
1 reply
sadalsuud
@sadalsuud
Geopsy can not wtite seg2 ... I want merge mant files seg2 to unique file
*Many files
79seismo
@79seismo
@sadalsuud ObsPy is not the place. Instead, try https://ge0mlib.com/software.htm
Thomas Lecocq
@ThomasLecocq
indeed, the problem with SEG2 is like for any SEG-* (seg-d, segy etc) , the canevas is +- standard, but each manufacturer can fill this canvas with its own data/way. In any case, supporting "write" for all of them is basically impossible without really dedicating someone for coding it (= paid job)
Atikul Haque Farazi
@ahfarazi-kU
Hello there, I want to separate amplitude and time columns from my trace to plot energy. I can get the array with tr.data option. But not finding a way how to do it ultimately.
Will be thankful if let me know a convenient way of doing this.
Calum Chamberlain
@calum-chamberlain
The convenience method tr.times will probably help.
1 reply
niralas12
@niralas12
Hii, i have a large miniseed file of 5 days continuous data. I want to split it into 1 day chunks or 1 hour chunks. How can it be done using obspy please suggest.Thanks.
Calum Chamberlain
@calum-chamberlain
Read in the data then either use st.slice or, for in-place splitting, use st.trim. You probably want to use st.slice to avoid copying your data though.
niralas12
@niralas12
Thanks @calum-chamberlain for the valuable suggestions...
Jonathan Schaeffer
@joschaeffer_gitlab
Hello, can you help me to determine if there is a problem with obspy conversion from dataless SEED to RESP format ?
The "issue", if any, is that for a particular channel, the RESP output from obspy is :
#        << obspy, Version 1.2.2 >>
#        
#        ======== CHANNEL RESPONSE DATA ========
B050F03     Station:     LP15
B050F16     Network:     ZU
B052F03     Location:    00
B052F04     Channel:     HHZ
B052F22     Start date:  2016,175
B052F23     End date:    2016,322,23:59:59.0000
#        =======================================
The start date miss the time information (in stationXML metadata, this is 00:00:00.0000)
And the converison code is done from IRIS stationXML converter to RESP by Parser(dataless).write_resp(folder=tmp, zipped=False)
obspy.io.xseed.parser
Jonathan Schaeffer
@joschaeffer_gitlab
  1. get the stationXML metadata and convert to dataless :
    wget -q  "http://ws.resif.fr/fdsnws/station/1/query?net=ZU&sta=LP15&loc=00&cha=HHZ&level=channel" -O ZU.LP15.00.HHZ.xml && java -jar stationxml-seed-converter-2.1.0.jar --output ZU.LP15.00.HHZ.dataless ZU.LP15.00.HHZ.xml
  2. Parse the dataless and write the response to file
    from obspy.io.xseed.parser import Parser
    Parser('ZU.LP15.00.HHZ.dataless').write_resp(folder='.', zipped=False)
    /home/schaeffj/.local/lib/python3.9/site-packages/obspy/io/xseed/fields.py:377: UserWarning: Date is required.
    warnings.warn('Date is required.', UserWarning)
  3. Look at the file:
    at RESP.ZU.LP15.00.HHZ    
    #        << obspy, Version 1.2.2 >>
    #        
    #        ======== CHANNEL RESPONSE DATA ========
    B050F03     Station:     LP15
    B050F16     Network:     ZU
    B052F03     Location:    00
    B052F04     Channel:     HHZ
    B052F22     Start date:  2016,175
    B052F23     End date:    2016,322,23:59:59.0000
    #        =======================================
    #        +                  +---------------------------------------+                  +
    #        +                  |   Channel Sensitivity,  LP15 ch HHZ   |                  +
    #        +                  +---------------------------------------+                  +
    #        
    B058F03     Stage sequence number:                 0
    B058F04     Sensitivity:                           0.000000E+00
    B058F05     Frequency of sensitivity:              0.000000E+00 HZ
    B058F06     Number of calibrations:                0
2 replies
Jonathan Schaeffer
@joschaeffer_gitlab
I wrote an issue
John Aiken
@mnky9800n
i get this message UserWarning: Length of prepared template stream and data stream are different. Make sure the data does not contain gaps. -> do not use template 0 what exactly does this mean? i feel like the length of the template should, by definition (almost), be different then the length of the data stream since you are sliding the template along the data stream. but i could have a complete misconception of what is happening
3 replies
also this warning doesnt occur all the time, only some of the time. it may be co-occuring with gaps in the data stream
niralas12
@niralas12
Hii Goodafternoon, i want to download dataless inventory file "dataless.GT.LBTB.seed" for the station LBTB, for the ppsd plot,can anybody help me on this ??
15 replies
fontiela
@fontiela

Hi,

I cross-correlate waveforms of 10 seismic stations deployed in two differente sites. In one site seismic stations worked during 21 days and on the other 27 days.
To cross-correlate I used XCORR function with window lenght 6000 points (equivalent to 30s). Looking into the results of the 45 pair stations correlations of each site I noticed that:

- in both  sites each station pair as the same number of coefficients (12001);
- cross-correlation coefficient start increasing till rich maximum 1 at coefficient 6000 and   decrease to 12001 (like a gaussian curve).

I expected much more cross-correlations coefficients since I have several days of data and a window length of 30s.

I don’t know what I have done wrong. Can anyone give some clues?

The intent is analyze between noise-correlation versus intersensor distance (like fig. 2 of Braun & Schweitzer, 2008 [link: https://pubs.geoscienceworld.org/ssa/bssa/article/98/4/1876/342003/Spatial-Noise-Field-Characteristics-of-a-Three])

Thomas Lecocq
@ThomasLecocq
My suggestion before going to bed: use msnoise :)
fontiela
@fontiela
@ThomasLecocq I like your recommendation. I near future I'm planning use MsNoise to analise seismic noise in another seismic network. Now, I just need compare cross-correlations coefficients with intersensor distances
Atikul Haque Farazi
@ahfarazi-kU
Hello, is there any "buffer" like function of matlab in obspy to work with moving time window with some overlapping, as done in geopsy software for H/V computation?
2 replies
datseismo
@datseismo
Hii, i need to plot data availability of whole stations of all year , can anybody suggest me a tutorial.However obspy scanner doesnot plot whole data.
datseismo
@datseismo
ERROR is bash: /home/seis/SOFT/anaconda3/bin/obspy-scan: Argument list too long
Thomas Lecocq
@ThomasLecocq
pass a folder to the obspy-scan, not a list of files
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