BenthicSubstrateMapping / PyHum

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

filter footprint array has incorrect shape #33

Closed debboutr closed 8 years ago

debboutr commented 8 years ago

I've got a couple of recordings that I get the following error on:

Traceback (most recent call last): File "processSideScan.py", line 54, in PyHum.read(humfile, sonpath, cs2cs_args, c, draft, doplot, t, bedpick, flip_lr, model=model, chunk=chunk) File "/home/rick/anaconda2/envs/sss/lib/python2.7/site-packages/PyHum/_pyhum_read.py", line 665, in read x, bed = humutils.auto_bedpick(ft, dep_m, chunkmode, port_fp, c) File "/home/rick/anaconda2/envs/sss/lib/python2.7/site-packages/PyHum/utils.py", line 92, in auto_bedpick imu = median_filter(imu,(np.shape(imu)[0]/100,np.shape(imu)[1]/100)) File "/home/rick/anaconda2/envs/sss/lib/python2.7/site-packages/scipy/ndimage/filters.py", line 1069, in median_filter origin, 'median') File "/home/rick/anaconda2/envs/sss/lib/python2.7/site-packages/scipy/ndimage/filters.py", line 989, in _rank_filter raise RuntimeError('filter footprint array has incorrect shape.') RuntimeError: filter footprint array has incorrect shape.

We recorded other tracks with the same machine and they processed without this error, any clues? Here is a link to the data, thanks!

dbuscombe-usgs commented 8 years ago

The issue arose in the bed picking when in 'auto mode' (bedpick = 1), during a filtering step. The issue arose because this particular data is very narrow compared to its length. I have fixed the issue by catching the error if it arises.

Please install the latest version from github:

pip install git+https://github.com/dbuscombe-usgs/PyHum.git

However, I suggest that for this particular scan, a manual bed pick approach should be carried out because the auto pick was not satisfactory (this is a very noisy scan). See below:

bed_pick1