-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
annotation reader (s1_annotation.py) - initial implementation #48
annotation reader (s1_annotation.py) - initial implementation #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this, @seongsujeong . That's nice that you wrote a class that can be used for both radiometric calibration and thermal noise correction. This is a good start. I have a few comments/suggestions below. I'd also suggest running this code through some PEP8 checker. I'm looking forward to having this class used by the S-1 reader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies in advance - My comments are effectively asking for a rewrite of this.
Not in the PR but should be is the inclusion and integration of Calibration
and Noise
with the rest s1reader modules. I think Calibration
and Noise
should be attributes of the Sentinel1BurstSlc
dataclass. The init of these objects should occur when a Sentinel1BurstSlc
is initalized.
Let me know if you have any questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seongsujeong thank you for this nice PR. As we briefly discussed offline, I think it will be great to slightly restructure this PR such that the Noise and Calibration are returned as isce3.core.LUT2D objects which are class members of the existing Sentinel1BurstSlc class. Since they are small and trivial to read, I think they should be read by default as we read the data and should not require an extra call. At a higher level workflow a user of the reader should not do any extra work and the returned burst should have LUT2D of noise and calibration. Please let me know if you have any concern or if this my comment is not clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for this incomplete review. I'll try to finish reviewing sometime this coming week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seongsujeong nice work! Few comments before it's ready.
Co-authored-by: Liang Yu <[email protected]>
… into annotation_reader
Co-authored-by: Liang Yu <[email protected]>
Co-authored-by: Liang Yu <[email protected]>
Co-authored-by: Liang Yu <[email protected]>
Co-authored-by: Liang Yu <[email protected]>
Co-authored-by: Liang Yu <[email protected]>
… into annotation_reader
Co-authored-by: Liang Yu <[email protected]>
Co-authored-by: Liang Yu <[email protected]>
Updating branch `annotation_reader` in this for to date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, @seongsujeong . Thank you for working on that. I still have some minor comments before we merge this PR.
Thank you all for the inputs for this PR. I've updated the branch to date to test it before merging it into the main repo. Looks like pytest in CircieCI is failing, with the error summary below:
I've taken a look at the test data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also forgot to ask you to please resolve the codacy issues.
Nevermind. I just noticed you did that yesterday. Thanks! |
I'm working this and will submit a PR to this branch sometime today. |
The scope of the fix grew being adding manifest.safe so I issued a new PR to main instead of to your PR. See #58 |
Unit test fixes from isce-framework#58
Co-authored-by: Gustavo H. X. Shiroma <[email protected]>
Co-authored-by: Gustavo H. X. Shiroma <[email protected]>
Co-authored-by: Gustavo H. X. Shiroma <[email protected]>
Co-authored-by: Gustavo H. X. Shiroma <[email protected]>
Co-authored-by: Gustavo H. X. Shiroma <[email protected]>
Co-authored-by: Gustavo H. X. Shiroma <[email protected]>
Co-authored-by: Gustavo H. X. Shiroma <[email protected]>
… into annotation_reader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you, @seongsujeong , for addressing all my comments. Just please make sure to address all new Codacy issues before merging it.
* 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]>
This PR implements the reader for Calibration Annotation Data Set (CADS), and Noise Annotation Data Set (NADS), which was related to the issue #27. This work is in context of implementing thermal noise correction. The structure of CADS and NADS are very similar, so their readers shares similar procedure to read. Therefore the readers are implemented together in
s1_annotation.py
Few examples of the usage are as below:
Notes:
rg
, and the ones about the azimuth noise vector hasaz