Giter Club home page Giter Club logo

seisgo's Issues

optimize order of detrend and demean in slicing_trace

The current function slicing_trace() in utils.py does demean and detrend after finishing the slicing work. This might influence the trace_std. A more optimal order might be to do deman and detrend twice: one at the very beginning against the whole trace, another once before computing the trace std. We will need to test whether this change makes any meaningful difference in the sliced data and the correlations.

add rotate_corrdata

Add a function to rotate the components of a list of CorrData objects with all 9 component pairs. This capability is currently in the outdated do_stacking() function in noise.py. The stacking functionality is now replaced with merge_pair() function. The rotation functionality should be separated out from stacking.

loop through pairs in noise.shaping_corrdata

The current noise.shaping_corrdata only works on the first station pair, by assuming there is only one pair. This needs to be changed to loop through all pairs. Component option could also be changed accordingly to consider all data in the ccfile.

bugs/typo in noise.py

Line no 516: Indx = np.where(cc_comp==comp)[0]
It is not working as cc_comp is a list.
Line no 613: dstack[i,:] = stack.seisstack(cc_array,method=method,par=par)
method is a list here, but seisstack is expecting a string.
Moreover, In the function do_stacking, there is conflict between variable 'rotation' and function call to 'rotation'.

Note: This is the first time I am reporting any issue on this platform. So please accept my apology in advance if this is not the correct way of presenting.

error when saving LARGE CorrData.time attribute

This is basically a HDF issue that only attributes < 64k can be saved. When saving CorrData as an auxiliary data, the time attribute, which is wrapped in parameter dictionary, might be too large to save in some cases. This may occur often when saving the merged data. No easy fix yet. A compromise is to reduce the length of the time attribute. The following lines will reproduce the error:

import pyasdf
import numpy as np
from obspy import UTCDateTime
data=np.random.rand(10000)
tt=np.float64(UTCDateTime('2021-01-01'))+1000*data
para={"time":tt}
with pyasdf.ASDFDataSet('test.h5',mpi=False) as ds:
    ds.add_auxiliary_data(data=data, data_type='test', path='random', parameters=para)

Here is the error:

RuntimeError: Unable to create attribute (object header message is too large)

corrdata is still saved if not successfully split

In some case (not clear yet), the splitting may fail. It seems sometimes, the corrdata object that are not successfully split will still be saved. This needs to be fixed to avoid errors in later processing steps.

cannot import name 'tukey' from 'scipy.signal'

HI Prof. Yang,

I finally managed to install seisgo and there is a problem that I encountered and I want share in this issure, and I think it might help others to quickly fix their problem.

The automatically downloaded scipy version is 1.13.0 and I kept recieving the error "cannot import name 'tukey' from 'scipy.signal". However, after I downgrade scipy to 1.10.1, there is no problem with it.

So I think there is a version dependency on scipy too and maybe you could mention this in your tutorial.

Cheers,
Xin

ImportError: cannot import name 'tukey' from 'scipy.signal'

Hello,

I've just installed Seisgo and when checking the installation per the instructions I get the following error,


>>> from seisgo import obsmaster as obs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\j.andres\Anaconda3\envs\seisgo\SeisGo\seisgo\obsmaster.py", line 4, in <module>
    from seisgo import utils,downloaders
  File "C:\Users\j.andres\Anaconda3\envs\seisgo\SeisGo\seisgo\utils.py", line 14, in <module>
    from scipy.signal import tukey,hilbert
ImportError: cannot import name 'tukey' from 'scipy.signal' (C:\Users\j.andres\Anaconda3\envs\seisgo\Lib\site-packages\scipy\signal\__init__.py)

Searching Scipy documentation, seems that tukey is not withing scipy.signal but scipy.signal.windows.tukey.

Is that correct? If not, could you suggest any insight on the problem?

Thank you.

Scipy.signal

Hi again. The previous #29 error was resolved but I'm finding something new at the moment.

I'm trying to reproduce this notebook. When downloading the data it reports the following

time segment:2014_02_01_00_00_00 to 2014_02_01_06_00_00
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
time segment:2014_02_01_06_00_00 to 2014_02_01_12_00_00
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC05
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07
module 'scipy.signal' has no attribute 'hann' for DEC07

Could this be related to the previous issue where some scipy.signal functions are now under scipy.signal.windows?

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.