Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Issue with Kite when Importing GMTSAR data #116

Open
Uncleyyyyy opened this issue Dec 5, 2023 · 2 comments
Open

Import Issue with Kite when Importing GMTSAR data #116

Uncleyyyyy opened this issue Dec 5, 2023 · 2 comments

Comments

@Uncleyyyyy
Copy link

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!

@hvasbath
Copy link
Member

hvasbath commented Dec 5, 2023

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

@hvasbath
Copy link
Member

hvasbath commented Dec 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants