kite icon indicating copy to clipboard operation
kite copied to clipboard

Quadnode phi is Nan

Open hvasbath opened this issue 5 years ago • 4 comments

Despite the num.nanmedian function phi maybe nan if all the pixels in the quad are nan. Why the quad does exists then is still unclear as it should have been removed if the nanallowed threshold is crossed.

hvasbath avatar Jul 15 '20 14:07 hvasbath

Must be a problem in stamps2kite, phi/theta values at the left image end are not always valid although there is s valid displacement. I guess somewhere in the interpolate_look_angles

hvasbath avatar Jul 15 '20 14:07 hvasbath

Yes the LinearNDInterpolator returns Nans for values outside of the interpolation range- at the border of the gridded angles this is the case ...Consequently there are sometimes Nans in the phis and thetas although there are displacement values vor the respective pixels. How to fix ...?

hvasbath avatar Jul 15 '20 17:07 hvasbath

Added warning for number of pixels that have no look angle info here: https://github.com/pyrocko/kite/commit/f3e68d1d0ff3cd37d8fbbfb746f1ea7fbf271caa

Tested that on two different scenes, one has 1236 pixels without that info, the other 0 ...

hvasbath avatar Jul 15 '20 21:07 hvasbath

Fixed here: https://github.com/pyrocko/kite/pull/61 indexing Bug

hvasbath avatar Jul 16 '20 10:07 hvasbath