Skip to content

SLC stack loading/plotting + preliminary NO_DATA_VALUE support#734

Merged
yunjunz merged 4 commits intoinsarlab:mainfrom
yunjunz:slc_stack
Jan 31, 2022
Merged

SLC stack loading/plotting + preliminary NO_DATA_VALUE support#734
yunjunz merged 4 commits intoinsarlab:mainfrom
yunjunz:slc_stack

Conversation

@yunjunz
Copy link
Member

@yunjunz yunjunz commented Jan 31, 2022

Description of proposed changes

This PR adds the following new features:

  • the SLC stack loading (via legacy/load2hdf5.py) and visualization (via tsview.py and view.py) support.
  • tsview.py: map projection via cartopy and improved x-axis adjustment for very long time series, e.g. GRACE products.
  • preliminary NO_DATA_VALUE support while reading metadata and auto-masking during plotting

Reminders

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

@yunjunz yunjunz changed the title Slc stack SLC stack loading/plotting + preliminary NO_DATA_VALUE support Jan 31, 2022
+ reference_point: add a validity checking for input `ref_lat` value

+ info: --num will turn ON --date
  - --num will turn ON --date, so that one can run info.py timeseries.h5 --num to print date list and number, without adding --date option, for conveniency.
  - remove --slice --num combo, as it's not used much, to simplify the code.

+ sensor: use rs1/rs2/rcm for radarsat series
+ identify SLC stack as "FILE_TYPE==timeseries" and "DATA_TYPE==complex(64/128)"

+ stack.timeseries.open): change CENTER_LINE_UTC from required to optional as SLC stack might not have it

+ readfile.read_attribute(): check SLC stack and reset UNIT to 1

+ coord.geo2radar(): ensure the consistency between point longitude and source file, regardless of the source file convention in (-180, 180] or [0, 360) conventions. For geocoded files only.

+ plot:
   - auto_colormap_name(): use gray as default cmap for slc stack
   - auto_adjust_xaxis_date(): smart every_year/month for extra long time series, e.g. GRACE products.

+ view:
   - read_data4figure(): take abs() if data type is complex
   - move code to form check_map_projection() for easy re-use, e.g. in tsview.py

+ tsview:
   - pass `disp_unit` directly for the model estimation result display, for more simple and robust performance against input files that are not in the unit of meters, e.g. giant product or GRACE products.
   - grab WAVELENGTH if and only if wrap-range is 2 pi. This allows applying --wrap-range option to files w/o WAVELENGTH attributes, e.g. the GRACE products.
   - support cartopy map projection and its related features, e.g. --coastline, via view.check_map_projection()
   - take abs() if data is complex
   - bugfix for --flip-lr/ud options
+ rename `legacy/load_hdf5.py` to `legacy/load2hdf5.py`
+ refactor to be more flexible on the input/output file structure
+ add --sub-x/y
+ add --meta to add custom metadata
+ support --dname timeseries with "date" dataset added automatically
+ add DATA_TYPE_STR2OBJ to support most common numpy data types
+ check if the output file exists with --force option
+ add a new standard metadata: NO_DATA_VALUE

+ readfile.py:
   - read_attribute(): grab NO_DATA_VALUE with 'none' as default
   - add get_no_data_value() to get the value of the input file
   - add SPECIAL_STR2NUM() to facilitate no_data_value handling
   - read_isce_xml() / read_gdal_vrt(): grab NoDataValue if exists.

+ view.py: mask out pixels with no_data_value for single subplot

+ tests/config/*.txt: speedup testing by decrease plot.maxMemory to 2GB to use more parallel processes for plotting
@yunjunz yunjunz merged commit 70d66d1 into insarlab:main Jan 31, 2022
@yunjunz yunjunz deleted the slc_stack branch January 31, 2022 19:15
yunjunz added a commit to yunjunz/MintPy that referenced this pull request Mar 10, 2022
+ utils.readfile.read_snap_dim(): bugfix on WAVELENGTH unit

+ utils.plot.auto_adjust_xaxis_date(): fix a bug introduced in insarlab#734

+ docs/README: update aux links in Yunjun et al. (2019)

+ local_oscilator_drift.get_relative_range_distance(): typo fix
yunjunz added a commit to yunjunz/MintPy that referenced this pull request Mar 10, 2022
+ utils.readfile.read_snap_dim(): bugfix on WAVELENGTH unit

+ utils.plot.auto_adjust_xaxis_date(): fix a bug introduced in insarlab#734

+ docs/README: update aux links in Yunjun et al. (2019)

+ local_oscilator_drift.get_relative_range_distance(): typo fix
yunjunz added a commit to yunjunz/MintPy that referenced this pull request Mar 18, 2022
+ utils.readfile.read_snap_dim(): bugfix on WAVELENGTH unit

+ utils.plot.auto_adjust_xaxis_date(): fix a bug introduced in insarlab#734

+ docs/README: update aux links in Yunjun et al. (2019)

+ local_oscilator_drift.get_relative_range_distance(): typo fix
yunjunz added a commit to yunjunz/MintPy that referenced this pull request Mar 19, 2022
+ utils.readfile.read_snap_dim(): bugfix on WAVELENGTH unit

+ utils.plot.auto_adjust_xaxis_date(): fix a bug introduced in insarlab#734

+ docs/README: update aux links in Yunjun et al. (2019)

+ local_oscilator_drift.get_relative_range_distance(): typo fix
yunjunz added a commit to yunjunz/MintPy that referenced this pull request Mar 19, 2022
+ utils.readfile.read_snap_dim(): bugfix on WAVELENGTH unit

+ utils.plot.auto_adjust_xaxis_date(): fix a bug introduced in insarlab#734

+ local_oscilator_drift.get_relative_range_distance(): typo fix

+ docs/README: update aux links in Yunjun et al. (2019)
yunjunz added a commit to yunjunz/MintPy that referenced this pull request Mar 19, 2022
+ utils.readfile.read_snap_dim(): bugfix on WAVELENGTH unit

+ asc_desc2horz_vert: pass angles in deg instead of rad

+ utils.plot.auto_adjust_xaxis_date(): fix a bug introduced in insarlab#734

+ local_oscilator_drift.get_relative_range_distance(): typo fix

+ docs/README: update aux links in Yunjun et al. (2019)
yunjunz added a commit that referenced this pull request Mar 19, 2022
+ utils.readfile.read_snap_dim(): bugfix on WAVELENGTH unit

+ asc_desc2horz_vert: pass angles in deg instead of rad

+ utils.plot.auto_adjust_xaxis_date(): fix a bug introduced in #734

+ local_oscilator_drift.get_relative_range_distance(): typo fix

+ docs/README: update aux links in Yunjun et al. (2019)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant