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

concatenate_radarGeo.py refactoring #16

Open
falkamelung opened this issue Oct 17, 2023 · 0 comments
Open

concatenate_radarGeo.py refactoring #16

falkamelung opened this issue Oct 17, 2023 · 0 comments

Comments

@falkamelung
Copy link
Member

falkamelung commented Oct 17, 2023

Some suggestions to simplify before we start using it seriously:

  • —geo-file1 and —geo-file2 options could be optional. Pyhton supports in argparse to use a previously defined argument as default.
  • add example on how to concatenate 3 files.
  • With a smart argparse it could be significantly simplified. This command would have all needed information:
concatenate_radarGeo.py miaplpy_MBeachNorth_201510_201610/network_single_reference miaplpy_SSurfside1_201510_201610/network_single_reference  --datatype velocity --output MBeach --outdir miaplpyBig --geo_full ./mintpy_11/inputs/geometryRadar.h5 

Minor:

  • make more verbose. Use different words that affilicate, affilite. Unclear what that could be, second or secondary? It says find reference data sets but it does not say which one it is.
  • It says: "Find which dataset is reference dataset." Say which one it found!
  • It might not be good to recommend in the examples to use both --out-suffix and --outdir. It seems easier to only use --outdir and keep the original file names which we are used to
  • a --list option could check whether and list the required files exist and list them. It also could check whether the lat and long ordering is correct.
  • It is slow, especially for time series. Maybe there is a for loop that can be replaced by a matrix manipulation? ChatGPT might offer suggestions.

Here some commands that worked for me:

cd /data/HDF5EOS/qMiamiSenAT48[2025] cat concatenate.log

concatenate_radarGeo.py miaplpy_MBeachNorth_201510_201610/network_single_reference/velocity.h5 miaplpy_SSurfside1_201510_201610/network_single_reference/velocity.h5 --geo-file1 miaplpy_MBeachNorth_201510_201610/network_single_reference/inputs/geometryRadar.h5 --geo-file2 miaplpy_SSurfside1_201510_201610/network_single_reference/inputs/geometryRadar.h5 --out-suffix MBeach --outdir miaplpyBig --geo-full ./mintpy_11/inputs/geometryRadar.h5

concatenate_radarGeo.py miaplpy_MBeachNorth_201510_201610/maskPS.h5  miaplpy_SSurfside1_201510_201610/maskPS.h5 --geo-file1 
miaplpy_MBeachNorth_201510_201610/network_single_reference/inputs/geometryRadar.h5  --geo-file2 miaplpy_SSurfside1_201510_201610/network_single_reference/inputs/geometryRadar.h5 --out-suffix MBeach --outdir miaplpyBig --geo-full ./mintpy_11/inputs/geometryRadar.h5
uffix
concatenate_radarGeo.py miaplpy_MBeachNorth_201510_201610/network_single_reference/timeseries_demErr.h5  miaplpy_SSurfside1_201510_201610/network_single_reference/timeseries_demErr.h5 --geo-file1 miaplpy_MBeachNorth_201510_201610/network_single_reference/inputs/geometryRadar.h5  --geo-file2 miaplpy_SSurfside1_201510_201610/inputs/geometryRadar.h5 --out-suffix MBeach --outdir miaplpyBig --geo-full ./mintpy_11/inputs/geometryRadar.h5

And here the geometryRadar.h5:
image

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