insarlab / MintPy

Miami InSAR time-series software in Python
https://mintpy.readthedocs.io
Other
585 stars 254 forks source link

Load ionosphere time series from topsStack processor #1019

Open yuankailiu opened 1 year ago

yuankailiu commented 1 year ago

Outline

This PR is meant to better handle the ionosphere correction in MintPy. Before this PR, the ionosphere data was loaded into MintPy as ionospheric interferograms. We then do an SBAS inversion to get an ionospheric time series to do the correction (history).

As MintPy users, for simplicity, now, we want to load the ionosphere time series products from ISCE2/topStack processor directly. Once this #600 PR on ISCE is merged into topsStack code, the ionosphere final products contain the following files storing under the directory of topsStack processor, $STACK_DIR:

Once the mintpy .cfg template file is filled with the above two paths, we can load those ionospheric time series directly into two separate time-series files ion.h5 and ionBurstRamp.h5, respectively during the load_data.py stage.

## EXAMPLE
load_data.py -t smallbaselineApp.cfg                   # this will load ifgrams, geometry, and ionosphere time series
load_data.py -t smallbaselineApp.cfg  -l ifg geom ion  # equivalent to above
load_data.py -t smallbaselineApp.cfg  -l ion           # this will just load the ionosphere time series
load_data.py -t smallbaselineApp.cfg  -l geom          # this will just load the geometry

The loaded ionosphere files ion.h5 and ionBurstRamp.h5 will be under inputs/. Later, we can apply the correction by the following:

add.py inputs/ion.h5 inputs/ionBurstRamp.h5 -o inputs/ionTotal.h5
diff.py timeseries.h5 inputs/ionTotal.h5 -o timeseries_ion.h5

Commits

  1. new template keywords for the ion time series:

    mintpy.load.ionFile: ../ion_dates/*.ion #[path pattern of ionosphere timeseries files]
    mintpy.load.ionBurstRampFile = ../ion_burst_ramp_merged_dates/*.float #[path pattern of ionosphere burst ramp timeseries files]

    Based on above, I also update the defaults/auto_path.py, defaults/smallbaselineApp.cfg, objects/stack.py.

  2. load_data: more flexible loading datasets (changes in load_data.py, cli/load_data.py)

    • allow specifying which dataset to load with the load_data.py -l option. choice from {ifg, geom, ion}
  3. prep_isce.py and stackDict.py: read ion time-series files from topsStack files

    • class timeseriesDict():
    • class timeseriesAcqDict(): read(): data_unit & phase2range
  4. changes in readfile.py to read these isce .float and .ion files

Description of proposed changes

Reminders

yunjunz commented 1 year ago

Thank you @yuankailiu for the big PR. I want to let you know that it may take some time for me to find time and review it. In the meanwhile, I will cut for a new release (version 1.5.2) before merging this PR.