Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:22
    nick-iris edited #2510
  • 20:19
    nick-iris edited #2510
  • 20:17
    nick-iris synchronize #2510
  • 18:51
    nick-iris commented #2421
  • 18:25
    nick-iris commented #2510
  • 16:33
    megies commented #2421
  • 16:16
    mikehagerty commented #2421
  • 16:04
    megies commented #2510
  • 16:03
    megies synchronize #2510
  • 15:59
    megies synchronize #2510
  • 15:14
    megies commented #2510
  • 15:12
    ThomasLecocq commented #2510
  • 14:44
    megies commented #2510
  • 14:19
    ThomasLecocq commented #2511
  • 14:13
    krischer commented #2511
  • 14:10
    krischer commented #2206
  • 14:09
    krischer labeled #2511
  • 14:09
    krischer opened #2511
  • 14:06

    krischer on tsindex

    Initial code for tsindex client. - Fixed get_availability method… Fix get_availability and get_av… and 42 more (compare)

  • 13:30
    krischer commented #2206
Thomas Lecocq
@ThomasLecocq
something like this
# Retain precision but convert float
data = np.array(stream[0].data)
# Sort the values, eliminate repeats with unique
data2 = np.sort(np.unique(data))
# Instrument constant to ints is the median of the distribution
divisor = np.median(np.diff(data2))
# Convert to int
data_int = np.round(data/divisor, decimals=4).astype(np.int32)

# Residuals
# data_res = np.round(data/divisor, decimals=4) - data_int

# Convert from float 32 to int 32
dat[0].data = data_int.astype(np.int32)
make sure to test that before going to production...
fontiela
@fontiela
@ThomasLecocq thanks again for your hints and help. I will try the code you post to convert floating numbers into int. I don't understand why SEISAN is doing that since I have the latest version installed. I will also search for help near SEISAN community.
Tobias Megies
@megies
@titi-dev regarding seismo-live, the cloud infrastructure we were on was shut down, we are in the process of a big rework, for now we have an emergency mybinder setup in place, you can click through to get to the individual notebooks in the jupyter page that opens
@fontiela yeah, we are currently checking options how to replace the ancient mailing list setup we're running, it might take some time yet though until we have a replacement
Tobias Megies
@megies
@fontiela just to confirm, what you're seeing is just a warning, all's fine. When reading mseed we store info on the original storage parameters (e.g. encoding which is usually an int-only STEIM encoding). Most processing you do will leave your data as float and it can then not be stored with the same encoding sa the original data. An appropriate encoding will be chosen. Note that float encodings take up significantly more space in mseed.
titi-dev
@titi-dev
Good evening.please suggest some source code for ambient noise autocorrelation.
Thomas Lecocq
@ThomasLecocq
Really ??????
titi-dev
@titi-dev
Yes sir..really
Thomas Lecocq
@ThomasLecocq
Amazing. Truly amazing.
titi-dev
@titi-dev
Ha ha
Thomas Lecocq
@ThomasLecocq
N
Thomas Lecocq
@ThomasLecocq
I have an idea of a python, obspy-based software that can do this... Can't remember the name, sadly....
titi-dev
@titi-dev
OK
Tobias Megies
@megies
Thomas Lecocq
@ThomasLecocq
oh yeah, true, my very own software package ! :-)
shakeel-it
@shakeel-it
Hi! Can anyone tell me how to use obspy with jupyter notebook
I am getting this error:('ModuleNotFoundError: No module named 'obspy')
obspy is working fine without jupyter notebook
Elliott Sales de Andrade
@QuLogic
It's no different than any other package
Calum Chamberlain
@calum-chamberlain
Have you installed jupyter and obspy in the same environment?
shakeel-it
@shakeel-it
yes in the base environment
shakeel-it
@shakeel-it
@calum-chamberlain you were right it was not in the same environment
solved
one more question
Calum Chamberlain
@calum-chamberlain
Also, see the note on the obspy install page about not installing in the conda base env.
shakeel-it
@shakeel-it
I want to read numpy column as my data in the stream object
x[:,2]
can i read this?
Calum Chamberlain
@calum-chamberlain
Streams do not have a data attribute, but are a collection of Traces that do have a data attribute, which is a numpy array. You can generate a Trace from a numpy array using calls similar to those found in the anything to miniseed tutorial.
shakeel-it
@shakeel-it
I thought other way around is possible.
I have created numpy arrays from trace objects
Calum Chamberlain
@calum-chamberlain
Yes, you can just get a numpy array from a trace by something like arr = trace.data. I'm not sure what you are asking?
shakeel-it
@shakeel-it
I want to utilize obspy for generating spectrograms
I already have made numpy arrays of trace data
Calum Chamberlain
@calum-chamberlain
So you have a trace and you want to make a spectrogram for that trace, like this? What was wrong with doing that?
shakeel-it
@shakeel-it
nothing is wrong. it works like that.
Calum Chamberlain
@calum-chamberlain
:+1: bonza, problem solved?
shakeel-it
@shakeel-it
I mean to say it works how you are saying but I am trying to do something. I'll figure out. Thank you for your quick response
Calum Chamberlain
@calum-chamberlain
Okay, I don't understand what you want
Thomas Lecocq
@ThomasLecocq
if all traces have the same length (!!required!!), I wonder if arr = np.asarray(st) is not giving a 2D array ? (didn't test, just thinking)
In [1]: from obspy import read                                    

In [2]: st = read()                                               

In [3]: import numpy as np                                        

In [4]: np.asarray(st)                                            
Out[4]:                                                           
array([[ 0.        ,  0.00694644,  0.07597424, ...,  1.93449584,  
         0.98196204,  0.44196924],                                
       [ 0.        ,  0.00604377,  0.07638602, ...,  1.00600271,  
         0.49260146,  0.25438282],                                
       [ 0.        , -0.01443364, -0.17701521, ...,  0.82668861,  
         0.43544484,  0.19766389]])
it does
Tobias Megies
@megies
@ThomasLecocq it might be super slow though, I'm expecting it to use __getitem__ on the traces pulling each sample out individually.. thats usually what numpy does if it doesnt know better, didnt test though
Thomas Lecocq
@ThomasLecocq
True point... was just pointing out the easy solution, don't care if it's fast :-)
Tobias Megies
@megies
yeah, i gotcha
the easy way leads to the dark side, always remember
Thomas Lecocq
@ThomasLecocq
:-)
aka use matlab :-)