[obspy-users] Polarization error message

Joachim Wassermann j.wassermann at lmu.de
Thu Jan 4 15:50:43 CET 2018


Hi Javier,

why should the win_len parameter be a string?  Just remove the single
quotes and it should work.

Best Joachim


On 04/01/18 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. Joachim Wassermann

   Geophysikalisches Observatorium   
   Ludwigshoehe 8                   
   82256 Fuerstenfeldbruck           
                                    
   Tel.: +49 89 2180-739-62          
   FAX.: +49 89 2180-739-70          

 email: j.wassermann at lmu.de
 www: www.erdbeben-in-bayern.de | www.geophysik.uni-muenchen.de
..................................................................

   Department fuer Geo- & Umweltwissenschaften
   Sektion Geophysik
   Theresienstrasse 41/IV
   80333 Muenchen

  Tel.: +49 089 2180 4237
  FAX.: +49 089 2180 4205
------------------------------------------------------------------

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


More information about the obspy-users mailing list