GithubHelp home page GithubHelp logo

Comments (3)

AlexeyPechnikov avatar AlexeyPechnikov commented on June 3, 2024

You can use the function sbas.pairs() to look up all the available grids. By default, it looks for grids with the 'phasefilt' name.

sbas = SBAS(DATADIR, DEMFILE, basedir=WORKDIR, force=False)
pairs = sbas.pairs()
unwraps_ra  = sbas.open_grids(pairs, 'unwrap')
unwraps_ra 

If you call sbas.pairs(dates=True), it will not only return the interferogram pair list but also provide all the scene dates as well.

pairs, dates = sbas.pairs(dates=True)

And there's an even easier way using the dump() and restore() functions. With these functions, you only need to provide the WORKDIR path to restore your state. By the way, you can still use sbas.pairs() to detect the SBAS pairs that have already been processed.

# dump current state into WORKDIR as soon as you have the interferograms pomputed and merged
sbas.dump()
# restore the current state later from other notebook to continue
# sbas = SBAS.restore(WORKDIR)

from pygmtsar.

kinreich avatar kinreich commented on June 3, 2024

Thank you!

Running pairs, dates = sbas.pairs(dates=True) this error pops up:

Traceback (most recent call last): File "/home/name/pythonProject/venv/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3508, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-10-9f9e9cb1f67c>", line 1, in <module> pairs, dates = sbas.pairs(dates=True) File "/home/name/pythonProject/venv/lib/python3.10/site-packages/pygmtsar/SBAS_base.py", line 414, in pairs pattern = self.get_filenames(None, None, f'????????_????????_{name}') File "/home/name/pythonProject/venv/lib/python3.10/site-packages/pygmtsar/SBAS_base.py", line 166, in get_filenames subswath = self.get_subswath(subswath) File "/home/name/pythonProject/venv/lib/python3.10/site-packages/pygmtsar/SBAS_base.py", line 155, in get_subswath assert len(subswaths)==1, f'ERROR: multiple subswaths {subswaths} found, merge them first using SBAS.merge_parallel()' AssertionError: ERROR: multiple subswaths [1 2 3] found, merge them first using SBAS.merge_parallel()

from pygmtsar.

AlexeyPechnikov avatar AlexeyPechnikov commented on June 3, 2024

It seems that you haven't merged the subswaths, which makes the continuation of the processing a bit tricky. I recommend trying the following code for your case:

sbas = SBAS(DATADIR, DEMFILE, basedir=WORKDIR, force=False)
# get all the subswaths like [1, 2, 3]
subswaths = sbas.get_subswaths()
# emulate the merging
sbas.df = sbas.df[sbas.df.subswath == subswaths[0]]
sbas.df['subswath'] = ''.join(map(str, subswaths))
# for now, we can work as expected with the merged subswaths
pairs = sbas.pairs()
unwraps_ra  = sbas.open_grids(pairs, 'unwrap')
unwraps_ra 

from pygmtsar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.