Skip to content

Commit

Permalink
Parse azimuth fm rate polynomial (#59)
Browse files Browse the repository at this point in the history
* annotation reader (s1_annotation.py) init. commit

* s1_annotation.py - rev1 after the suggestion by @gshiroma

* s1_annotation.py - Pylinted to be more conform to PEP8

* annotation objects are attributes of `Sentinel1BurstSlc`

* s1_annotation.py : Classes for Burst-wide information

* s1_reader.py - annotation information are stored in each Sentinel1BurstSlc instances

* fix on `s1_annotation.parse_polynomial_element()` to read `azimuthFmRatePolynomial` in older format.

* Adding features for applying beta0

* s1_reader.py - differentiating the polynomial parsing scheme based on exception handling

* thermal noise LUT for IPF lower than 2.90

* Update src/s1reader/s1_reader.py - comment from Liang

Co-authored-by: Liang Yu <[email protected]>

* Fix on edits committed on another branch

* removing placeholder

Co-authored-by: Liang Yu <[email protected]>

* get_ipf_version - revision by @LiangJYu

Co-authored-by: Liang Yu <[email protected]>

* Update src/s1reader/s1_reader.py - remove placeholder

Co-authored-by: Liang Yu <[email protected]>

* moving the single-use variables closer to where they are used.

Co-authored-by: Liang Yu <[email protected]>

* Update src/s1reader/s1_reader.py

Co-authored-by: Liang Yu <[email protected]>

* s1_annotation.py - readibility improvement

* Update on docstring for `AnnotationBase`

Co-authored-by: Liang Yu <[email protected]>

* revision on error message

Co-authored-by: Liang Yu <[email protected]>

* Addressing comments by @LiangJYu and @vbrancat in PR #48

* s1_annotation.py - code cleanup

Co-authored-by: Liang Yu <[email protected]>

* s1_annotation.py - readability improvement

Co-authored-by: Liang Yu <[email protected]>

* readibility improvement

* changing the datatype of IPF version to version.Version. Changing the affected functions accordingly.

* space between args in _parse_list

* addressing the comments by @vbrancat

* added manifest.safe to test SAFE/zip

* updated burst ID format

* fixed directory structure in zip to match S1 SAFE spec

* Update src/s1reader/s1_annotation.py

Co-authored-by: Gustavo H. X. Shiroma <[email protected]>

* Update src/s1reader/s1_annotation.py

Co-authored-by: Gustavo H. X. Shiroma <[email protected]>

* Update src/s1reader/s1_annotation.py

Co-authored-by: Gustavo H. X. Shiroma <[email protected]>

* Update src/s1reader/s1_annotation.py

Co-authored-by: Gustavo H. X. Shiroma <[email protected]>

* s1_annotation.py - fixing the logic to add margin to azimuth noise LUT

Co-authored-by: Gustavo H. X. Shiroma <[email protected]>

* s1_reader.py - removing lines that commented out

Co-authored-by: Gustavo H. X. Shiroma <[email protected]>

* s1_reader.py - further removal of lines that commented out

Co-authored-by: Gustavo H. X. Shiroma <[email protected]>

* Addressing comments by @gshiroma and other minor fix

* Addressing codacy issues

* Taking care of codacy issues

* Fixing Codacy issue

* Fix on taking care of some old IPF version when loading AZ FM rate polynomial

* fix on readability

* fix on PEP issue

* Addressing the comment by @gshiroma

* more context and description to the AZ FM rate format change

Co-authored-by: Seongsu Jeong <[email protected]>
Co-authored-by: Liang Yu <[email protected]>
Co-authored-by: Gustavo H. X. Shiroma <[email protected]>
  • Loading branch information
4 people authored Aug 9, 2022
1 parent cfb0443 commit 3c5ab38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/s1reader/s1_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ def parse_polynomial_element(elem, poly_name):

half_c = 0.5 * isce3.core.speed_of_light
r0 = half_c * float(elem.find('t0').text)
coeffs = [float(x) for x in elem.find(poly_name).text.split()]

# NOTE Format of the Azimith FM rate polynomials has changed when IPF version was somewhere between 2.36 and 2.82
if elem.find(poly_name) is None: # before the format change i.e. older IPF
coeffs = [float(x.text) for x in elem[2:]]
else: # after the format change i.e. newer IPF
coeffs = [float(x) for x in elem.find(poly_name).text.split()]

poly1d = isce3.core.Poly1d(coeffs, r0, half_c)
return (ref_time, poly1d)

Expand Down

0 comments on commit 3c5ab38

Please sign in to comment.