pyrocko/kite

Import Issue with Kite when Importing GMTSAR data

Uncleyyyyy opened this issue · 2 comments

When I was trying to import .grd file the GMTSAR generated, the error occured.

>>> from kite import Scene
>>> sc = Scene.import_file('asc.grd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'Scene' has no attribute 'import_file'

But when I was viewing data using

spool --load asc.grd

it just worked. However, when I had done my correction and down sampled the data, it couldn't save to my yml reporting:

Traceback (most recent call last):
  File "/home/uncley/anaconda3/envs/beat/lib/python3.8/site-packages/kite/spool/spool.py", line 314, in onExportQuadtree
    self.model.quadtree.export_geojson(filename)
  File "/home/uncley/anaconda3/envs/beat/lib/python3.8/site-packages/kite/quadtree.py", line 1041, in export_geojson
    "phi": float(lf.phi),
  File "/home/uncley/anaconda3/envs/beat/lib/python3.8/site-packages/kite/util/__init__.py", line 138, in cache_return
    instance.__dict__[var_name] = func(instance)
  File "/home/uncley/anaconda3/envs/beat/lib/python3.8/site-packages/kite/quadtree.py", line 186, in phi
    phi = self.scene.phi[self._slice_rows, self._slice_cols]
TypeError: 'float' object is not subscriptable

Could you please have a check and tell me how I could fix these issues? Thx a lot!

Your look-anglees phi and thetha must be numpy array of size of the displacement array. Now you specified a float number only.

How to do the scripted data import is written here: https://pyrocko.org/kite/docs/current/quickstart.html#scripted-data-import