[MSNoise] error in pws

Thomas Lecocq thomas.lecocq at oma.be
Thu Mar 30 07:21:43 UTC 2017


Hi Sun Jie,

It's again a numpy-too-recent problem (and our mistake to leave non-int 
values where they should be). I've now corrected this in the development 
version, in the meantime just replace:

line 982, in stack
     coh = np.convolve(sp.signal.boxcar(timegate_samples)/timegate_samples, coh, 'same')

by

line 982, in stack
     coh = np.convolve(sp.signal.boxcar(int(timegate_samples))/timegate_samples, coh, 'same')


and it should work.

Thomas

Le 30/03/2017 à 04:06, 孙杰 a écrit :
> Hi, Thomas
>     I'm Sun Jie , very sorry to sent you email twice due to some problems in my first email system.
> Following your suggestion, I have solved the autocorrelation plotting problem ,many thanks!
>    However, i have another question about pws stacking. I 'config' the stack_method=pws ,pws power=2 , pws_timegate=10.0,autocorr=Y,ZZ=Y....,
> There is following error when I 'compute_cc'. How can i solve this problem? many thanks!
>
> $ msnoise compute_cc
> result in
> 2017-03-30 09:38:15 [INFO] *** Starting: Compute CC ***
> 2017-03-30 09:38:15 [INFO] Will compute ZZ RR TT
> 2017-03-30 09:38:16 [INFO] New CC Job: 2010-03-11 (1 pairs with 1 stations)
> 2017-03-30 09:38:16 [DEBUG] YP.NE49.Z Reading 1 Files
> 2017-03-30 09:38:16 [DEBUG] Checking sample alignment
> 2017-03-30 09:38:16 [DEBUG] Checking Gaps
> 2017-03-30 09:38:16 [DEBUG] YP.NE49.Z Slicing Stream to 2010-03-11T00:00:00.000000Z:2010-03-11T23:59:59.800000Z
> 2017-03-30 09:38:16 [DEBUG] YP.NE49.Z Highpass at 0.01 Hz
> 2017-03-30 09:38:16 [INFO] Processing pair: YP.NE49 vs YP.NE49
> 2017-03-30 09:38:16 [DEBUG] Azimuth=0.0
> Process Process-1:
> Traceback (most recent call last):
>    File "/home/sj/anaconda2/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
>      self.run()
>    File "/home/sj/anaconda2/lib/python2.7/multiprocessing/process.py", line 114, in run
>      self._target(*self._args, **self._kwargs)
>    File "/home/sj/anaconda2/lib/python2.7/site-packages/msnoise/s03compute_cc.py", line 690, in main
>      corr = stack(db, corrs)
>    File "/home/sj/anaconda2/lib/python2.7/site-packages/msnoise/api.py", line 982, in stack
>      coh = np.convolve(sp.signal.boxcar(timegate_samples)/timegate_samples, coh, 'same')
>    File "/home/sj/anaconda2/lib/python2.7/site-packages/scipy/signal/windows.py", line 59, in boxcar
>      return np.ones(M, float)
>    File "/home/sj/anaconda2/lib/python2.7/site-packages/numpy/core/numeric.py", line 192, in ones
>      a = empty(shape, dtype, order)
> TypeError: 'float' object cannot be interpreted as an index
> _______________________________________________
> MSNoise mailing list
> MSNoise at mailman-as.oma.be
> http://mailman-as.oma.be/mailman/listinfo/msnoise



More information about the MSNoise mailing list