MintPy
MintPy copied to clipboard
failed inversion with specified reference point
Inversion during timeseries2velocity.py
can fail if reference point is set and processing occurs in patches.
For some pixel y=1047, x=919, then to reproduce run:
-
reference_point.py timeseries.h5 -y 1047 -x 919
-
timeseries2velocity.py timeseries.h5 --ref-yx 1047 919
This will error out with:
IndexError: index 1047 is out of bounds for axis 1 with size 947.
Note that timeseries is size {157/Inf, 1893, 1960}
, and that info.py
shows reference point is correctly set after 1).
I'm pretty sure that the problem is in the dask chunking.
If you don't set the reference point (i.e., leave off the -y 1047 -x 919
in 2) the inversion is successful.
As such this isn't that important, but not sure if it propagates elsewhere.
Hi @bbuzz31, timeseries2velocity.py
is reading the reference pixel value using an independent call of readfile.read()
as below. So the reference point can be outside of the box/patch/chunk in multi-patches processing.
https://github.com/insarlab/MintPy/blob/5eb88579390da078a9f34b9482f01ea17dc360b9/mintpy/timeseries2velocity.py#L240-L245
I was testing using the San Francisco dataset here (https://zenodo.org/record/6990323) with the command below to ensure multi-patches, and can NOT reproduce the error you have (the two scripts went through fine without error). Could you re-produce your error using this dataset?
reference_point.py timeseries_demErr.h5 -y 800 -x 500
timeseries2velocity.py timeseries_demErr.h5 --ram 1 --ref-yx 800 500