pyrocko / kite

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

Error loading SNAP Gamma exported files #65

Closed hvasbath closed 3 years ago

hvasbath commented 3 years ago
spool --load unwrapped_ifg_dsp_TC.rslc.par
INFO:SceneIO/SNAP_Gamma:Found parameter file /home/vasyurhm/InSAR_course/proc/Galapagos2/KITE/unwrapped_ifg_dsp_TC_Abstracted_Metadata.txt
Traceback (most recent call last):
  File "/usr/local/bin/spool", line 11, in <module>
    load_entry_point('kite==1.4.0', 'console_scripts', 'spool')()
  File "/usr/local/lib/python3.6/dist-packages/kite-1.4.0-py3.6-linux-x86_64.egg/kite/spool/__main__.py", line 95, in main
    spool(import_file=ns.load)
  File "/usr/local/lib/python3.6/dist-packages/kite-1.4.0-py3.6-linux-x86_64.egg/kite/spool/spool.py", line 405, in spool
    spool_app = Spool(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/kite-1.4.0-py3.6-linux-x86_64.egg/kite/spool/spool.py", line 48, in __init__
    self.importScene(import_file)
  File "/usr/local/lib/python3.6/dist-packages/kite-1.4.0-py3.6-linux-x86_64.egg/kite/spool/spool.py", line 64, in importScene
    self.spool_win.model.importFile(filename)
  File "/usr/local/lib/python3.6/dist-packages/kite-1.4.0-py3.6-linux-x86_64.egg/kite/spool/scene_model.py", line 174, in importFile
    self.setScene(Scene.import_data(filename))
  File "/usr/local/lib/python3.6/dist-packages/kite-1.4.0-py3.6-linux-x86_64.egg/kite/scene.py", line 494, in dynclassmethod
    return func(Scene(), *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/kite-1.4.0-py3.6-linux-x86_64.egg/kite/scene.py", line 1013, in _import_data
    data = module.read(path, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/kite-1.4.0-py3.6-linux-x86_64.egg/kite/scene_io.py", line 1278, in read
    displ = displ.reshape(nlines, ncols)
ValueError: cannot reshape array of size 6847 into shape (5391,6847)
miili commented 3 years ago

Strange, there is only one row in the dataset

ValueError: cannot reshape array of size 6847 into shape (5391,6847)

Did you use SNAP 7 or 8? How did you export the data?

hvasbath commented 3 years ago

SNAP 7, exported as described in the help of the class, with Gamma export and the auxiliary metadata

hvasbath commented 3 years ago

User error- as always: accidentally gave the file.rslc.par file as input, MUST be the image.rslc file ! Works now! One should not try out new things if it is late night ;)