BenthicSubstrateMapping / PyHum

Python code to read, display, export and analyse Humminbird sidescan sonar data
Other
68 stars 28 forks source link

Issue PyHum.dotest() #45

Closed ChristianF88 closed 7 years ago

ChristianF88 commented 7 years ago

Hi,

I'm using win 10 and I am running PyHum via Anaconda and a Spyder IDE. When I import PyHum I get this warning:

C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\matplotlib__init__.py:1405: UserWarning: This call to matplotlib.use() has no effect because the backend has already been chosen; matplotlib.use() must be called before pylab, matplotlib.pyplot, or matplotlib.backends is imported for the first time.

warnings.warn(_use_error_msg)

When I execute PyHum.dotest() I get the following:

Directory not copied. Error: [Error 183] Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist: 'C:\Users\Sieglinde\pyhum_test' Input file is C:\Users\Sieglinde\pyhum_test\test.DAT Son files are in C:\Users\Sieglinde\pyhum_test cs2cs arguments are epsg:26949 Draft: 0.3 Celerity of sound: 1450.0 m/s Port and starboard will be flipped Transducer length is 0.108 m Bed picking is auto Chunks based on distance of 100 m Data is from the 998 series Bearing will be calculated from coordinates Bearing will be filtered Checking the epsg code you have chosen for compatibility with Basemap ... epsg code compatible WARNING: Because files have to be read in byte by byte, this could take a very long time ... port sonar data will be parsed into 3.0, 99 m chunks starboard sonar data will be parsed into 3.0, 99 m chunks memory-mapping failed in sliding window - trying memory intensive version low-freq. sonar data will be parsed into 3.0, 99 m chunks high-freq. sonar data will be parsed into 3.0, 99 m chunks memory-mapping failed in sliding window - trying memory intensive version Traceback (most recent call last):

File "", line 1, in PyHum.dotest()

File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\PyHum\test.py", line 131, in dotest PyHum.read(humfile, sonpath, cs2cs_args, c, draft, doplot, t, bedpick, flip_lr, model, calc_bearing, filt_bearing, chunk) #cog

File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\PyHum_pyhum_read.py", line 667, in read x, bed = humutils.auto_bedpick(ft, dep_m, chunkmode, port_fp, c)

File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\PyHum\utils.py", line 79, in auto_bedpick imu.append(port_fp[k][np.max([0,int(np.min(bed))-buff]):int(np.max(bed))+buff,:])

File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\numpy\core\memmap.py", line 335, in getitem res = super(memmap, self).getitem(index)

TypeError: slice indices must be integers or None or have an index method

Thanks a lot for your help.

Have a good one! Christian

dbuscombe-usgs commented 7 years ago

error is related to numpy and is fixed if you rollback your version of numpy. This worked for me (after installing pyhum):

sudo pip install numpy==1.11.3
ChristianF88 commented 7 years ago

Hi there, thanks for your advice. Unfortunately I encounter a different Error now. I didn't use the sudo command, since I'm running on windows by the way.

The new error is:

(PyHumm) C:\Users\Sieglinde>python -c "import PyHum; PyHum.dotest()" RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa Traceback (most recent call last): File "", line 1, in File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\PyHum__init.py", line 60, in from PyHum._pyhum_read import read File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\PyHum_pyhum_read.py", line 61, in from scipy.io import savemat File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\io__init.py", line 97, in from .matlab import loadmat, savemat, whosmat, byteordercodes File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\io\matlab\init.py", line 13, in from .mio import loadmat, savemat, whosmat File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\io\matlab\mio.py", line 12, in from .miobase import get_matfile_version, docfiller File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\io\matlab\miobase.py", line 22, in from scipy.misc import doccer File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\misc\init__.py", line 53, in from scipy.interpolate._pade import pade File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\interpolate\init.py", line 176, in from .interpolate import * File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\interpolate\interpolate.py", line 20, in import scipy.linalg File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\linalg\init__.py", line 175, in from .misc import * File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\linalg\misc.py", line 5, in from .blas import get_blas_funcs File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\linalg\blas.py", line 155, in from scipy.linalg import _fblas ImportError: numpy.core.multiarray failed to import

dbuscombe-usgs commented 7 years ago

What version of Python are you using?

dbuscombe-usgs commented 7 years ago

You may need to reinstall scipy. If you are on windows, you could try this:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

(download, then ''pip install name_of_file.whl'')

ChristianF88 commented 7 years ago

sys.version: 2.7.13 | packaged by conda-forge | (default, May 2 2017, 13:28:48) [MSC v.1500 64 bit (AMD64)]

I did reinstall Scipy and now I get the following error:

(PyHumm) C:\Users\Sieglinde\Downloads>python -c"import PyHum;PyHum.dotest()" Traceback (most recent call last): File "", line 1, in File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\PyHum__init.py", line 60, in from PyHum._pyhum_read import read File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\PyHum_pyhum_read.py", line 61, in from scipy.io import savemat File "C:\Users\Sieglinde\Anaconda2\envs\PyHumm\lib\site-packages\scipy\init__.py", line 61, in from numpy._distributor_init import NUMPY_MKL # requires numpy+mkl ImportError: cannot import name NUMPY_MKL

I can't uninstall MKL with pip and when I try to do it wich conda it wants to uninstall a bunch of stuff. I'm trying to reinstall the hole lot on a virtual machine. I got no luck yet, but I'll keep you posted.

ChristianF88 commented 7 years ago

I did follow your instructions exactly when trying to install PyHum on the VM but I can't get it installed. The pip install PyHum command returns with:

(C:\Anaconda2) C:\Users\Python2>pip install PyHum Collecting PyHum Requirement already satisfied: pyproj in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: scikit-learn in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: scipy in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: cython in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: simplekml in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: numpy in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: pandas in c:\anaconda2\lib\site-packages (from PyHum) Collecting pyresample (from PyHum) Requirement already satisfied: basemap in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: scikit-image in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: toolz in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: joblib in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: dask in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: matplotlib in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: Pillow in c:\anaconda2\lib\site-packages (from PyHum) Requirement already satisfied: python-dateutil in c:\anaconda2\lib\site-packages (from pandas->PyHum) Requirement already satisfied: pytz>=2011k in c:\anaconda2\lib\site-packages (from pandas->PyHum) Requirement already satisfied: setuptools>=3.2 in c:\anaconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg (from pyresample->PyHum) Collecting pykdtree>=1.1.1 (from pyresample->PyHum) Using cached pykdtree-1.2.2.tar.gz In the tar file c:\users\python2\appdata\local\temp\pip-uy9gyv-unpack\pykdtree-1.2.2.tar.gz the member pykdtree-1.2.2/README is invalid: unable to resolve link inside archive Requirement already satisfied: pyyaml in c:\anaconda2\lib\site-packages (from pyresample->PyHum) Requirement already satisfied: configobj in c:\anaconda2\lib\site-packages (from pyresample->PyHum) Requirement already satisfied: six>=1.7.3 in c:\anaconda2\lib\site-packages (from scikit-image->PyHum) Requirement already satisfied: networkx>=1.8 in c:\anaconda2\lib\site-packages (from scikit-image->PyHum) Requirement already satisfied: PyWavelets>=0.4.0 in c:\anaconda2\lib\site-packages (from scikit-image->PyHum) Requirement already satisfied: functools32 in c:\anaconda2\lib\site-packages (from matplotlib->PyHum) Requirement already satisfied: cycler>=0.10 in c:\anaconda2\lib\site-packages (from matplotlib->PyHum) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in c:\anaconda2\lib\site-packages (from matplotlib->PyHum) Requirement already satisfied: olefile in c:\anaconda2\lib\site-packages (from Pillow->PyHum) Requirement already satisfied: decorator>=3.4.0 in c:\anaconda2\lib\site-packages (from networkx>=1.8->scikit-image->PyHum) Building wheels for collected packages: pykdtree Running setup.py bdist_wheel for pykdtree ... error Complete output from command C:\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\python2\appdata\local\temp\pip-build-ravfc7\pykdtree\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d c:\users\python2\appdata\local\temp\tmpbyowtxpip-wheel- --python-tag cp27: running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-2.7 creating build\lib.win-amd64-2.7\pykdtree copying pykdtree\test_tree.py -> build\lib.win-amd64-2.7\pykdtree copying pykdtree__init__.py -> build\lib.win-amd64-2.7\pykdtree running build_ext building 'pykdtree.kdtree' extension creating build\temp.win-amd64-2.7 creating build\temp.win-amd64-2.7\Release creating build\temp.win-amd64-2.7\Release\pykdtree C:\Users\Python2\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Anaconda2\include -IC:\Anaconda2\PC -IC:\Anaconda2\lib\site-packages\numpy\core\include /Tcpykdtree/kdtree.c /Fobuild\temp.win-amd64-2.7\Release\pykdtree/kdtree.obj /Ox /openmp kdtree.c c:\anaconda2\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION pykdtree/kdtree.c(354) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory error: command 'C:\Users\Python2\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2

Failed building wheel for pykdtree Running setup.py clean for pykdtree Failed to build pykdtree Installing collected packages: pykdtree, pyresample, PyHum Running setup.py install for pykdtree ... error Complete output from command C:\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\python2\appdata\local\temp\pip-build-ravfc7\pykdtree\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\python2\appdata\local\temp\pip-ugf_qa-record\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win-amd64-2.7 creating build\lib.win-amd64-2.7\pykdtree copying pykdtree\test_tree.py -> build\lib.win-amd64-2.7\pykdtree copying pykdtree__init__.py -> build\lib.win-amd64-2.7\pykdtree running build_ext building 'pykdtree.kdtree' extension creating build\temp.win-amd64-2.7 creating build\temp.win-amd64-2.7\Release creating build\temp.win-amd64-2.7\Release\pykdtree C:\Users\Python2\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Anaconda2\include -IC:\Anaconda2\PC -IC:\Anaconda2\lib\site-packages\numpy\core\include /Tcpykdtree/kdtree.c /Fobuild\temp.win-amd64-2.7\Release\pykdtree/kdtree.obj /Ox /openmp kdtree.c c:\anaconda2\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION pykdtree/kdtree.c(354) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory error: command 'C:\Users\Python2\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2

Command "C:\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\python2\appdata\local\temp\pip-build-ravfc7\pykdtree\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\python2\appdata\local\temp\pip-ugf_qa-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\python2\appdata\local\temp\pip-build-ravfc7\pykdtree\

dbuscombe-usgs commented 7 years ago

I believe pykdtree still does not work on Windows. Looks like all other dependencies installed correctly, so could you try

pip install PyHum --no-deps

and see if that works?

dbuscombe-usgs commented 7 years ago

Not sure is the anaconda version of numpy ships with MKL (doesn't look like it), so you could try downloading this one (assuming you are using python 2.7 on 64 bit)

http://www.silx.org/pub/wheelhouse/numpy-1.13.0+mkl-cp27-cp27m-win_amd64.whl

danhamill commented 7 years ago

I have had all of these problems before.

I solved the numpy MKL problem by uninstalling and reinstalling whl files from http://www.lfd.uci.edu/~gohlke/pythonlibs/ . I am pretty sure numpy should be installed before scipy.

The pykdtree problem arises because the most recent version of pyresample (1.1.6) doesn't play nicely with scipy. A workaround could be to downgrade pyresample to version 1.1.4 before you the test again.

pip install pyresample==1.1.4

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, Aug 16, 2017 at 7:54 PM, Daniel Buscombe notifications@github.com wrote:

Not sure is the anaconda version of numpy ships with MKL (doesn't look like it), so you could try downloading this one (assuming you are using python 2.7 on 64 bit)

http://www.silx.org/pub/wheelhouse/numpy-1.13.0+mkl- cp27-cp27m-win_amd64.whl

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dbuscombe-usgs/PyHum/issues/45#issuecomment-322930915, or mute the thread https://github.com/notifications/unsubscribe-auth/AK_TUr68uqM2vFAMseFvpulPdsaBG9Kfks5sY4ExgaJpZM4OigY6 .

ChristianF88 commented 7 years ago

Well, I tried what you recommended. Unfortunately I did come up with the initial error message in the end. Just to make it reproducable I did create a new anaconda env. here is the summary of all my installation steps:

conda create --name Sonar python=2 -y activate Sonar conda install basemap -y conda install -c conda-forge basemap-data-hires -y (otherwise I get an epsg error) pip install simplekml pip uninstall numpy -y pip install numpy-1.13.0+mkl-cp27-cp27m-win_amd64.whl pip install scipy-0.19.1-cp27-cp27m-win_amd64.whl pip install scikit_image-0.13.0-cp27-cp27m-win_amd64.whl pip install sklearn pip install pandas pip install dask pip install joblib pip install toolz pip install cython pip install PyHum --no-deps

python -c"import PyHum;PyHum.dotest()"

Output: Directory not copied. Error: [Error 183] Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist: 'C:\Users\Sieglinde\pyhum_test' Input file is C:\Users\Sieglinde\pyhum_test\test.DAT Son files are in C:\Users\Sieglinde\pyhum_test cs2cs arguments are epsg:26949 Draft: 0.3 Celerity of sound: 1450.0 m/s Port and starboard will be flipped Transducer length is 0.108 m Bed picking is auto Chunks based on distance of 100 m Data is from the 998 series Bearing will be calculated from coordinates Bearing will be filtered Checking the epsg code you have chosen for compatibility with Basemap ... ... epsg code compatible WARNING: Because files have to be read in byte by byte, this could take a very long time ... port sonar data will be parsed into 3.0, 99 m chunks starboard sonar data will be parsed into 3.0, 99 m chunks memory-mapping failed in sliding window - trying memory intensive version low-freq. sonar data will be parsed into 3.0, 99 m chunks high-freq. sonar data will be parsed into 3.0, 99 m chunks memory-mapping failed in sliding window - trying memory intensive version Traceback (most recent call last): File "", line 1, in File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\PyHum\test.py", line 131, in dotest PyHum.read(humfile, sonpath, cs2cs_args, c, draft, doplot, t, bedpick, flip_lr, model, calc_bearing, filt_bearing, chunk) #cog File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\PyHum_pyhum_read.py", line 667, in read x, bed = humutils.auto_bedpick(ft, dep_m, chunkmode, port_fp, c) File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\PyHum\utils.py", line 79, in auto_bedpick imu.append(port_fp[k][np.max([0,int(np.min(bed))-buff]):int(np.max(bed))+buff,:]) File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\numpy\core\memmap.py", line 335, in getitem res = super(memmap, self).getitem(index) TypeError: slice indices must be integers or None or have an index method

Any other ideas?

ChristianF88 commented 7 years ago

Regarding the virtual machine, when I installed pyresample==1.1.4 und PyHum without dependencies. I got a bit further but still got an error in the end.

python -c"import PyHum;PyHum.dotest()" Input file is C:\Users\Python2\pyhum_test\test.DAT Son files are in C:\Users\Python2\pyhum_test cs2cs arguments are epsg:26949 Draft: 0.3 Celerity of sound: 1450.0 m/s Port and starboard will be flipped Transducer length is 0.108 m Bed picking is auto Chunks based on distance of 100 m Data is from the 998 series Bearing will be calculated from coordinates Bearing will be filtered Checking the epsg code you have chosen for compatibility with Basemap ... ... epsg code compatible WARNING: Because files have to be read in byte by byte, this could take a very long time ... port sonar data will be parsed into 3.0, 99 m chunks starboard sonar data will be parsed into 3.0, 99 m chunks memory-mapping failed in sliding window - trying memory intensive version low-freq. sonar data will be parsed into 3.0, 99 m chunks high-freq. sonar data will be parsed into 3.0, 99 m chunks memory-mapping failed in sliding window - trying memory intensive version Processing took 38.9127845073 seconds to analyse Done! Input file is C:\Users\Python2\pyhum_test\test.DAT Sonar file path is C:\Users\Python2\pyhum_test Max. transducer power is 1000.0 W pH is 7.0 Temperature is 10.0 Traceback (most recent call last): File "", line 1, in File "C:\Anaconda2\lib\site-packages\PyHum\test.py", line 134, in dotest PyHum.correct(humfile, sonpath, maxW, doplot, dofilt, correct_withwater, ph, temp, salinity) File "C:\Anaconda2\lib\site-packages\PyHum_pyhum_correct.py", line 528, in correct plot_dwnlow_scans(low_fp[p], dist_m, shape_low, ft, sonpath, p) File "C:\Anaconda2\lib\site-packages\PyHum_pyhum_correct.py", line 848, in plot_dwnlow_scans plt.axis('normal'); plt.axis('tight') File "C:\Anaconda2\lib\site-packages\matplotlib\pyplot.py", line 1536, in axis return gca().axis(*v, **kwargs) File "C:\Anaconda2\lib\site-packages\matplotlib\axes_base.py", line 1589, in axis self.autoscale_view(tight=False) File "C:\Anaconda2\lib\site-packages\matplotlib\axes_base.py", line 2339, in autoscale_view 'minposy', self.yaxis, self._ymargin, y_stickies, self.set_ybound) File "C:\Anaconda2\lib\site-packages\matplotlib\axes_base.py", line 2318, in handle_single_axis do_lower_margin = not np.any(np.isclose(x0, stickies)) File "C:\Anaconda2\lib\site-packages\numpy\core\numeric.py", line 2451, in isclose yfin = isfinite(y) 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''

Here is a list of the installed modules if that helps:

(C:\Anaconda2) C:\Users\Python2>conda list

packages in environment at C:\Anaconda2:

# _license 1.1 py27_1 alabaster 0.7.10 py27_0 anaconda custom py27_0 anaconda-client 1.6.3 py27_0 anaconda-navigator 1.6.2 py27_0 anaconda-project 0.6.0 py27_0 asn1crypto 0.22.0 py27_0 astroid 1.4.9 py27_0 astropy 1.3.2 np112py27_0 babel 2.4.0 py27_0 backports 1.0 py27_0 backports_abc 0.5 py27_0 basemap 1.0.7 np112py27_0 beautifulsoup4 4.6.0 py27_0 bitarray 0.8.1 py27_1 blaze 0.10.1 py27_0 bleach 1.5.0 py27_0 bokeh 0.12.5 py27_1 boto 2.46.1 py27_0 bottleneck 1.2.1 np112py27_0 bzip2 1.0.6 vc9_3 [vc9] cdecimal 2.3 py27_2 cffi 1.10.0 py27_0 chardet 3.0.3 py27_0 click 6.7 py27_0 cloudpickle 0.2.2 py27_0 clyent 1.2.2 py27_0 colorama 0.3.9 py27_0 comtypes 1.1.2 py27_0 conda 4.3.24 py27_0 conda-env 2.6.0 0 configobj 5.0.6 configparser 3.5.0 py27_0 console_shortcut 0.1.1 py27_1 contextlib2 0.5.5 py27_0 cryptography 1.8.1 py27_0 curl 7.52.1 vc9_0 [vc9] cycler 0.10.0 py27_0 cython 0.25.2 py27_0 cytoolz 0.8.2 py27_0 dask 0.14.3 py27_1 datashape 0.5.4 py27_0 decorator 4.0.11 py27_0 distributed 1.16.3 py27_0 docutils 0.13.1 py27_0 entrypoints 0.2.2 py27_1 enum34 1.1.6 py27_0 et_xmlfile 1.0.1 py27_0 fastcache 1.0.2 py27_1 flask 0.12.2 py27_0 flask-cors 3.0.2 py27_0 freetype 2.5.5 vc9_2 [vc9] funcsigs 1.0.2 py27_0 functools32 3.2.3.2 py27_0 futures 3.1.1 py27_0 get_terminal_size 1.0.0 py27_0 gevent 1.2.1 py27_0 greenlet 0.4.12 py27_0 grin 1.2.1 py27_3 h5py 2.7.0 np112py27_0 hdf5 1.8.15.1 vc9_4 [vc9] heapdict 1.0.0 py27_1 html5lib 0.999 py27_0 icu 57.1 vc9_0 [vc9] idna 2.5 py27_0 imagesize 0.7.1 py27_0 ipaddress 1.0.18 py27_0 ipykernel 4.6.1 py27_0 ipython 5.3.0 py27_0 ipython_genutils 0.2.0 py27_0 ipywidgets 6.0.0 py27_0 isort 4.2.5 py27_0 itsdangerous 0.24 py27_0 jdcal 1.3 py27_0 jedi 0.10.2 py27_2 jinja2 2.9.6 py27_0 joblib 0.11 jpeg 9b vc9_0 [vc9] jsonschema 2.6.0 py27_0 jupyter 1.0.0 py27_3 jupyter_client 5.0.1 py27_0 jupyter_console 5.1.0 py27_0 jupyter_core 4.3.0 py27_0 lazy-object-proxy 1.2.2 py27_0 libpng 1.6.27 vc9_0 [vc9] libtiff 4.0.6 vc9_3 [vc9] llvmlite 0.18.0 py27_0 locket 0.2.0 py27_1 lxml 3.7.3 py27_0 markupsafe 0.23 py27_2 matplotlib 2.0.2 np112py27_0 menuinst 1.4.7 py27_0 mistune 0.7.4 py27_0 mkl 2017.0.3 0 mkl-service 1.1.2 py27_3 mpmath 0.19 py27_1 msgpack-python 0.4.8 py27_0 multipledispatch 0.4.9 py27_0 navigator-updater 0.1.0 py27_0 nbconvert 5.1.1 py27_0 nbformat 4.3.0 py27_0 networkx 1.11 py27_0 nltk 3.2.3 py27_0 nose 1.3.7 py27_1 notebook 5.0.0 py27_0 numba 0.33.0 np112py27_0 numexpr 2.6.2 np112py27_0 numpy 1.11.3 numpy 1.12.1 py27_0 numpydoc 0.6.0 py27_0 odo 0.5.0 py27_1 olefile 0.44 py27_0 openpyxl 2.4.7 py27_0 openssl 1.0.2l vc9_0 [vc9] packaging 16.8 py27_0 pandas 0.20.1 np112py27_0 pandocfilters 1.4.1 py27_0 partd 0.3.8 py27_0 path.py 10.3.1 py27_0 pathlib2 2.2.1 py27_0 patsy 0.4.1 py27_0 pep8 1.7.0 py27_0 pickleshare 0.7.4 py27_0 pillow 4.1.1 py27_0 pip 9.0.1 py27_1 ply 3.10 py27_0 prompt_toolkit 1.0.14 py27_0 psutil 5.2.2 py27_0 py 1.4.33 py27_0 pycosat 0.6.2 py27_0 pycparser 2.17 py27_0 pycrypto 2.6.1 py27_6 pycurl 7.43.0 py27_2 pyflakes 1.5.0 py27_0 pygments 2.2.0 py27_0 PyHum 1.3.19 pylint 1.6.4 py27_1 pyodbc 4.0.16 py27_0 pyopenssl 17.0.0 py27_0 pyparsing 2.1.4 py27_0 pyproj 1.9.5.1 pyqt 5.6.0 py27_2 pyresample 1.1.4 pytables 3.2.2 np112py27_4 pytest 3.0.7 py27_0 python 2.7.13 1 python-dateutil 2.6.0 py27_0 pytz 2017.2 py27_0 pywavelets 0.5.2 np112py27_0 pywin32 220 py27_2 pyyaml 3.12 py27_0 pyzmq 16.0.2 py27_0 qt 5.6.2 vc9_4 [vc9] qtawesome 0.4.4 py27_0 qtconsole 4.3.0 py27_0 qtpy 1.2.1 py27_0 requests 2.14.2 py27_0 rope 0.9.4 py27_1 ruamel_yaml 0.11.14 py27_1 scandir 1.5 py27_0 scikit-image 0.13.0 np112py27_0 scikit-learn 0.18.1 np112py27_1 scipy 0.19.0 np112py27_0 seaborn 0.7.1 py27_0 setuptools 27.2.0 py27_1 simplegeneric 0.8.1 py27_1 simplekml 1.3.0 singledispatch 3.4.0.3 py27_0 sip 4.18 py27_0 six 1.10.0 py27_0 snowballstemmer 1.2.1 py27_0 sortedcollections 0.5.3 py27_0 sortedcontainers 1.5.7 py27_0 sphinx 1.5.6 py27_0 spyder 3.1.4 py27_0 sqlalchemy 1.1.9 py27_0 ssl_match_hostname 3.4.0.2 py27_1 statsmodels 0.8.0 np112py27_0 subprocess32 3.2.7 py27_0 sympy 1.0 py27_0 tblib 1.3.2 py27_0 testpath 0.3 py27_0 tk 8.5.18 vc9_0 [vc9] toolz 0.8.2 py27_0 tornado 4.5.1 py27_0 traitlets 4.3.2 py27_0 unicodecsv 0.14.1 py27_0 vs2008_runtime 9.00.30729.5054 0 vs2015_runtime 14.0.25123 0 wcwidth 0.1.7 py27_0 werkzeug 0.12.2 py27_0 wheel 0.29.0 py27_0 widgetsnbextension 2.0.0 py27_0 win_unicode_console 0.5 py27_0 wrapt 1.10.10 py27_0 xlrd 1.0.0 py27_0 xlsxwriter 0.9.6 py27_0 xlwings 0.10.4 py27_0 xlwt 1.2.0 py27_0 zict 0.1.2 py27_0 zlib 1.2.8 vc9_3 [vc9]

ChristianF88 commented 7 years ago

So!!! Finally I got some progress:

With the following installation I get this:

conda create --name Sonar2 python=2 -y activate Sonar2 conda install basemap -y conda install -c conda-forge basemap-data-hires -y pip install simplekml conda install scipy -y conda install numpy==1.11.3 -y pip install sklearn pip install pandas pip install dask pip install joblib pip install toolz pip install cython conda install scikit-image -y pip install pyresample==1.1.4 pip install PyHum --no-deps python -c"import PyHum;PyHum.dotest()"

Directory not copied. Error: [Error 183] Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist: 'C:\Users\Sieglinde\pyhum_test' Input file is C:\Users\Sieglinde\pyhum_test\test.DAT Son files are in C:\Users\Sieglinde\pyhum_test cs2cs arguments are epsg:26949 Draft: 0.3 Celerity of sound: 1450.0 m/s Port and starboard will be flipped Transducer length is 0.108 m Bed picking is auto Chunks based on distance of 100 m Data is from the 998 series Bearing will be calculated from coordinates Bearing will be filtered Checking the epsg code you have chosen for compatibility with Basemap ... ... epsg code compatible WARNING: Because files have to be read in byte by byte, this could take a very long time ... port sonar data will be parsed into 3.0, 99 m chunks starboard sonar data will be parsed into 3.0, 99 m chunks memory-mapping failed in sliding window - trying memory intensive version low-freq. sonar data will be parsed into 3.0, 99 m chunks high-freq. sonar data will be parsed into 3.0, 99 m chunks memory-mapping failed in sliding window - trying memory intensive version Processing took 46.8383171255 seconds to analyse Done! Input file is C:\Users\Sieglinde\pyhum_test\test.DAT Sonar file path is C:\Users\Sieglinde\pyhum_test Max. transducer power is 1000.0 W pH is 7.0 Temperature is 10.0 Traceback (most recent call last): File "", line 1, in File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\PyHum\test.py", line 134, in dotest PyHum.correct(humfile, sonpath, maxW, doplot, dofilt, correct_withwater, ph, temp, salinity) File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\PyHum_pyhum_correct.py", line 528, in correct plot_dwnlow_scans(low_fp[p], dist_m, shape_low, ft, sonpath, p) File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\PyHum_pyhum_correct.py", line 848, in plot_dwnlow_scans plt.axis('normal'); plt.axis('tight') File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\matplotlib\pyplot.py", line 1536, in axis return gca().axis(*v, **kwargs) File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\matplotlib\axes_base.py", line 1589, in axis self.autoscale_view(tight=False) File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\matplotlib\axes_base.py", line 2339, in autoscale_view 'minposy', self.yaxis, self._ymargin, y_stickies, self.set_ybound) File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\matplotlib\axes_base.py", line 2318, in handle_single_axis do_lower_margin = not np.any(np.isclose(x0, stickies)) File "C:\Users\Sieglinde\Anaconda2\envs\Sonar2\lib\site-packages\numpy\core\numeric.py", line 2451, in isclose yfin = isfinite(y) 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''

ChristianF88 commented 7 years ago

Soooo, I think I fixed it. When I simply commented out the lines with the - plt.axis('normal'); plt.axis('tight') - command. I'm not sure how important this line is... Can it stay commented out?

Thanks guys!

danhamill commented 7 years ago

Nice work!

Those lines shouldn't be of any consequence. Those just adjust the output figures extents. You might want to experiment with different matplotlib backends, if you intend to use those plots for anything.

D

On Thu, Aug 17, 2017 at 12:17 PM, ChristianF88 notifications@github.com wrote:

Soooo, I think I fixed it. When I simply commented out the lines with the - plt.axis('normal'); plt.axis('tight') - command. I'm not sure how important this line is... Can it stay commented out?

Thanks guys!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dbuscombe-usgs/PyHum/issues/45#issuecomment-323122066, or mute the thread https://github.com/notifications/unsubscribe-auth/AK_TUtdEjsxuPFzNzVoiAZ3d2_3KKYjiks5sZGezgaJpZM4OigY6 .

danhamill commented 7 years ago

closed #45