pyrocko / kite

InSAR unwrapped surface displacement processing for earthquake modelling.
https://pyrocko.org/kite/
GNU General Public License v3.0
78 stars 34 forks source link

Exporting quadtree to csv failed #87

Closed raghav413 closed 1 year ago

raghav413 commented 1 year ago

Traceback (most recent call last): File "/home/raghav/gmt_sar/quadtree/test.py", line 33, in qt.export_csv('tree.csv') File "/usr/local/lib/python3.10/dist-packages/kite-1.5.0-py3.10-linux-x86_64.egg/kite/quadtree.py", line 1004, in export_csv "{lf.id}, {lf.focal_point[0]}, {lf.focal_point[1]}, " File "/usr/local/lib/python3.10/dist-packages/kite-1.5.0-py3.10-linux-x86_64.egg/kite/util/init.py", line 138, in cache_return instance.dict[var_name] = func(instance) File "/usr/local/lib/python3.10/dist-packages/kite-1.5.0-py3.10-linux-x86_64.egg/kite/quadtree.py", line 195, in theta theta = self.scene.theta[self._slice_rows, self._slice_cols] TypeError: 'float' object is not subscriptable

AND when I used spool to export quadtree as csv I get the following error

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/kite-1.5.0-py3.10-linux-x86_64.egg/kite/spool/spool.py", line 318, in onExportQuadtree self.model.quadtree.export_csv(filename) File "/usr/local/lib/python3.10/dist-packages/kite-1.5.0-py3.10-linux-x86_64.egg/kite/quadtree.py", line 1003, in export_csv "{lf.id}, {lf.focal_point[0]}, {lf.focal_point[1]}, " File "/usr/local/lib/python3.10/dist-packages/kite-1.5.0-py3.10-linux-x86_64.egg/kite/util/init.py", line 138, in cache_return instance.dict[var_name] = func(instance) File "/usr/local/lib/python3.10/dist-packages/kite-1.5.0-py3.10-linux-x86_64.egg/kite/quadtree.py", line 194, in theta theta = self.scene.theta[self._slice_rows, self._slice_cols] IndexError: too many indices for array: array is 0-dimensional, but 2 were indexed

Please help

Thank you

raghav413 commented 1 year ago

Someone please help I am stuck there

hvasbath commented 1 year ago

Hi! What I can see from the limited information you provide is that you apparently only have a single scalar instead of a 2d array in your look-angle information. The heading and incidence angle arrays need to have the exact same size as the displacement array!