Comments (8)
I tried modifying the asc_desc2horz_vert.py
script to change the FILE_TYPE
attribute to displacement
before writing out the results, which worked to change the dataset type.
# if original data was timeseries, convert it to displacement
if atr['FILE_TYPE'] == 'timeseries':
atr['FILE_TYPE'] = 'displacement';
I could view it with no problem, but save_gmt.py
still refused to work. I guess other things need to be changed.
save_gmt.py up.h5 displacement -o up_v1.grd
Using default MintPy Path: /home/fielding/tools/MintPy
Traceback (most recent call last):
File "/u/vento-r0/ericf/packages/Anaconda/anaconda3/envs/mintpy/lib/python3.7/site-packages/numpy/core/function_base.py", line 117, in linspace
num = operator.index(num)
TypeError: 'float' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/fielding/tools/MintPy/mintpy/save_gmt.py", line 179, in <module>
main(sys.argv[1:])
File "/home/fielding/tools/MintPy/mintpy/save_gmt.py", line 172, in main
inps.outfile = write_grd_file(data, atr, inps.outfile)
File "/home/fielding/tools/MintPy/mintpy/save_gmt.py", line 150, in write_grd_file
lats, lons = get_geo_lat_lon(atr)
File "/home/fielding/tools/MintPy/mintpy/save_gmt.py", line 133, in get_geo_lat_lon
X = np.linspace(X_FIRST, X_END, W)
File "<__array_function__ internals>", line 6, in linspace
File "/u/vento-r0/ericf/packages/Anaconda/anaconda3/envs/mintpy/lib/python3.7/site-packages/numpy/core/function_base.py", line 121, in linspace
.format(type(num)))
TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.
from mintpy.
The save_gmt.py bug should be fixed now.
from mintpy.
Thanks @yunjunz it works great now!
from mintpy.
It seems that the asc_desc2horz_vert.py
script or one of the scripts it calls needs the same fix as in PR #273 . The script now writes the files, but the output files can't be displayed with view.py
or other programs because the timeseries
dataset lost a dimension.
writing horizontal component to file: hz.h5
create timeseries HDF5 file: hz.h5 with w mode
create dataset /timeseries of float32 in size of (614, 1072) with compression=None
create dataset /dates of |S8 in size of (1,)
finished writing to hz.h5
writing vertical component to file: up.h5
create timeseries HDF5 file: up.h5 with w mode
create dataset /timeseries of float32 in size of (614, 1072) with compression=None
create dataset /dates of |S8 in size of (1,)
finished writing to up.h5
from mintpy.
I tried making the same additions to asc_desc2horz_vert.py
that were done in the other files under PR #273 and that made output up.h5
and hz.h5
files that I can display with view.py
. I still had trouble with the save_gmt.py
command. I wonder if it would be better to change the output FILE_TYPE
attribute to another type instead.
from mintpy.
Hi @EJFielding, I agree with you. timeseries
file type is not designed to have one acquisition, thus, it would require quite some changes in the code to make it work through all scripts. Simply changing the file type to a different name, i.e. displacement
, would much easier. This can be done by changing the dataset name in the root level of HDF5 file from timeseries
to displacement.
from mintpy.
Does that mean we need a program to extract a step function "date" and make that a displacement
dataset? I understand the timeseriesStepFunction
output can have multiple dates, but I have only asked for one date.
from mintpy.
You are right. The existing program can not do it, but this can be easily done in python in a notebook. After all, it's HDF5, manually playing around is straightforward.
The current problem is just because timeseries
is a defined keyword in mintpy, and can not be used for something else.
from mintpy.
Related Issues (20)
- output save_gbis.py issue HOT 1
- hyp3 + mintpy: Error in Second Step (Modify Network) HOT 1
- metadata inconsistency for UTM coordinates HOT 4
- `hyp3`: more metadata for `HDF-EOS5` support HOT 6
- The quality of the time series degrades as the distance from the reference point increases. HOT 1
- Support for multiple GNSS HOT 4
- Projection of Liine-of-Sight (LoS) displacement to the downslope component. HOT 3
- `lalo2yx` behaves incorrectly when set of lat/lons cross UTM zone boundary HOT 2
- in the MintPy tutorial of ScopeEarth2023, theSanFranSenDT42.tar HOT 1
- smallbaselineAPP_aria.ipynb in the tutorial of EarthScope2023οΌthe SanFranSenDT42.tar downloaded from zenodo by 'wget' can't be unzip HOT 2
- `view.py numInvIfgram.h5` error for `RidgecrestSenDT71` HOT 1
- Problem with working on step - invert_network HOT 1
- error in prep_gmtsar : not reading *prm files HOT 1
- Request for Large Image Size
- Can't load HyP3 `INSAR_ISCE_BURST` data in v1.6.0 HOT 3
- FileExistsError: NO two *.prm files found! for prep_gmtsar.py HOT 11
- Reference Point Lalo to XY conversion HOT 1
- How to combine snap with mintpy? HOT 1
- Template RidgecrestSenDT71 timeseries.h5 issue. HOT 2
- Output KMZs not properly geocoded for time series in UTM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mintpy.