opera-adt / COMPASS

COregistered Multi-temPorAl Sar Slc
Apache License 2.0
39 stars 18 forks source link

azimuth fm rate mismatch -> lut.py #72

Closed seongsujeong closed 1 year ago

seongsujeong commented 1 year ago

This PR is to add the azimuth FM rate mismatch into the model-based LUTs i.e. lut.py

- compute_geocoding_correction_luts will skip the azimuth FM rate mismatch when DEM is not provided. After the discussion, its behavior was changed to return error when DEM is not provided. - If it is calculated, it will be added to the azimuth component of the return value. The azimuth FM rate mismatch will be returned separately, so that it can be written to the output separately.

vbrancat commented 1 year ago

Just a note. If I am not totally out of sync, I think we agreed to save the model-based corrections within the output CSLC HDF5 file. @LiangJYu is crafting a PR to save the bistatic delay and the Doppler within the product. Hopefully, this will be merged into mainASAP. If we are still shooting to include the correction within the product (let's discuss about it tomorrow), make sure that also the azimuth FM-rate mismatch gets saved.

seongsujeong commented 1 year ago

FYI - There will be following commits that is in line with the PR #75. The highlights of the changes are:

seongsujeong commented 1 year ago

@vbrancat

Btw, I was testing the PR and I found this issue:

(compass) [vbrancat@aurora COMPASS]$ python src/compass/s1_cslc.py /mnt/aurora-r0/vbrancat/data/S1/runconfig/runconfigs/geo_cslc_s1.yaml 
Traceback (most recent call last):
  File "/mnt/aurora-r0/vbrancat/codes/COMPASS/src/compass/s1_cslc.py", line 5, in <module>
    from compass import s1_rdr2geo, s1_geo2rdr, s1_resample, s1_geocode_slc
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/compass/s1_geocode_slc.py", line 18, in <module>
    from compass.utils.h5_helpers import (corrections_to_h5group,
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/compass/utils/h5_helpers.py", line 15, in <module>
    from compass.utils.lut import compute_geocoding_correction_luts
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/compass/utils/lut.py", line 8
    dem_path, scratch_path=None):
    ^^^^^^^^
SyntaxError: non-default argument follows default argument

not sure where it comes from

That was because the default values for dem_path were removed, but placed after range_step and rg_step, which have the default values. The issue was fixed in the following commits.