isce-framework / isce-framework/s1-reader
Bad number of boundary/center points extracted
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 34
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce
$ asfsmd S1A_IW_SLC__1SDV_20150124T165546_20150124T165613_004316_005423_ADFE
$ s1_info S1A_IW_SLC__1SDV_20150124T165546_20150124T165613_004316_005423_ADFE.SAFE/
Error:
Traceback (most recent call last):
File "/Users/staniewi/miniconda3/envs/mapping/bin/s1_info", line 8, in <module>
sys.exit(main())
File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_info.py", line 262, in main
for burst in get_bursts(path, args.pol, args.iw):
File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_info.py", line 26, in get_bursts
burst_nested_list = [
File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_info.py", line 27, in <listcomp>
s1reader.load_bursts(filename, None, iw, pol, flag_apply_eap=False)
File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_reader.py", line 878, in load_bursts
bursts = _burst_from_safe_dir(path, id_str, orbit_path,
File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_reader.py", line 997, in _burst_from_safe_dir
bursts = burst_from_xml(f_annotation, orbit_path, f_tiff, iw2_f_annotation,
File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_reader.py", line 795, in burst_from_xml
platform_id, safe_filename, center_pts[i],
IndexError: list index out of range
Inside get_burst_centers_and_boundaries:
ipdb> p center_pts
[<POINT (14.688 36.912)>, <POINT (14.649 37.078)>, <POINT (14.61 37.244)>, <POINT (14.571 37.41)>, <POINT (14.531 37.575)>, <POINT (14.492 37.741)>, <POINT (14.453 37.907)>, <POINT (14.409 38.09)>]
ipdb> p len(center_pts)
8
but,
ipdb> p len(burst_list_elements)
9
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with s1_info.py:get_bursts and s1_reader.py:burst_from_xml, then inspect get_burst_centers_and_boundaries for the supplied SAFE product. Reproduce the mismatch between center_pts and burst_list_elements and trace how the extracted values are indexed. Done means s1_info completes without the IndexError and handles the reported boundary/center-point counts consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100