[Thread Prev][Thread Next][Index]

Re: [ferret_users] Fill nearest



Hi Patrick,
I think you're right. The documentation says that "In the case of points being equally spaced around the missing point, the mean value is used." and it appears that the mean is used even for irregularly-spaced axes. This should be easy to fix.

Ansley

On 8/4/2010 8:25 AM, Brockmann Patrick wrote:

Hi all,

I come back on this question because I have received no explanation
to this simple example trying to explain a FNR transform.

yes? let A={4,-1E+34,6}
yes? def axis/x myx1={1,2,5}
yes? let B=A[gx=myx1@asn]
yes? let C=B[x=@FNR]
yes? list B, C
            X: 0.5 to 6.5
Column  1: B is A[GX=MYX1@ASN]
Column  2: C is B[X=@FNR]
            B     C
1   / 1:  4.000  4.000
2   / 2:   ....  5.000
5   / 3:  6.000  6.000

In my understanding, C should be 4,6,6 instead of 4,5,6.
--> Ouops. Read
In my understanding, C should be 4,4,6 instead of 4,5,6.
because point 2 is closer to point 1 than to point 3.

I think this is a bug and I suspect that FNR and FLN act the same way.
Can this be confirmed ?
It would also be logic that FNR always gives a nearest value,
even when points are equally spaced around the missing point.

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