How to do ionospheric corrections in StackSentinel.py

39 views
Skip to first unread message

Zheng Liu

unread,
Mar 18, 2024, 3:07:58 AMMar 18
to MintPy
Here's my stackSentinel.py code,
stackSentinel.py -s ../SLC/  -d ../DEM/demLat_N35_N39_Lon_E102_E106.dem.wgs84 -a ../axudir/ -o ../orbits -b '36.8 37.4 103.2 104.2' -c 24 -f 0.6 -m 20180708 -O 12 -W interferogram -z 4 -r 20 --param_ion ../ionosphere/ion_param.txt
Once I added --param_ion ... /ionosphere/ion_param.txt parameter, the terminal reports an error:
(insar) [process]$ stackSentinel.py -s ../SLC/  -d ../DEM/demLat_N35_N39_Lon_E102_E106.dem.wgs84 -a ../axudir/ -o ../orbits -b '36.8 37.4 103.2 104.2' -c 24 -f 0.6 -m 20180708 -O 12 -W interferogram -z 4 -r 20 --param_ion ../ionosphere/ion_param.txt
Number of SAFE files found: 82
Number of SAFE files to be used (cover BBOX): 82
*****************************************
Number of dates : 82
List of dates :
['20170327', '20170408', '20170420', '20170502', '20170514', '20170526', '20170607', '20170619', '20170701', '20170713', '20170725', '20170806', '20170818', '20170830', '20170911', '20170923', '20171005', '20171029', '20171110', '20171122', '20171204', '20171216', '20171228', '20180109', '20180121', '20180202', '20180214', '20180226', '20180310', '20180322', '20180403', '20180415', '20180427', '20180509', '20180521', '20180602', '20180614', '20180626', '20180708', '20180720', '20180801', '20180825', '20180906', '20180918', '20180930', '20181012', '20181024', '20181105', '20181129', '20181211', '20181223', '20190104', '20190116', '20190128', '20190209', '20190221', '20190305', '20190317', '20190329', '20190410', '20190422', '20190504', '20190516', '20190528', '20190609', '20190621', '20190703', '20190715', '20190727', '20190808', '20190820', '20190901', '20190913', '20190925', '20191007', '20191019', '20191031', '20191112', '20191124', '20191206', '20191218', '20191230']
date      south      north
20170327 36.066162 38.139545
20170408 36.066807 38.13982
20170420 36.066196 38.139374
20170502 36.066628 38.139915
20170514 36.066971 38.139977
20170526 36.066216 38.139324
20170607 36.066303 38.139423
20170619 36.066475 38.139633
20170701 36.06636 38.1394
20170713 36.066559 38.139709
20170725 36.06702 38.14027
20170806 36.067032 38.139885
20170818 36.066376 38.13966
20170830 36.067154 38.140427
20170911 36.067822 38.140968
20170923 36.065861 38.139015
20171005 36.066708 38.139717
20171029 36.06599 38.139324
20171110 36.065758 38.138847
20171122 36.066296 38.139484
20171204 36.066296 38.139565
20171216 36.066864 38.140011
20171228 36.066723 38.139557
20180109 36.066433 38.139645
20180121 36.066799 38.139866
20180202 36.067154 38.140423
20180214 36.066109 38.139137
20180226 36.067051 38.14024
20180310 36.065948 38.139164
20180322 36.06599 38.139198
20180403 36.066315 38.139469
20180415 36.066509 38.139751
20180427 36.066074 38.139313
20180509 36.066425 38.139694
20180521 36.066776 38.139824
20180602 36.065697 38.138851
20180614 36.065933 38.139175
20180626 36.066399 38.139622
20180708 36.066216 38.139244
20180720 36.066826 38.139751
20180801 36.066704 38.13987
20180825 36.06686 38.139877
20180906 36.06686 38.139889
20180918 36.066883 38.140045
20180930 36.066849 38.140015
20181012 36.066711 38.13987
20181024 36.066914 38.139919
20181105 36.066467 38.139503
20181129 36.066086 38.139309
20181211 36.066357 38.139549
20181223 36.066338 38.139496
20190104 36.066963 38.140121
20190116 36.06694 38.140148
20190128 36.066795 38.139996
20190209 36.066788 38.13998
20190221 36.066277 38.139557
20190305 36.066238 38.139519
20190317 36.065826 38.139011
20190329 36.065922 38.13913
20190410 36.066177 38.139236
20190422 36.066311 38.13945
20190504 36.0662 38.139057
20190516 36.066273 38.139408
20190528 36.065838 38.139122
20190609 36.066738 38.139786
20190621 36.066257 38.139141
20190703 36.06208 38.137371
20190715 36.062115 38.137527
20190727 36.062134 38.137363
20190808 36.062252 38.137234
20190820 36.062355 38.137558
20190901 36.06282 38.137882
20190913 36.06242 38.137367
20190925 36.062607 38.137699
20191007 36.062607 38.138111
20191019 36.062778 38.138039
20191031 36.062271 38.13776
20191112 36.062481 38.137577
20191124 36.062904 38.137886
20191206 36.062397 38.137684
20191218 36.062588 38.13776
20191230 36.062599 38.137611
*****************************************
The overlap region among all dates (based on the preview kml files):
 South   North   East  West
36.067822 38.137234 102.454048 105.622719
*****************************************
All dates (82)
['20170327', '20170408', '20170420', '20170502', '20170514', '20170526', '20170607', '20170619', '20170701', '20170713', '20170725', '20170806', '20170818', '20170830', '20170911', '20170923', '20171005', '20171029', '20171110', '20171122', '20171204', '20171216', '20171228', '20180109', '20180121', '20180202', '20180214', '20180226', '20180310', '20180322', '20180403', '20180415', '20180427', '20180509', '20180521', '20180602', '20180614', '20180626', '20180708', '20180720', '20180801', '20180825', '20180906', '20180918', '20180930', '20181012', '20181024', '20181105', '20181129', '20181211', '20181223', '20190104', '20190116', '20190128', '20190209', '20190221', '20190305', '20190317', '20190329', '20190410', '20190422', '20190504', '20190516', '20190528', '20190609', '20190621', '20190703', '20190715', '20190727', '20190808', '20190820', '20190901', '20190913', '20190925', '20191007', '20191019', '20191031', '20191112', '20191124', '20191206', '20191218', '20191230']

dates covering the bbox (82)
['20170327', '20170408', '20170420', '20170502', '20170514', '20170526', '20170607', '20170619', '20170701', '20170713', '20170725', '20170806', '20170818', '20170830', '20170911', '20170923', '20171005', '20171029', '20171110', '20171122', '20171204', '20171216', '20171228', '20180109', '20180121', '20180202', '20180214', '20180226', '20180310', '20180322', '20180403', '20180415', '20180427', '20180509', '20180521', '20180602', '20180614', '20180626', '20180708', '20180720', '20180801', '20180825', '20180906', '20180918', '20180930', '20181012', '20181024', '20181105', '20181129', '20181211', '20181223', '20190104', '20190116', '20190128', '20190209', '20190221', '20190305', '20190317', '20190329', '20190410', '20190422', '20190504', '20190516', '20190528', '20190609', '20190621', '20190703', '20190715', '20190727', '20190808', '20190820', '20190901', '20190913', '20190925', '20191007', '20191019', '20191031', '20191112', '20191124', '20191206', '20191218', '20191230']


All SLCs will be coregistered to : 20180708
secondary dates :
['20170327', '20170408', '20170420', '20170502', '20170514', '20170526', '20170607', '20170619', '20170701', '20170713', '20170725', '20170806', '20170818', '20170830', '20170911', '20170923', '20171005', '20171029', '20171110', '20171122', '20171204', '20171216', '20171228', '20180109', '20180121', '20180202', '20180214', '20180226', '20180310', '20180322', '20180403', '20180415', '20180427', '20180509', '20180521', '20180602', '20180614', '20180626', '20180720', '20180801', '20180825', '20180906', '20180918', '20180930', '20181012', '20181024', '20181105', '20181129', '20181211', '20181223', '20190104', '20190116', '20190128', '20190209', '20190221', '20190305', '20190317', '20190329', '20190410', '20190422', '20190504', '20190516', '20190528', '20190609', '20190621', '20190703', '20190715', '20190727', '20190808', '20190820', '20190901', '20190913', '20190925', '20191007', '20191019', '20191031', '20191112', '20191124', '20191206', '20191218', '20191230']

No existing stack was identified. A new stack will be generated.
selecting pairs with 24 nearest neighbor connections: 1668
*****************************************
Coregistration method:  NESD
Workflow:  interferogram
*****************************************
writing  /share/users/zhkeliang/Work/process/run_files/run_01_unpack_topo_reference
writing  /share/users/zhkeliang/Work/process/run_files/run_02_unpack_secondary_slc
writing  /share/users/zhkeliang/Work/process/run_files/run_03_average_baseline
writing  /share/users/zhkeliang/Work/process/run_files/run_04_extract_burst_overlaps
writing  /share/users/zhkeliang/Work/process/run_files/run_05_overlap_geo2rdr
writing  /share/users/zhkeliang/Work/process/run_files/run_06_overlap_resample
writing  /share/users/zhkeliang/Work/process/run_files/run_07_pairs_misreg
writing  /share/users/zhkeliang/Work/process/run_files/run_08_timeseries_misreg
writing  /share/users/zhkeliang/Work/process/run_files/run_09_fullBurst_geo2rdr
writing  /share/users/zhkeliang/Work/process/run_files/run_10_fullBurst_resample
writing  /share/users/zhkeliang/Work/process/run_files/run_11_extract_stack_valid_region
writing  /share/users/zhkeliang/Work/process/run_files/run_12_merge_reference_secondary_slc
writing  /share/users/zhkeliang/Work/process/run_files/run_13_generate_burst_igram
writing  /share/users/zhkeliang/Work/process/run_files/run_14_merge_burst_igram
writing  /share/users/zhkeliang/Work/process/run_files/run_15_filter_coherence
writing  /share/users/zhkeliang/Work/process/run_files/run_16_unwrap
Number of SAFE files found: 82
Number of SAFE files to be used (cover BBOX): 82
*****************************************
Number of dates : 82
List of dates :
['20170327', '20170408', '20170420', '20170502', '20170514', '20170526', '20170607', '20170619', '20170701', '20170713', '20170725', '20170806', '20170818', '20170830', '20170911', '20170923', '20171005', '20171029', '20171110', '20171122', '20171204', '20171216', '20171228', '20180109', '20180121', '20180202', '20180214', '20180226', '20180310', '20180322', '20180403', '20180415', '20180427', '20180509', '20180521', '20180602', '20180614', '20180626', '20180708', '20180720', '20180801', '20180825', '20180906', '20180918', '20180930', '20181012', '20181024', '20181105', '20181129', '20181211', '20181223', '20190104', '20190116', '20190128', '20190209', '20190221', '20190305', '20190317', '20190329', '20190410', '20190422', '20190504', '20190516', '20190528', '20190609', '20190621', '20190703', '20190715', '20190727', '20190808', '20190820', '20190901', '20190913', '20190925', '20191007', '20191019', '20191031', '20191112', '20191124', '20191206', '20191218', '20191230']
date      south      north
20170327 36.066162 38.139545
20170408 36.066807 38.13982
20170420 36.066196 38.139374
20170502 36.066628 38.139915
20170514 36.066971 38.139977
20170526 36.066216 38.139324
20170607 36.066303 38.139423
20170619 36.066475 38.139633
20170701 36.06636 38.1394
20170713 36.066559 38.139709
20170725 36.06702 38.14027
20170806 36.067032 38.139885
20170818 36.066376 38.13966
20170830 36.067154 38.140427
20170911 36.067822 38.140968
20170923 36.065861 38.139015
20171005 36.066708 38.139717
20171029 36.06599 38.139324
20171110 36.065758 38.138847
20171122 36.066296 38.139484
20171204 36.066296 38.139565
20171216 36.066864 38.140011
20171228 36.066723 38.139557
20180109 36.066433 38.139645
20180121 36.066799 38.139866
20180202 36.067154 38.140423
20180214 36.066109 38.139137
20180226 36.067051 38.14024
20180310 36.065948 38.139164
20180322 36.06599 38.139198
20180403 36.066315 38.139469
20180415 36.066509 38.139751
20180427 36.066074 38.139313
20180509 36.066425 38.139694
20180521 36.066776 38.139824
20180602 36.065697 38.138851
20180614 36.065933 38.139175
20180626 36.066399 38.139622
20180708 36.066216 38.139244
20180720 36.066826 38.139751
20180801 36.066704 38.13987
20180825 36.06686 38.139877
20180906 36.06686 38.139889
20180918 36.066883 38.140045
20180930 36.066849 38.140015
20181012 36.066711 38.13987
20181024 36.066914 38.139919
20181105 36.066467 38.139503
20181129 36.066086 38.139309
20181211 36.066357 38.139549
20181223 36.066338 38.139496
20190104 36.066963 38.140121
20190116 36.06694 38.140148
20190128 36.066795 38.139996
20190209 36.066788 38.13998
20190221 36.066277 38.139557
20190305 36.066238 38.139519
20190317 36.065826 38.139011
20190329 36.065922 38.13913
20190410 36.066177 38.139236
20190422 36.066311 38.13945
20190504 36.0662 38.139057
20190516 36.066273 38.139408
20190528 36.065838 38.139122
20190609 36.066738 38.139786
20190621 36.066257 38.139141
20190703 36.06208 38.137371
20190715 36.062115 38.137527
20190727 36.062134 38.137363
20190808 36.062252 38.137234
20190820 36.062355 38.137558
20190901 36.06282 38.137882
20190913 36.06242 38.137367
20190925 36.062607 38.137699
20191007 36.062607 38.138111
20191019 36.062778 38.138039
20191031 36.062271 38.13776
20191112 36.062481 38.137577
20191124 36.062904 38.137886
20191206 36.062397 38.137684
20191218 36.062588 38.13776
20191230 36.062599 38.137611
*****************************************
The overlap region among all dates (based on the preview kml files):
 South   North   East  West
36.067822 38.137234 102.454048 105.622719
*****************************************
All dates (82)
['20170327', '20170408', '20170420', '20170502', '20170514', '20170526', '20170607', '20170619', '20170701', '20170713', '20170725', '20170806', '20170818', '20170830', '20170911', '20170923', '20171005', '20171029', '20171110', '20171122', '20171204', '20171216', '20171228', '20180109', '20180121', '20180202', '20180214', '20180226', '20180310', '20180322', '20180403', '20180415', '20180427', '20180509', '20180521', '20180602', '20180614', '20180626', '20180708', '20180720', '20180801', '20180825', '20180906', '20180918', '20180930', '20181012', '20181024', '20181105', '20181129', '20181211', '20181223', '20190104', '20190116', '20190128', '20190209', '20190221', '20190305', '20190317', '20190329', '20190410', '20190422', '20190504', '20190516', '20190528', '20190609', '20190621', '20190703', '20190715', '20190727', '20190808', '20190820', '20190901', '20190913', '20190925', '20191007', '20191019', '20191031', '20191112', '20191124', '20191206', '20191218', '20191230']

dates covering the bbox (82)
['20170327', '20170408', '20170420', '20170502', '20170514', '20170526', '20170607', '20170619', '20170701', '20170713', '20170725', '20170806', '20170818', '20170830', '20170911', '20170923', '20171005', '20171029', '20171110', '20171122', '20171204', '20171216', '20171228', '20180109', '20180121', '20180202', '20180214', '20180226', '20180310', '20180322', '20180403', '20180415', '20180427', '20180509', '20180521', '20180602', '20180614', '20180626', '20180708', '20180720', '20180801', '20180825', '20180906', '20180918', '20180930', '20181012', '20181024', '20181105', '20181129', '20181211', '20181223', '20190104', '20190116', '20190128', '20190209', '20190221', '20190305', '20190317', '20190329', '20190410', '20190422', '20190504', '20190516', '20190528', '20190609', '20190621', '20190703', '20190715', '20190727', '20190808', '20190820', '20190901', '20190913', '20190925', '20191007', '20191019', '20191031', '20191112', '20191124', '20191206', '20191218', '20191230']


All SLCs will be coregistered to : 20180708
secondary dates :
['20170327', '20170408', '20170420', '20170502', '20170514', '20170526', '20170607', '20170619', '20170701', '20170713', '20170725', '20170806', '20170818', '20170830', '20170911', '20170923', '20171005', '20171029', '20171110', '20171122', '20171204', '20171216', '20171228', '20180109', '20180121', '20180202', '20180214', '20180226', '20180310', '20180322', '20180403', '20180415', '20180427', '20180509', '20180521', '20180602', '20180614', '20180626', '20180720', '20180801', '20180825', '20180906', '20180918', '20180930', '20181012', '20181024', '20181105', '20181129', '20181211', '20181223', '20190104', '20190116', '20190128', '20190209', '20190221', '20190305', '20190317', '20190329', '20190410', '20190422', '20190504', '20190516', '20190528', '20190609', '20190621', '20190703', '20190715', '20190727', '20190808', '20190820', '20190901', '20190913', '20190925', '20191007', '20191019', '20191031', '20191112', '20191124', '20191206', '20191218', '20191230']

Traceback (most recent call last):
  File "/share/users/zhkeliang/tools/isce2/src/isce2/contrib/stack/topsStack/stackSentinel.py", line 1023, in <module>
    main(sys.argv[1:])
  File "/share/users/zhkeliang/tools/isce2/src/isce2/contrib/stack/topsStack/stackSentinel.py", line 1018, in main
    dateListIon, pairs_same_starting_ranges_update, pairs_diff_starting_ranges_update, safe_dict = checkCurrentStatusIonosphere(inps)
                                                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/share/users/zhkeliang/tools/isce2/src/isce2/contrib/stack/topsStack/stackSentinel.py", line 609, in checkCurrentStatusIonosphere
    pairs_same_starting_ranges, pairs_diff_starting_ranges = selectNeighborPairsIonosphere(safe_dict, inps.num_connections_ion)
                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/share/users/zhkeliang/tools/isce2/src/isce2/contrib/stack/topsStack/stackSentinel.py", line 489, in selectNeighborPairsIonosphere
    safe_dict[date].get_starting_ranges()
  File "/share/users/zhkeliang/tools/isce2/src/isce2/contrib/stack/topsStack/Stack.py", line 1595, in get_starting_ranges
    zf = zipfile.ZipFile(safe, 'r')
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/share/users/zhkeliang/anaconda3/envs/insar/lib/python3.11/zipfile.py", line 1284, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
IsADirectoryError: [Errno 21] Is a directory: '/share/users/zhkeliang/Work/SLC/S1A_IW_SLC__1SDV_20170327T110201_20170327T110229_015877_01A2AE_D10B.SAFE'

Here are the contents of my ion_param.txt:
###ionospheric correction module parameters
###the values below are the default values used by the module
###remove # to set the parameters

maximum window size for filtering ionosphere phase:         200
minimum window size for filtering ionosphere phase:         100
maximum window size for filtering ionosphere azimuth shift: 150
minimum window size for filtering ionosphere azimuth shift: 75

###seperated islands or areas usually affect ionosphere estimation and it's better to mask them
###out. check ion/date1_date2/ion_cal/raw_no_projection.ion for areas to be masked out.
###The parameter is a 2-D list. Each element in the 2-D list is a four-element list: [firstLine,
###lastLine, firstColumn, lastColumn], with line/column numbers starting with 1. If one of the
###four elements is specified as -1, the program will use firstLine/lastLine/firstColumn/
###lastColumn instead. For exmple, if you want to mask the following two areas out, you can
###specify a 2-D list like:
###[[100, 200, 100, 200],[1000, 1200, 500, 600]]
areas masked out in ionospheric phase estimation: None

###better NOT try changing the following two parameters, since they are related
###to the filtering parameters above
total number of azimuth looks in the ionosphere processing:             50
total number of range looks in the ionosphere processing:               200
###the above numbers should be integer multiples of the below numbers
number of azimuth looks at first stage for ionosphere phase unwrapping: 10
number of range looks at first stage for ionosphere phase unwrapping:   40

Can anyone tell me where I am going wrong or how to do ionospheric corrections in stackSentinel.py any help I would appreciate!


Reply all
Reply to author
Forward
0 new messages