-
Notifications
You must be signed in to change notification settings - Fork 259
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
UAVSAR (stripmapStack) support via YYMMDDTHHMMSS time format #384
Conversation
to import to mintpy isce processed uavsar coregistered stack data function get_time string format function in both ptime and stack readfile and ifgram_inversion were adapted to read the new time format
To-do list:
|
to be consistent with previous convention.
consider the hour/min/sec info while calculating the temporal baseline info in the following functions: + yyyymmdd2years() + date_list2tbase() + date_list2vector()
@taliboliver MintPy is currently using the time unit of years for the inversion steps, i.e. network inversion, dem error correction, and velocity estimation. For UAVSAR, with a pair of images of 20 mins away,
Thus, we should use the unit of days for all inversion steps. Storing the final result in the unit of years, such as the velocity file, is still fine. Let's check this carefully after the above to-do list is done. Then we should remove those float64 design matrix in UPDATE: float64 is not needed because the current float32 is precise enough, as shown below. |
+ replace dt(*time.strptime) with dt.strptime() to be able to grab second info from input date string + remove unsed time module
adjust docs/api/module_hierarchy.md accordingly.
Update made to isce_utils.py to recognize isce uavsar "data" metafile format. Changes allow for correct data prep_isce.py use and load_data.py successfully.
from the initial prep_fringe.py PR.
changes made to date_str_format to read year without century and typo corrected in line 283.
obj/sensor: + add uavsar to global varialbe SENSOR_NAMES + update standardSensorNames and get_unavco_mission_name() in alphebet order with UAV as the mission short name utils/ptime.get_date_str_format() + add both YYYYMMDDTHHMM and YYMMDDTHHMM
use chunk_size with variable number of pixel determined by the number of ifgrams for a fixed memory usage, more robust. less printout message for calc temp coh.
obj/stack: roll back the design matrix data type to float32 becuase the test result with both Sentinel-1 of 12 days re-visit time and UAVSAR of 10 mins re-visit time are precise enough with max residual less than 0.002 mm. simulation: + use lower case for all labels + move the old sim_variable_timeseries() to sim_variable_timeseries_v1() + add sim_variable_timeseries() that takes num_date so that it can generate the exact displacement list regardless of re-visit time. utils/network.select_pairs_sequential(): re-write to support any list of date, in str, datetime.datetime obj, etc. utils/ptime.get_date_str_format(): support YYYYMMDDTHHMMSS format
Here are the evaluation results of whether the precision of using the unit of years in float32 is enough for all three inversion problems (invert_network, correct_topography, velocity) in smallbaselineApp.py. All of them give the same level of estimation precision, thus, yes, they are precise enough. So we could keep using the previous form of design matrices. 1. invert_network2. correct_topography3. velocity |
I got a I am using one conda environment with isce2 and mintpy installed. Talib is using brew installed isce2 and conda environment with mintpy installed.
The full error message:
After modifying the
|
obj/stack: roll back the design matrix data type to float32 becuase the test result with both Sentinel-1 of 12 days re-visit time and UAVSAR of 10 mins re-visit time are precise enough with max residual less than 0.002 mm. simulation: + use lower case for all labels + move the old sim_variable_timeseries() to sim_variable_timeseries_v1() + add sim_variable_timeseries() that takes num_date so that it can generate the exact displacement list regardless of re-visit time. utils/network.select_pairs_sequential(): re-write to support any list of date, in str, datetime.datetime obj, etc. utils/ptime.get_date_str_format(): support YYYYMMDDTHHMMSS format
I had some code to generate python3-gdbm bindings and had given it to @sssangha and @dbekaert at some point I think. You should be able to something similar to build gdbm if it is missing from your platform. Then you wont need to make that subtle change. I'm guess the error is because the database is not actually dbm. |
It was essentially wrapping a setup.py around this file https://github.com/python/cpython/blob/master/Modules/_gdbmmodule.c that included linking to libgdbm. You will get the lib when you install gdbm from conda. |
BTW, for the masterShelve/data.dat from ALOS-2 stripmapStack products that I processed, the above shelve.open() went through successfully. Not sure if this is related with ContinuumIO/anaconda-issues#7356 (comment):
|
I dont think its an incompatibility issue. Just that the gdbm module is optional since it has dependency on libgdbm and wasn't part of the python build. If you build one yourself with that C file, it should work. |
Is it possible to share this code of generating python3-gdbm bindings here? @piyushrpt @dbekaert @sssangha. Thank you in advance. |
I don't have access to my old email. Essentially, the setup.py did this
include_path to contain gdbm.h You can then drop the gdbm.so in any location you want. |
This |
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.
Looks all good to me now!
The only issue left is the python-gdbm binding in the conda python env, which is not an issue due to this PR, thus, I think it's fine to merge it.
You can use the macports recipe to build the _gdbm extension as well. Replace "__PREFIX__" with str corresponding to $CONDA_PREFIX |
@piyushrpt I git cloned cpython, which contains
|
Looks like it needs an additional .h file as well now - https://github.com/macports/macports-ports/blob/e8949c965569e476add2628228231d96fc8c634b/python/py-gdbm/Portfile#L122 |
since we will use isce for it.
🎉 🎉 🎉 Congrats on merging your first pull request! We here at behaviorbot are proud of you! 🎉 🎉 🎉 |
Here is an overview of what got changed by this pull request: Clones added
============
- mintpy/simulation/simulation.py 2
Clones removed
==============
+ mintpy/utils/network.py -2
See the complete overview on Codacy |
my mintpy was in base environment ,i must active conda in shell before use mintpy smallbaselineApp.py ,after i exit the base i can use prep_isce.py to generate the dara.rsc file |
Description of proposed changes
This PR adds UAVSAR support (#376). The detailed changes include:
add
YYYYMMDDThhmm
time string support to import to isce processed uavsar coregistered interferogram stack into mintpy.add
get_time_str_format()
for time format identification in utils/ptime.py and objects/stack.pyadapt utils.readfile.py and ifgram_inversion.py to read the new time format
Reminders