Hello,
I am using MSNoise on two different PC's (Ubuntu 12.04 [AMD A6] and Ubuntu
14.04 [Intel i7]), each computer has the same version of MSNoise (1.2.4)
but differents sets of data. I compute all the steps without a problem but
when I try to compute *07.plot_dtt.py <http://07.plot_dtt.py>* the routine
fails. I got two different error messages:
Ubuntu 12.04:
*oscar@bayta:~/sweet_noise$ py 07.plot_dtt.py <http://07.plot_dtt.py> *
*/home/oscar/anaconda/lib/python2.7/site-packages/numpy/oldnumeric/__init__.py:11:
ModuleDeprecationWarning: The oldnumeric module will be dropped in Numpy
1.9*
* warnings.warn(_msg, ModuleDeprecationWarning)*
*/home/oscar/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/pkg_resources.py:991:
UserWarning: /home/oscar/.python-eggs is writable by group/others and
vulnerable to attack when used with get_resource_filename. Consider a more
secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE
environment variable).*
*loading 1 days*
*Traceback (most recent call last):*
* File "07.plot_dtt.py <http://07.plot_dtt.py>", line 115, in
<module>*
* py1_wmean, py1_wstd = get_wavgwstd(allbut)*
* File "07.plot_dtt.py <http://07.plot_dtt.py>", line 59, in
get_wavgwstd*
* h = grouped.apply(wstd)*
* File
"/home/oscar/anaconda/lib/python2.7/site-packages/pandas/core/groupby.py",
line 424, in apply*
* return self._python_apply_general(f)*
* File
"/home/oscar/anaconda/lib/python2.7/site-packages/pandas/core/groupby.py",
line 427, in _python_apply_general*
* keys, values, mutated = self.grouper.apply(f, self.obj, self.axis)*
* File
"/home/oscar/anaconda/lib/python2.7/site-packages/pandas/core/groupby.py",
line 883, in apply*
* res = f(group)*
* File
"/home/oscar/anaconda/lib/python2.7/site-packages/pandas/core/groupby.py",
line 422, in f*
* return func(g, *args, **kwargs)*
* File "07.plot_dtt.py <http://07.plot_dtt.py>", line 52, in wstd*
* wstd = np.sqrt(np.sum(w * (d - wavg) ** 2) / ((N - 1) * np.sum(w) /
N))*
*ZeroDivisionError: float division by zero*
Ubuntu 14.04:
*oscar@terminus:~/msnoise_sismo$ py 07.plot_dtt.py <http://07.plot_dtt.py>*
*/home/oscar/bin/python/anaconda/lib/python2.7/site-packages/setuptools-3.6-py2.7.egg/pkg_resources.py:1045:
UserWarning: /home/oscar/.python-eggs is writable by group/others and
vulnerable to attack when used with get_resource_filename. Consider a more
secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE
environment variable).*
*loading 1 days*
*Traceback (most recent call last):*
* File "07.plot_dtt.py <http://07.plot_dtt.py>", line 128, in
<module>*
*
plt.fill_between(ALL.index,ALL[dttname]-ALL[errname],ALL[dttname]+ALL[errname],lw=1,color='red',zorder=-1,alpha=0.3)*
* File
"/home/oscar/bin/python/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py",
line 2757, in fill_between*
* interpolate=interpolate, **kwargs)*
* File
"/home/oscar/bin/python/anaconda/lib/python2.7/site-packages/matplotlib/axes.py",
line 6988, in fill_between*
* x = ma.masked_invalid(self.convert_xunits(x))*
* File
"/home/oscar/bin/python/anaconda/lib/python2.7/site-packages/numpy/ma/core.py",
line 2239, in masked_invalid*
* condition = ~(np.isfinite(a))*
*TypeError: ufunc 'isfinite' not supported for the input types, and the
inputs could not be safely coerced to any supported types according to the
casting rule ''safe''*
I am not a python expert and I haven't could solve these problems. If
anyone knows how to solve it please help me!
Thanks in advance!
Oscar
Show replies by date