[obspy-users] Polarization error message

Thomas Lecocq Thomas.Lecocq at seismology.be
Thu Jan 4 15:26:27 CET 2018


Hi,

your call includes

win_len='10.0',


which is a "string" in Python, replace by

win_len=10.0,

Cheers,

tom


On 04/01/2018 01:39, Javier Francisco Pacheco wrote:
>
> Dear Obspy users;
>  I am running obspy 1.1.0 for Python 3.6.3 on a MacOsX 10.13.2
>  Can anybody help me finding out what is the error I am getting when 
> running polarization_analisys. Doesn’t seem to be the parameters I am 
> using as input, but some python coding problem that could be related 
> to the version.
>
> result = 
> polarization.polarization_analysis(stream=s,win_len='10.0',win_frac=0.5,frqlow=0.1,frqhigh=10.,stime=s[0].stats.starttime,etime=s[0].stats.endtime,verbose=True,method='flinn')
> stream contains following traces:
> 3 Trace(s) in Stream:
> OV.VTCE.1M.HHE | 2017-08-27T10:38:56.459961Z - 
> 2017-08-27T10:41:16.459961Z | 100.0 Hz, 14001 samples
> OV.VTCE.1M.HHN | 2017-08-27T10:38:56.459961Z - 
> 2017-08-27T10:41:16.459961Z | 100.0 Hz, 14001 samples
> OV.VTCE.1M.HHZ | 2017-08-27T10:38:56.459961Z - 
> 2017-08-27T10:41:16.459961Z | 100.0 Hz, 14001 samples
> stime = 2017-08-27T10:38:56.459961Z, etime = 2017-08-27T10:41:16.459961Z
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File 
> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/obspy/signal/polarization.py", 
> line 494, in polarization_analysis
>   nsamp = int(win_len * fs)
> TypeError: can't multiply sequence by non-int of type ‘float'
>
>
> Many thanks;
>
> Javier Francisco Pacheco
> javier.pacheco.alvarado at una.cr <mailto:javier.pacheco.alvarado at una.cr>
>
> "If our biological imperative is to pass our genes to the 
> next generation, our moral imperative has to be to try, before 
> we become corpses, to leave them a planet they can survive on.”
> Anthony Doerr (2017)
>
>
>
> _______________________________________________
> obspy-users mailing list
> obspy-users at lists.swapbytes.de
> http://lists.swapbytes.de/mailman/listinfo/obspy-users

-- 
Dr. Thomas Lecocq
Geologist - Seismologist

Seismology - Gravimetry
Royal Observatory of Belgium

            *
        * * * * *
         * * * *
        ---------
http://www.seismology.be
http://msnoise.org
http://twitter.com/#!/Seismologie_be
https://www.facebook.com/seismologie.be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.swapbytes.de/pipermail/obspy-users/attachments/20180104/6c81c252/attachment.html>


More information about the obspy-users mailing list