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: pixels at reference area location are masked out. #361

Open
adeane-ga opened this issue Oct 18, 2021 · 1 comment
Open

Bug: pixels at reference area location are masked out. #361

adeane-ga opened this issue Oct 18, 2021 · 1 comment
Labels

Comments

@adeane-ga
Copy link
Contributor

Problem
To place all interferograms in reference to a common area, a reference pixel is chosen so that the phase from this pixel is subtracted from the whole interferogram. A kernal is used for this, where the median phase of the kernal is used as the value to subtract from the interferogram.

  • This subtraction will rightfully make the pixels in the kernal area equal to 0 (as expected).
  • Unrelated, and during the correct step, there is a module that implements Atmospheric Phase Screen (APS) correction. The algorithm in this module relies on complete 2D data (no NaNs).
  • In the APS module NaNs are converted to 0.0 for this step.
  • But after completed, all pixels that are 0.0 are converted back to NaNs (masking).
  • Unfortunately, this includes pixels within the reference area because their value was legitimately 0.0 due to the reference phase subtraction.
  • This results in the reference area having pixels that are masked when they should not be,

Visual example:

image

This is currently only occurring with higher resolution processing. But could be occurring elsewhere.

@adeane-ga adeane-ga added the bug label Oct 18, 2021
@mcgarth
Copy link
Contributor

mcgarth commented Oct 29, 2021

This is a persistent issue, first noted by @chandra2ga in multi-looked data analysis.

The easiest fix is in the APS module - keep an array that marks the location of NaNs prior to zero conversion and then use this to re-insert the NaNs in the output after APS filtering. This should then not affect the reference pixel area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants