rtcApp.py in ISCE v2.3.3

Added by Helen Baldwin 6 months ago

Hi,

I'm trying out the new release of ISCE, with updated rtcApp.py (so cool!), and have a few questions. I read the other posts about rtcApp and wasn't able to find these answers, my apologies if I missed something!

My setup:
  1. successful scons install of ISCE v2.3.3 from GitHub
  2. example dataset is S1A_IW_GRDH_1SDV_20181221T225104_20181221T225129_025130_02C664_B46C (I acquired the same image as is as shown in the example xml in the GitHub ReadMe) [final rtcApp.xml attached]
  3. OS: Ubuntu 18.04.4 LTS
Questions:
  1. Although isce installed 'correctly' (isce imports in python), rtcApp.py doesn't exist in the install/isce/applications folder but only in the originally downloaded folder isce2-2.3.3/applications/rtcApp.py. Is this right or does this mean that my scons install was actually unsuccessful? If this is right, should I update my PATHs in a specific way?
  2. When I ran the command "dir/isce2-2.3.3/applications/rtcApp.py dir/rtcApp.xml", I got the error: "ModuleNotFoundError: No module named 'isceobj.RtcProc.runNormalize.'" While the file runNormalize.py doesn't exist in the installation folder dir/install/isce/components/isceobj/RtcProc, it does exist in the downloaded folder dir/isce2-2.3.3/components/isceobj/RtcProc/runNormalize.py. I copied and pasted this file into the installation folder above. Is this an appropriate work around or am I breaking things further? [Screenshot_ModuleNotFound attached]
  3. With the 'fix' from above, and after deleting the 'orbit' line from the xml, I tested running the command "dir/isce2-2.3.3/applications/rtcApp.py dir/rtcApp.xml" again. This time I got two pieces of output that troubled me [Output_NoneType-and-IndexErrors attached]:
    • "Could not extract polarization VV, Generated error: argument of type 'NoneType' is not iterable"
    • in the runPreprocessor step, "IndexError: list index out of range"

Please let me know if there is additional information that I can provide. Thank you in advance for your help!

Best,
Helen


Replies (62)

RE: rtcApp.py in ISCE v2.3.3 - Added by Helen Baldwin about 1 month ago

Hi team,
I've gotten to the geocode step, and now throw the error "TypeError: runGeocode() takes one positional argument but 3 were given." I've attached a screenshot of my rtcApp.xml and the error. Do you have any suggestions about what might be causing this? Thanks!

Best,
Helen

RE: rtcApp.py in ISCE v2.3.3 - Added by Simon Kraatz about 1 month ago

Sorry Helen, I'm not sure about this error, never ran into it. I haven't been keeping up with changes to ISCE, so I'm not sure why this would happen now. Also, while it ISCE throws an error at the geocode step, it is really somewhere in Factories.py, so it is technically not related to the geocoding itself. In any case, the geocoding step is just a convenience function, which is very easy to replicate outside of ISCE. Just so you don't get stuck on this part too much, I suggest you can just comment out the geocode step, and loop through the data at a later stage to geocode all the imagery (see the geocoding with geolocation arrays as example).

PS. It probably won't help your error, but I think ISCE nomenclature has now changed and your rtcApp.xml should now use <component name="reference">.

RE: rtcApp.py in ISCE v2.3.3 - Added by Helen Baldwin about 1 month ago

Hi Simon,

Thank you so much for the reply. I'm still using ISCE v2.3.3 (with the Pull Request #120 changes added[link to PR: https://github.com/isce-framework/isce2/pull/128]) so the recent component name change shouldn't be a problem.

I went back to the geocoding script I had created following your earlier instructions, but unfortunately the output produced does not align with the Gamma produced RTC product I am trying to compare with. I've attached a screenshot of the mismatch and my geocoding script. If you have any suggestions, that would be fantastic.

Thanks,
Helen

RE: rtcApp.py in ISCE v2.3.3 - Added by Simon Kraatz about 1 month ago

Hi Helen,

it looks to me that you don't specify some things such as destination SRS or the output bounds. Why don't you have a look at this script here, I think you can probably just take it and try it out on your data (https://github.com/sgk0/isce_docker_tools/blob/master/uavsar_rtc_mlc/Docker_Install/share/stripmapStack/geocode_sk.py). Just make sure to pass the correct values.

RE: rtcApp.py in ISCE v2.3.3 - Added by Helen Baldwin about 1 month ago

I will take a look a look at that, thanks!

RE: rtcApp.py in ISCE v2.3.3 - Added by Helen Baldwin 30 days ago

Hi Simon,

Thank you so much for this additional geocoding script. I am having trouble passing the values correctly. I'm pretty sure that it is the 'list' of lat/long values for spacing that is incorrect. I have been googling this and played with a few different formats (in the screenshot attached, I am using the brackets and comma as shown for lon/lat on the --help output for the function), but haven't been able to pass correctly yet. This particular test gave me the error: unrecognized arguments 0.0001]. If you have any guidance that would be appreciated.

In case the screenshot is hard to read, here is a test call of the function:

python geocode_sk.pyc -i /mnt/isce/AND/outputs/gamma_VH.1alks_1rlks.img.vrt -l /mnt/isce/AND/geometry/lat.rdr.vrt -L /mnt/isce/AND/geometry/lon.rdr.vrt -o /mnt/isce/AND/gamma_VH_1alks_1rlks_geocoded.tif -c 4326 -s [0.0001, 0.0001] -m 'bilinear'

Thanks again!

Best,
Helen

RE: rtcApp.py in ISCE v2.3.3 - Added by Simon Kraatz 29 days ago

Hi Helen,

try -s 0.001, 0.001 , don't put brackets.

Best Simon

RE: rtcApp.py in ISCE v2.3.3 - Added by Helen Baldwin 29 days ago

Hi Simon,

Thanks for the suggestion. Using -s 0.0001, 0.0001 without brackets produces the error "unrecognized arguments: 0.0001"

I've also tried -s 0.0001 0.0001 (without brackets or comma) which produces the same "unrecognized arguments: 0.0001" error.

Screenshot of these two are attached.

I've also tried
-s 0.0001 only one value >> IndexError: List index out of range
-s [0.0001 0.0001] brackets, no comma >> Error: unrecognized arguments: 0.0001]

After double checking the 'help' prompt doesn't seem show a space after the comma so I tried some iterations of that for the -s parameter:
-s [0.0001,0.0001] comma and brackets, no space after comma >> Error 5: wrong value for -tr parameters (which I believe is the same as the spacing parameter as shown here https://gdal.org/programs/gdalwarp.html#cmdoption-gdalwarp-tr)
-s 0.0001,0.0001 comma, no brackets, no space after comma >> Error 1: Translating source or target SRS failed: 4326

Since the error related to the EPSG specified, and the default is WGS (which is what I used), I decided to try deleting the -c parameter and leaving it at default. This produced a "Failed to transform" error (screenshot attached).
Using quotes around the '4326' and 'EPSG:4326' had the same result. Looking into this error more, but if you have insight that would be great.

I have also included a screenshot of the RTC output that I am hoping to geocode. It looks right to me, but since additional "Failed to transform" error is popping up I wanted to include it. Please let me know if there is any additional information that I can provide.

It seems like EPSG 4326 isn't the appropriate coordinate system, and that could be causing the failure, but the DEMs I used were EPSG 4326.

Thank you for all your help!

Best,
Helen

RE: rtcApp.py in ISCE v2.3.3 - Added by Simon Kraatz 29 days ago

Helen, you can't have a space between the xres and yres values, it needs to be 10,10 or 0.0001,0.0001. Attached is an example for geographic and utm, both works.

PS. You could also just use gdal directly from the command line to do the geocoding as well.

Best, Simon

tst_gc.png (61.9 kB)

RE: rtcApp.py in ISCE v2.3.3 - Added by Helen Baldwin 29 days ago

Hi Simon,

Yes, that was it. I didn't realize earlier that the output was produced and looks normal despite creating the "failed to transform" error. Just for reference, I've attached a screenshot of the command that worked. Thanks!

Best,
Helen

RE: rtcApp.py in ISCE v2.3.3 - Added by Simon Kraatz 28 days ago

Great. Don't worry about the failed to transform message, it is to be expected...

Best, Simon

RE: rtcApp.py in ISCE v2.3.3 - Added by Helen Baldwin 28 days ago

Awesome, thanks!

« Previous 1 2 3 (51-62/62)