Skip to content

Commit 3c5ab38

Browse files
seongsujeongLiangJYugshiroma
authored
Parse azimuth fm rate polynomial (#59)
* 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]>
1 parent cfb0443 commit 3c5ab38

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/s1reader/s1_reader.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ def parse_polynomial_element(elem, poly_name):
5656

5757
half_c = 0.5 * isce3.core.speed_of_light
5858
r0 = half_c * float(elem.find('t0').text)
59-
coeffs = [float(x) for x in elem.find(poly_name).text.split()]
59+
60+
# NOTE Format of the Azimith FM rate polynomials has changed when IPF version was somewhere between 2.36 and 2.82
61+
if elem.find(poly_name) is None: # before the format change i.e. older IPF
62+
coeffs = [float(x.text) for x in elem[2:]]
63+
else: # after the format change i.e. newer IPF
64+
coeffs = [float(x) for x in elem.find(poly_name).text.split()]
65+
6066
poly1d = isce3.core.Poly1d(coeffs, r0, half_c)
6167
return (ref_time, poly1d)
6268

0 commit comments

Comments
 (0)