Open falkamelung opened 5 years ago
Current helps:
//login3/nethome/famelung/test/development/rsmas_insar/sources/MimtPy[1013] save_geodmod.py --help
usage: save_geodmod.py [-h] [-t TEMPLATEFILE] [-ds [DATASET]] [-dt [DATATYPE]]
[-b S N W E] [-y LATSTEP] [-x LONSTEP] [-s [STARTDATE]]
[-e [ENDDATE]] [-outdir OUTDIR]
[file]
Prepare data for Geodmod software
positional arguments:
file ascending and descending timeseries files
optional arguments:
-h, --help show this help message and exit
-t TEMPLATEFILE, --template TEMPLATEFILE
Template file with geocoding options.
-ds [DATASET], --dataset [DATASET]
name of dataset.Seperating by ','.
-dt [DATATYPE], --datatype [DATATYPE]
clarify the type of data.[velocity, ifgramStack, timeseries].Only used in template file
-b S N W E, --bbox S N W E
Bounding box of area to be geocoded.
Include the uppler left corner of the first pixel and the lower right corner of the last pixel
-y LATSTEP, --latstep LATSTEP
output pixel size in degree in latitude.
-x LONSTEP, --lonstep LONSTEP
output pixel size in degree in longitude.
-s [STARTDATE], --startDate [STARTDATE]
date1 of timeseires to be converted.The default is the StartDate
-e [ENDDATE], --endDate [ENDDATE]
date2 of timeseries to be converted.The default is the EndDate
-outdir OUTDIR, --outdir OUTDIR
output directory
example:
for singletrack:
Note: startDate, endDate and outdir have default values, any of them can be not given:
startDate default value = atr['START_DATE']
endDate default value = atr['END_DATE']
outdir default value = '$MODELDIR/project/Sen**/geodmod_startDate_endDate/'
save_geodmod.py timeseries_ECMWF_demErr.h5 -b 34.2 35.2 45.0 46.3 -y 0.001 -x 0.001
save_geodmod.py ifgramStack.h5 -b 34.2 35.2 45.0 46.3 -y 0.001 -x 0.001 -s 20171117 -e 20171129 -outdir $MODELDIR/Darbandikhan/SenAT73/
save_geodmod.py velocity.h5 -b 34.2 35.2 45.0 46.3 -y 0.001 -x 0.001 -s 20171117 -e 20171129 -outdir $MODELDIR/Darbandikhan/SenAT73/
save_geodmod.py S1_IW23_026_0108_0113_20171117_XXXXXXXX.he5 -s 20171128 -e 20181210
for multitrack:
Note: startDate, endDate and DataSet can be not given in template:
save_geodmod.py -t $MIMTFILES/Darbandikhan.txt
And for save_gbis.py:
./save_gbis.py --help
usage: save_gbis.py [-h] [-t TEMPLATEFILE] [--model-software MODEL_SOFTWARE]
[-ds [DATASET]] [-dt [DATATYPE]] [-b S N W E] [-y LATSTEP]
[-x LONSTEP] [-s [STARTDATE]] [-e [ENDDATE]]
[-m MASK_FILE] [--ref-lalo [REF_LALO]] [-outdir OUTDIR]
[file]
Prepare data for GBIS software
positional arguments:
file ascending or descending files
optional arguments:
-h, --help show this help message and exit
-t TEMPLATEFILE, --template TEMPLATEFILE
Template file with geocoding options.
--model-software MODEL_SOFTWARE
Goephysical model's name.
-ds [DATASET], --dataset [DATASET]
name of dataset.Seperating by ','.
-dt [DATATYPE], --datatype [DATATYPE]
clarify the type of data.[velocity, ifgramStack, timeseries, S1*.he5].Only used in template file
-b S N W E, --bbox S N W E
Bounding box of area to be geocoded.
Include the uppler left corner of the first pixel and the lower right corner of the last pixel
-y LATSTEP, --latstep LATSTEP
output pixel size in degree in latitude.
-x LONSTEP, --lonstep LONSTEP
output pixel size in degree in longitude.
-s [STARTDATE], --startDate [STARTDATE]
date1 of timeseires to be converted.The default is the StartDate
-e [ENDDATE], --endDate [ENDDATE]
date2 of timeseries to be converted.The default is the EndDate
-m MASK_FILE, --mask MASK_FILE
mask file.
--ref-lalo [REF_LALO]
custom reference pixel in lat/lon
-outdir OUTDIR, --outdir OUTDIR
output directory
example:
for singletrack:
Note: startDate, endDate and outdir have default values, any of them can be not given:
startDate default value = atr['START_DATE']
endDate default value = atr['END_DATE']
outdir default value = '$MODELDIR/project/Sen**/gbis_startDate_endDate/'
save_gbis.py timeseries_ECMWF_demErr.h5 --model-software gbis -b 34.2 35.2 45.0 46.3 -y 0.001 -x 0.001
save_gbis.py ifgramStack.h5 --model-software gbis -b 34.2 35.2 45.0 46.3 -y 0.001 -x 0.001 -s 20171117 -e 20171129 -outdir $MODELDIR/Darbandikhan/SenAT73/
save_gbis.py velocity.h5 --model-software gbis -b 34.2 35.2 45.0 46.3 -y 0.001 -x 0.001 -s 20171117 -e 20171129 -outdir $MODELDIR/Darbandikhan/SenAT73/
save_gbis.py S1_IW23_026_0108_0113_20171117_XXXXXXXX.he5 --model-software gbis -s 20171128 -e 20181210
for multitrack:
Note: startDate, endDate and DataSet can be not given in template:
save_gbis.py -t $MIMTFILES/Darbandikhan.txt
The geo_* files that save_geodmod
produces have a different posting then what we have in the geo
directory. Shall we place them into a tmp_geo
directory to avoid confusion?
I design the structure of directory as following: Firstly, the template files for mimtpy are stored in MIMTFILES; the generated results are stored in MODELDIR; Data that mimtpy used(generated by mintpy) are stored in SCRATCHDIR.
//centos7/data2/rsmasdata/lxr[1005] ll
drwxrwxr-x 2 lxr lxr 38 Aug 17 11:18 MIMTFILES
drwxrwsr-x 3 lxr famelung 34 Aug 21 09:17 MODELDIR
drwxrwxr-x 13 lxr lxr 334 Aug 20 15:28 SCRATCHDIR
drwxrwxr-x 4 lxr lxr 61 Jun 21 16:13 TESTDATA_ISCE
Secondly, I want to design the directory structure of MODELDIR like
$MODELDIR/project/SenAT(DT)***/gbis_startdate_enddate
$MODELDIR/project/SenAT(DT)***/geodmod_startdate_enddate
$MODELDIR/project/horzvert/startdate_enddate
Example:
//centos7/data2/rsmasdata/lxr/MODELDIR/Darbandikhan[1009] ll
drwxrwsr-x 4 lxr famelung 68 Aug 20 20:46 horzvert
drwxrwsr-x 6 lxr famelung 149 Aug 19 20:42 SenAT72
drwxrwsr-x 9 lxr famelung 254 Aug 19 20:49 SenAT73
drwxrwsr-x 4 lxr famelung 81 Aug 19 17:14 SenDT79
//centos7/data2/rsmasdata/lxr/MODELDIR/Darbandikhan/SenAT72[1011]
gbis_20171117_20171129
gbis_20171123_20171223
gbis_20171117_20171223
geodmod_20171117_20171223
//centos7/data2/rsmasdata/lxr/MODELDIR/Darbandikhan/SenAT72/gbis_20171117_20171129/
DarbandikhanSenAT72_20171117_20171129.mat
geo_20171117_20171129.unw
geo_20171117_20171129.unw.rsc
//centos7/data2/rsmasdata/lxr/MODELDIR/Darbandikhan/SenAT72/geodmod_20171117_20171223/
geo_20171117_20171223.cor
geo_20171117_20171223.cor.rsc
geo_20171117_20171223.unw
geo_20171117_20171223.unw.rsc
srtm.dem
srtm.dem.jpeg
srtm.dem.jpeg.rsc
srtm.dem.rsc
//centos7/data2/rsmasdata/lxr/MODELDIR/Darbandikhan/horzvert/
20171117_20171205
0171117_20190423
//centos7/data2/rsmasdata/lxr/MODELDIR/Darbandikhan/horzvert/20171117_20190423/
geo_20171117_20190423.unw
geo_20171117_20190423.unw.rsc
geo_20171118_20190430.unw
geo_20171118_20190430.unw.rsc
hor.h5
hz.h5
up.h5
vel_horizontal.h5
vel_vertical.h5
ver.h5
For the geofile in geod , gbis* and horzvert folders, do you mean we put the geofile into geod/tmp_geo/ folder?
No. We don’t need them, right? I mean /mintpy/tmp_geo
Yes, we don't need geo_***.h5 files. How about just delete them?
Yes. Write them in the tmp_* and then delete.
On Aug 20, 2019, at 11:37 PM, ranneylxr notifications@github.com<mailto:notifications@github.com> wrote:
Yes, we don't need geo_***.h5 files. How about just delete them?
OK! I will change the code
@ranneylxr : If we follow Yunjun's suggestion and have save_gbis.py
and save_geodmod.py
only do very simple things. then we could have a save_for_modelling.py --modelSoftware gbis
that takes care of the multitrack issues. All the functions such as track_date
could be in mimtpy/utils/multitrack_utilities.py
By the way, some of the functions don't fave self-explanatory names. find_date --> find_start_end_date.py
, track_date.py -->find_nearest_date.py
@ranneylxr , I did some minor modifications as you have seen while I was debugging. Here a few more comments on the code:
OK. I will try to change them.
The new usage of save_geodmod.py and save_gbis_mimt.py is:
The structure of directory in $MODELDIR (outdir you set) is changed:
Lets agree here about the multitrack directory structure.
Here is Yunjun's directory structure: