Skip to content
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

[Bug]: Azimuth FM rate mismatch fails for historical S1A data #112

Closed
vbrancat opened this issue Apr 19, 2023 · 2 comments
Closed

[Bug]: Azimuth FM rate mismatch fails for historical S1A data #112

vbrancat opened this issue Apr 19, 2023 · 2 comments
Assignees
Labels
bug Something isn't working needs triage Issue requires triage to proceed

Comments

@vbrancat
Copy link
Contributor

vbrancat commented Apr 19, 2023

Checked for duplicates

Yes - I've already checked

Describe the bug

The azimuth FM-rate mismatch correction fails for some historical S1A data (2015-2017). The failure seems to be happening during the computation of the DC coefficients with the following error:

Traceback (most recent call last):
  File "/mnt/aurora-r0/vbrancat/codes/COMPASS/src/compass/s1_cslc.py", line 56, in <module>
    main()
  File "/mnt/aurora-r0/vbrancat/codes/COMPASS/src/compass/s1_cslc.py", line 51, in main
    run(parser.run_config_path, parser.args.grid_type)
  File "/mnt/aurora-r0/vbrancat/codes/COMPASS/src/compass/s1_cslc.py", line 43, in run
    s1_geocode_slc.run(cfg)
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/compass/s1_geocode_slc.py", line 77, in run
    cumulative_correction_luts(burst, dem_path=cfg.dem,
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/compass/utils/lut.py", line 65, in cumulative_correction_luts
    compute_geocoding_correction_luts(burst,
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/compass/utils/lut.py", line 214, in compute_geocoding_correction_luts
    az_fm_mismatch = burst.az_fm_rate_mismatch_from_llh(lat, lon, height,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/s1reader/s1_burst_slc.py", line 936, in az_fm_rate_mismatch_from_llh
    dc_coeffs = interp_coeffs(fm_rate_aztime_sec_vec,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/s1reader/s1_burst_slc.py", line 929, in interp_coeffs
    coeff_interpolator = InterpolatedUnivariateSpline(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/scipy/interpolate/_fitpack2.py", line 716, in __init__
    x, y, w, bbox, self.ext = self.validate_input(x, y, w, bbox, k, None,
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/aurora-r0/vbrancat/codes/miniconda3/envs/compass/lib/python3.11/site-packages/scipy/interpolate/_fitpack2.py", line 247, in validate_input
    raise ValueError("x and y should have a same length")
ValueError: x and y should have a same length

For some bursts, the variable fm_rate_aztime_sec_vec has a length of 4 while the variable self.extended_coeffs.dc_coeff_arr has a length of 3. I suspect that there is an inconsistency in the burst metadata for historical data. Strangely enough, the error seems to occur for all the bursts in subswath 1 and 3 while I am able to process all the bursts in subswath 2.

What did you expect?

I expected [...]

Reproducible steps

This bug can be replicated by running the following bash file on aurora

/mnt/aurora-r0/vbrancat/data/S1/stack_processor/Rosamond/Ascending/no_iono/2015/run_files/run_20150207_t064_135520_iw1.sh

Environment

No response

@vbrancat vbrancat added bug Something isn't working needs triage Issue requires triage to proceed labels Apr 19, 2023
@seongsujeong
Copy link
Contributor

@vbrancat Thanks for reporting the issue. I have seen some format changes for azimuth FM rate in annotation file, which was take care of #59, but I might also need to take a look if DC polynomials has some changes as well.

Would it easy for you to pinpoint the SAFE file that the azimuth FM rate mismatch mitigation did not work?

@seongsujeong
Copy link
Contributor

Closing this issue as it was addressed in #113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Issue requires triage to proceed
Projects
None yet
Development

No branches or pull requests

2 participants