various bugfixes in readfile and geocode for gamma products#1044
Merged
yunjunz merged 2 commits intoinsarlab:mainfrom Jul 13, 2023
Merged
various bugfixes in readfile and geocode for gamma products#1044yunjunz merged 2 commits intoinsarlab:mainfrom
readfile and geocode for gamma products#1044yunjunz merged 2 commits intoinsarlab:mainfrom
Conversation
+ generalize gamma LUT file extension checking, by replacing the "full file ext checking" with "file ext ending chars checking", to handle both "utm*" and "eqa*" prefix, such as .UTM_TO_RDC, .eqa_2_rdc, as provided by the various gamma users (GAMMA is annoying), in the following scripts: - utils.readfile - utils.writefile - prep_gamma + utils.readfile.read_binary(): convert ~pi value to zero while read phase from cpx file - convert ~pi value to zero while read phase from cpx file, as it sometimes happens to gamma products, probably due to the limited numerical precision of the complex data file, such as .int file. - light refactoring while calling np.fromfile(), to improve the readability + utils.readfile.read_binary_file(): for roipac processor, which is the default one if not specified, honor the metadata file for the following attributes if they exist, instead of using the hardwired value, which is the same as the default ones: - INTERLEAVE - BANDS - BYTE_ORDER - DATA_TYPE + docs/api/attribute.md: add BYTE_ORDER for gamma + dosc/api/data_structure: add file name convention
+ objects/resample.py: fix a bug for `geocode.py --bbox` option while geocoding gamma products with customized SNWE from --bbox option, the output dest_box does not start from 0, thus, should use box[3/4] directly, instead of box[3]-box[1] and box[2]-box[0] + cli/subset: check input file exsitence + view.py --coord: update help msg to avoid potential confusions by updating utils.arg_utils.add_figure_argument() + view.py --coord: set the other choices as yx, instead of radar, and keep radar still in the loop for backward compatiability
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
utils.readfile.py: generalize gamma LUT file extension supportutils.readfile.read_binary(): set~pi(<1e-7 difference) value to 0, as sometimes shown in gamma productsdosc/api/data_structure: add file name convention, as requested in the user forum (https://groups.google.com/g/mintpy/c/XyX0ksURhTc).objects/resample.py: fix a bug forgeocode.py --bboxoption while geocoding gamma products with customized SNWE from--bboxoptionReminders