nansencenter / sea_ice_drift

Sea ice drift from Sentinel-1 SAR imagery using open source feature tracking
GNU General Public License v3.0
44 stars 18 forks source link

Pattern matching not working #7

Closed SAMPHY86 closed 7 years ago

SAMPHY86 commented 7 years ago

Hi, I tried running sea_ice_drift with the supplied test data but cannot get it to work. The Feature tracking seems to be fine (the figure looks as in the example at the website), but the pattern matching doesn't yield any results. Could anyone read through the output below (especially the very last line) and hint me in a direction what the trouble is? Very much appreciated, many thanks, Usama.

ORB detector initiated Key points found: 18801 ORB detector initiated Key points found: 20191 Domain filter: 18801 -> 16063 Domain filter: 20191 -> 16752 Keypoints matched 3.16630792618 Ratio test 0.700000 found 1559 keypoints MaxDrift filter: 1559 -> 1559 LSTSQ filter: 1559 -> 1559 GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. Traceback (most recent call last): File "seaice.py", line 27, in upm, vpm, rpm, apm, lon2pm, lat2pm = sid.get_drift_PM(lon1pm, lat1pm, lon1ft, lat1ft, lon2ft, lat2ft) File "/home/ufa11/miniconda/lib/python2.7/site-packages/sea_ice_drift/seaicedrift.py", line 89, in get_drift_PM self.n2, x2, y2, **kwargs) File "/home/ufa11/miniconda/lib/python2.7/site-packages/sea_ice_drift/pmlib.py", line 315, in pattern_matching results = p.map(use_mcc_mp, range(len(gpi[gpi]))) File "/home/ufa11/miniconda/lib/python2.7/multiprocessing/pool.py", line 251, in map return self.map_async(func, iterable, chunksize).get() File "/home/ufa11/miniconda/lib/python2.7/multiprocessing/pool.py", line 567, in get raise self._value TypeError: slice indices must be integers or None or have an index method

akorosov commented 7 years ago

Hi @SAMPHY86 ! Thank you for the issue! In fact it was already fixed in the master branch but not yet released. Now I've released version 0.5, you can download (or install directly with pip) from here: https://github.com/nansencenter/sea_ice_drift/archive/v0.5.tar.gz