MintPy icon indicating copy to clipboard operation
MintPy copied to clipboard

Load ionosphere time series from topsStack processor

Open yuankailiu opened this issue 2 years ago • 3 comments

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:

  • $STACK_DIR/ion_dates/*.ion: the smooth ionospheric time series for each epoch
  • $STACK_DIR/ion_burst_ramp_merged_dates/*.float: the burst ramp time series for each epoch

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.

  1. 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}
  1. prep_isce.py and stackDict.py: read ion time-series files from topsStack files
  • class timeseriesDict():
  • class timeseriesAcqDict(): read(): data_unit & phase2range
  1. changes in readfile.py to read these isce .float and .ion files

Description of proposed changes

Reminders

  • [x] Fix #xxxx
  • [x] Pass Pre-commit check (green)
  • [ ] Pass Codacy code review (green)
  • [x] Pass Circle CI test (green)
  • [x] Make sure that your code follows our style. Use the other functions/files as a basis.
  • [x] If modifying functionality, describe changes to function behavior and arguments in a comment below the function declaration.
  • [x] If adding new functionality, add a detailed description to the documentation and/or an example.

Summary by Sourcery

Add functionality to load ionosphere time series directly from the ISCE2/topStack processor into MintPy, streamlining the process of handling ionospheric corrections. Introduce new configuration options and enhance data loading flexibility.

New Features:

  • Enable loading of ionosphere time series products directly from the ISCE2/topStack processor into MintPy, allowing users to handle ionospheric corrections more efficiently.

Enhancements:

  • Introduce new template keywords for specifying paths to ionosphere time series and burst ramp files, improving configuration flexibility.
  • Enhance the load_data.py script to allow selective loading of datasets, including ionosphere time series, geometry, and interferograms.

yuankailiu avatar Jun 09 '23 00:06 yuankailiu

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.

yunjunz avatar Jun 13 '23 02:06 yunjunz