Transform axis problem
Igor_user
I have a bottom axis and I wish to create a mirror axis at the top which is related to the tick values x of the bottom axis by a natural log ln(x).
Here is my code in the procedure file:
Function TransAx_naturallog(w, x)
Wave/Z w
Variable x
return ln(x)
end
But when I apply the New Transform Axis, it shows this message (see attached). Can somebody tell me what it means and what should the coefficient wave in the " New Transform Axis" box should be?
The axis should only span positive values as the ln is not defined in [-inf,0]. Could this be your problem?
A
October 7, 2010 at 01:26 pm - Permalink
The ranges of my both axes have min > 0. So there is no negative value. Sometimes I really find Igor doesn't explain the problem very clear.
October 7, 2010 at 02:01 pm - Permalink
That's correct- it indicates that the transformation is not defined over the entire range. Change your function to this:
Wave/Z w
Variable x
if (x > 0)
return ln(x)
else
return NaN
endif
end
And make sure your bottom axis doesn't include any X value less than or equal to zero. Actually, I think TransformAxis might be smart enough to simply ignore the range where the transform returns NaN, but I'm not sure.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 7, 2010 at 02:03 pm - Permalink
No, the same message still shows up. What is that coefficient wave in the " New Transform Axis" box should be?
October 7, 2010 at 02:31 pm - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 8, 2010 at 03:26 pm - Permalink