Skip to content

[WIP] Fix NISAR coherenceMagnitude TSsetup outputs above 1.0#512

Closed
Copilot wants to merge 1 commit into
devfrom
copilot/fix-coherence-values-bug
Closed

[WIP] Fix NISAR coherenceMagnitude TSsetup outputs above 1.0#512
Copilot wants to merge 1 commit into
devfrom
copilot/fix-coherence-values-bug

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 23, 2026

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] NISAR coherenceMagnitude TSsetup outputs have values far above 1.0</issue_title>
<issue_description>Describe the bug
Running ariaTSsetup on a set of NISAR scenes results in coherence files with values up to 80 when using the -m 'esa_world_cover_2020' mask option.

To Reproduce
Steps to reproduce the behavior:

  1. Download ariaDownload.py --mission NISAR -t 98 --bbox '27.4 28.6 84.2 85.8' -nt 4
  2. Command used: ariaTSsetup.py -f "products/*" -w outputs -l all -m 'esa_world_cover_2020' --bbox '27.4 28.6 84.2 85.8' --croptounion
  3. Error Output: no errors reported

Expected behavior
coherence values should be between 0 and 1

Screenshots
If applicable, add screenshots to help explain your problem.
view.py on one of the coherence output files before ingestion:
Image

View.py on the files after ingestion into MintPy:

Image

Desktop (please complete the following information):

  • ARIA-tools git tag: [e.g. git show --summary]
commit 6d9d76f74722c87b2252d70ae55a5e62db17e311 (HEAD -> dev, origin/dev, origin/HEAD)
Author: dbekaert <bekaertdavid@gmail.com>
Date:   Fri Mar 20 08:59:30 2026 +0100

   virtual support for NISAR, support of VSIS3 and VSICurl for both S1 and NISAR, support for download of S3 native systems.

   * add support for virtual nisar GUNW processing using VSI curl

   * Push fixes for memory leak

   * Push fixes for memory leak p2

   * Push fixes for memory leak p3

   * Remove duplicate os import

   * Push fixes for memory leak p4

   * Push fixes for memory leak p5

   * Push fixes for memory leak p6

   * Push fixes for memory leak p7

   * Push fixes for memory leak p8

   * Push fixes for memory leak p9

   * Push fixes for memory leak p10

   * add the detection support if being in S3 that virtual access is done
   with vsi3.

   * adding boto download when in S3 to speed up.

   * debug tool for establishing S3

   * updated to also check boto2 as means to determine S3

   * change the end-point for NISAR S3 credentials checking as it failed. S1
   passed but had screen output that is now being suppresed.

   * handle pool size for boto better to limit screen warnings

   * script to provide some benchmark information on the differneces between
   S3 and https

   * fix that passes S3 credential when  executing in dask mode.

   * Update README to remove cookies instructions

   No longer needed since this is automated

   * Mintpy does not support vsis3. avoiding to force a dependencies we will
   revert the vrt stack paths back to vsicurl for those that remain virtual

   ---------

   Co-authored-by: Simran S Sangha <sssangha@ucla.edu>

create mode 100644 tests/benchmark_s3_vs_https.py
create mode 100644 tests/test_aws_detection_diagnostic.py
create mode 100644 tools/ARIAtools/util/s3.py
  • OS Got same results on macOS and Linux

Additional context
Add any other context about the problem here.
</issue_description>

<agent_instructions> Can you have a look at this issues here. I would suggest you create a min working example first to test on instead of using a full nisar file. Also this can be tested on the coherence layer only. See below for suggestion on min working example:

ariaDownload.py --mission NISAR -t 98 -i 20251210_20251128 --bbox "28.5 28.6 85.6 86" -o url
Then use the PATHtoURLfile (output from ariaDownload) to feed it in ariaExtract.py for the -f option below.
ariaExtract.py -f PATHtoURLfile -l coherence --bbox "28.5 28.6 85.6 86" -m 'esa_world_cover_2020'

Coherence values are expected to range between 0-1.

  1. Perform a check if this problem already exists int eh orgiinal NISAR data
  2. asses if this is being introduced in ARIA-tools when using mask option 'esa_world_cover_2020' versus 'esa_world_cover_2021' where this issues is not present.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

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.

[BUG] NISAR coherenceMagnitude TSsetup outputs have values far above 1.0

2 participants