[Thread Prev][Thread Next][Index]

[ferret_users] fill nearest ??



Hi,

Why the filled nearest transform does not find the nearest value ?

Try:
yes? let A={4,-1E+34,6}
yes? list A,A[i=@FLN]
            X: 0.5 to 3.5
Column  1: A is {4,-1E+34,6}
Column  2: A[X=@FLN:1] is {4,-1E+34,6} (linear-filled by 1 pts on X)
            A     A
1   / 1:  4.000  4.000
2   / 2:   ....  5.000
3   / 3:  6.000  6.000

It should be 4 or 6 not 5 which is a interpolation value ?
Same thing if the variable A is set along an axis

yes? def axis/x myx1={1,2,5}
yes? let B=A[gx=myx1@asn]
yes? list B, B[x=@FNR]
            X: 0.5 to 6.5
Column  1: B is A[GX=MYX1@ASN]
Column  2: B[X=@FNR:1] is A[GX=MYX1@ASN] (nearest-filled by 1 pts on X)
            B     B
1   / 1:  4.000  4.000
2   / 2:   ....  5.000
5   / 3:  6.000  6.000

I think there is a problem and I suspect that FNR and FLN act the same way.
Can this be confirmed ?

Tested with ferret v6.61

Patrick



[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement