change linear scale to a non-linear [message #26127] |
Wed, 08 August 2001 16:19  |
ftksn1
Messages: 4 Registered: June 2001
|
Junior Member |
|
|
Hi,
I have a two dimensional data set with one dimension is time and the
other is the data samples. Each data bin corresponds to an look angle
and I am using the TV command to show the data and then use plot
command to put on the axis (time and look angle). What I would like to
do now is to change from look angle to geographic latitude. Since this
is a non-linear relation I need to scale the data set in the same way.
Is there an easy way to do so when I am using the TV command ?
Thanks,
Kim
|
|
|
Re: change linear scale to a non-linear [message #26202 is a reply to message #26127] |
Thu, 09 August 2001 13:31  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Clay Kirkendall <clay.kirkendall@nrl.navy.mil> writes:
> Kim Nielsen wrote:
>
>> Hi,
>>
>> I have a two dimensional data set with one dimension is time and the
>> other is the data samples. Each data bin corresponds to an look angle
>> and I am using the TV command to show the data and then use plot
>> command to put on the axis (time and look angle). What I would like to
>> do now is to change from look angle to geographic latitude. Since this
>> is a non-linear relation I need to scale the data set in the same way.
>> Is there an easy way to do so when I am using the TV command ?
>>
>> Thanks,
>> Kim
>
> Kim,
> I have done something similar to go from linear to log axis for an
> image. There may be a better way but this will go through the image row by
> row and interpolate the data onto a nonlinear grid. Then just use tv,
> newimage to display the image with the new (nonlinear) axis.
Or, could it be easier to relabel the axes, rather than reinterpolate
the image? I never like the idea of interpolating an image, since you
usually end up throwing away lots of information...
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: change linear scale to a non-linear [message #26207 is a reply to message #26127] |
Thu, 09 August 2001 11:49  |
Clay Kirkendall
Messages: 5 Registered: August 2001
|
Junior Member |
|
|
Kim Nielsen wrote:
> Hi,
>
> I have a two dimensional data set with one dimension is time and the
> other is the data samples. Each data bin corresponds to an look angle
> and I am using the TV command to show the data and then use plot
> command to put on the axis (time and look angle). What I would like to
> do now is to change from look angle to geographic latitude. Since this
> is a non-linear relation I need to scale the data set in the same way.
> Is there an easy way to do so when I am using the TV command ?
>
> Thanks,
> Kim
Kim,
I have done something similar to go from linear to log axis for an
image. There may be a better way but this will go through the image row by
row and interpolate the data onto a nonlinear grid. Then just use tv,
newimage to display the image with the new (nonlinear) axis.
newimage=image
for i=0, n_lines-1 do $
newimage[*, i]=interpol(image[*, i], linearaxis,
nonlinearaxis)
n_lines is the number of rows in the image, linearaxis is a vector with
the original linear axis, and nonlinearaxis is vector containing the
nonlinear axis values.
Clay
|
|
|