-
Notifications
You must be signed in to change notification settings - Fork 243
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
initial save_geodmod #174
initial save_geodmod #174
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.
Hi @ranneylxr, thank you for contributing!
Could you respond to the Codacy suggestions?
@falkamelung, could you review this script as well? I will merge it after Codacy and you approve it.
It is fine with me. I might polish at a later time.
|
mintpy/save_geodmod.py
Outdated
|
||
###################################################################################### | ||
EXAMPLE = """example: | ||
save_geodmod.py $SCRATCHDIR/DarbandikhanSenAT72/PYSAR/timeseries_ECMWF_demErr.h5 20171117_20180603 -b 34.2 35.2 45.0 46.3 -y 0.001 -x 0.001 -t unw -o AT20171117_20180603.unw |
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.
Please use meaningful names, so the AT should go away
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.
It also should have --dir option for the output directory
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.
Thinking about what we need for MimtPy, I think the following two calls should be supported. Do we need a -t
or --type
or --datatype
option (I don't remember what mintpy uses) to figure out whether the argument is velocity or timeseries? It think it can figure it out.
save_geodmod.py timeseries_ECMWF_demErr.h5 -b 34.2 35.2 45.0 46.3 -y 0.001 -x 0.001 --startDate 20171117 --endDate 20180603 --outdir $MODELDIR
save_geodmod.py velocity.h5 -b 34.2 35.2 45.0 46.3 -y 0.001 -x 0.001 --startDate 20171117 --endDate 20180603 --outdir $MODELDIR [--indir arg]
if --starDate and --endDate are not given the defaults are the beginning and end dates (set in argparse)
We switch MimtPy mode on with --multitrack
option.
For --multitrack --datasets DarbandikhanSenAT72 --DarbandikhanSenDT27
it would run the previous save_geodmo.py command in the the $SCRATCHDIR/DarbandikhanSenAT72
and $SCRATCHDIR/DarbandikhanSenDT27directories (need a function within the script
run_save_geodmod`).
If --datasets
is not given it would search for the datasets in the $SCRATCHDIR
based on the *.txt filename. If name is Darbandikhan.txt
it would look for $SCRATCHDIR/Darbandikhan*/mintpy
directories and process those.
Note: we follow mintpy convention and chdir into $SCRATCHDIR/DarbandikhanSenAT72
to execute run_save_geodmod
in there.
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.
Please check how mintpy/defaults/auto_path.py
is used. We may want to use this when --multitrack
is on.
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.
@ranneylxr, could you respond to the comments above?
If this is solved, @falkamelung, click on Resolve conversation
please so that I can go forward and merge this request.
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 am working on it. Once I finish this part, I will push the modified version.
Hi @ranneylxr, could you modify the script according to Codacy's suggestion? https://app.codacy.com/app/insarlab/MintPy/pullRequest?prid=3971643 |
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 contributing @ranneylxr!
For save_geodmod.py, there are some conflicts of different committed versions in the code, could you resolve them? Check the codacy suggestions as well.
For save_gbis_mintpy.py:
- I would strongly recommend you to modify based on the existing
save_gbis.py
instead of writing a new script. - Please issue a separate pull request for the changes in save_gbis*.py
mintpy/save_gbis_mimtpy.py
Outdated
ret = re.findall(r"^(.+)(Sen[AD]T\d+)$", projectTrack) | ||
project = ret[0][0] | ||
Track = ret[0][1] | ||
dirname = "".join([os.getenv('MODELDIR')+'/'+project+'/'+Track+'/gbis'+'_'+inps.startDate+'_'+inps.endDate]) |
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.
It's not recommended to embed environmental variables in the code as other users might not have it.
Keep in mind that mintpy code should be independent from RSMAS insar setting.
These three scripts have been integrated into the |
No description provided.