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

initial save_geodmod #174

Closed
wants to merge 12 commits into from
Closed

initial save_geodmod #174

wants to merge 12 commits into from

Conversation

ranneylxr
Copy link
Contributor

No description provided.

mintpy/save_geodmod.py Outdated Show resolved Hide resolved
Copy link
Member

@yunjunz yunjunz left a 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.

mintpy/save_geodmod.py Outdated Show resolved Hide resolved
@falkamelung
Copy link
Contributor

falkamelung commented Aug 7, 2019 via email


######################################################################################
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
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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 scriptrun_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.

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

@yunjunz
Copy link
Member

yunjunz commented Aug 8, 2019

Hi @ranneylxr, could you modify the script according to Codacy's suggestion?

https://app.codacy.com/app/insarlab/MintPy/pullRequest?prid=3971643

Copy link
Member

@yunjunz yunjunz left a 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:

  1. I would strongly recommend you to modify based on the existing save_gbis.py instead of writing a new script.
  2. Please issue a separate pull request for the changes in save_gbis*.py

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])
Copy link
Member

@yunjunz yunjunz Aug 21, 2019

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.

@yunjunz
Copy link
Member

yunjunz commented Mar 18, 2020

These three scripts have been integrated into the geodesymiami/mimtpy repo, close it.

@yunjunz yunjunz closed this Mar 18, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants