Commit Graph

6 Commits (6ea460f6de77d644c66251d74e0cc835bf35005b)

Author SHA1 Message Date
Ryan Burns ad1815ef9c Modernize gdal imports
GDAL has dropped support for the older toplevel `import gdal`
in version 3.2, now requiring `from osgeo import gdal`.
2021-01-06 13:24:26 -08:00
Zhang Yunjun 55b9d2c037
topsStack: ignore coreg_secondary images with inconsistent num of bursts (#195)
* ImageLib: fix str syntax

* stackSentl: rename slc workflow merge for consistency

rename the mergeSLC step in "slc" workflow, to be consistent with the other workflows.

* topsStack: check inconsistent num of bursts in secondary images

+ extractCommonValidRegion.py: add dropSecondarysWithDifferentNumberOfBursts() to discard those acquisitions during the common region calculation

+ mergeBursts.py: skip secondarys with inconsistent num of bursts by raise exception and exit

+ s1a_isce_utils.adjustValidSampleLine_V2(): remove a redundant line

Co-authored-by: Zhang Yunjun <yunjunz@users.noreply.github.com>
2020-10-24 09:31:48 -07:00
Zhang Yunjun 89839bc453 extractCommonValidRegion: check stack/*.xml file existance
Otherwise, if 'stack' folder exists but is empty, the script will return ERROR as below:

```
/net/kraken/nobak/zyunjun/TonopahSenAT64/stack  already exists.
Replacing master with existing stack.
updating the valid overlap region of:
/net/kraken/nobak/zyunjun/TonopahSenAT64/stack
******************
swath:  1
Traceback (most recent call last):
  File "/home/zyunjun/tools/isce2/contrib/stack/topsStack/extractCommonValidRegion.py", line 109, in <module>
    main()
  File "/home/zyunjun/tools/isce2/contrib/stack/topsStack/extractCommonValidRegion.py", line 95, in main
    topMaster = ut.loadProduct(os.path.join(inps.master , 'IW{0}.xml'.format(swath)))
  File "/home/zyunjun/tools/isce2/contrib/stack/topsStack/s1a_isce_utils.py", line 26, in loadProduct
    obj = pm.loadProduct(xmlname)
  File "/net/kraken/home1/geomod/apps/rhel7/isce2-github/isce/components/iscesys/Component/ProductManager.py", line 25, in loadProduct
    self.load(filename)
  File "/net/kraken/home1/geomod/apps/rhel7/isce2-github/isce/components/iscesys/Component/Configurable.py", line 1407, in load
    tmpProp, tmpFact, tmpMisc = FP.parse(filename)
  File "/net/kraken/home1/geomod/apps/rhel7/isce2-github/isce/components/iscesys/Parsers/XmlParser.py", line 41, in parse
    root = ET.parse(filename)
  File "/net/kraken/home1/geomod/apps/anaconda3/lib/python3.7/xml/etree/ElementTree.py", line 1197, in parse
    tree.parse(source, parser)
  File "/net/kraken/home1/geomod/apps/anaconda3/lib/python3.7/xml/etree/ElementTree.py", line 587, in parse
    source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/net/kraken/nobak/zyunjun/TonopahSenAT64/stack/IW1.xml'
```
2020-09-12 17:05:33 -07:00
Paul A Rosen e03042f4e5 diversity: replaced oppressive language with neutral definitions of the images that comprise an interferogram through the entire repository 2020-07-02 12:40:49 -07:00
Ryan Burns 23f2ffaa1e
Use exist_ok argument to makedirs when appropriate (#112)
@falkamelung noted a race condition in #106 due to non-atomic directory
checking followed by os.makedirs. This pattern exists in many places
in the codebase so I went ahead and replaced the rest of them.
The new exist_ok usage should be terser and more idiomatic.
2020-04-13 12:40:32 -07:00
Eric Gurrola 9f9a2b0805 Adding all files 2019-01-16 11:40:08 -08:00