Skip to content
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

read_metadata function improvements #14

Open
rogerkuou opened this issue Sep 13, 2024 · 1 comment
Open

read_metadata function improvements #14

rogerkuou opened this issue Sep 13, 2024 · 1 comment

Comments

@rogerkuou
Copy link
Member

rogerkuou commented Sep 13, 2024

Currently the metadata reading functions are implemented in io.py. This is a direct copy from: Paolo's implementation based on Gecoris

There following imperfections:

  1. It has only been tested on a stitched stack, e.g. /home/oku/Developments/MobyLe/data/downloaded/stacks/nl_veenweiden_s1_dsc_t037/stack.
    Current unit testing runs on an example metadata of the reference img of the above stack (20200328). We should consider add more testing case.

  2. Comparing with the original version (readMetadata function), the part of determine the stack type based on path names is taken out.

# type of image: stitched: TRUE / burst: FALSE
    imgType = str(resFile).split(os.sep)[-2].isdigit()

The above code breaks the unittest since it requires the metadata file to be strictly located at a path.We need to have a way to tell the stack type based on metadata info itself.

  1. There are two many regular expression searches. We may consider build a searching dict with {attr_key: reg_patterns}. This ideas follows Meiert's comment in PR Reconstruct slc from inteferograms #9:

There is a huge number of the regular expression searches here and in the following. I'd suggest moving this to a separate module and making a wrapper which calls them by name, allowing the correct implementation to be retrieved. This also makes one central place for keeping track of all these things and easily supports adding additional methods as needed.
Happy to discuss @rogerkuou

  1. The following part is missing and need more investigations in the original implementation:
# ++++ 24 and 25 - azFmRateArray and dcPolyArray
    # Are skipped because the io.datetimeToMJD function is missing
  1. There are many hard-coded metadata, for example the azimuth_resolution get several constant value from S1 report, and is selected based on the swath number. It would be better if we can put these constant into a central place, e.g. constants.py and import them here. This would be easier to maintain.

  2. Check compatability to Doris v4 metadata files:
    /project/caroline/Share/stacks/tsx/nl_pijnacker_tsx_dsc_t048/process

@rogerkuou
Copy link
Member Author

rogerkuou commented Sep 24, 2024

ToDo: add Freek's comment in #9 (Done in 20240930)

@rogerkuou rogerkuou changed the title Read metadata function improvements read_metadata function improvements Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant