comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Calculate gradient
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Calculate gradient [message #70085 is a reply to message #70084] Fri, 12 March 2010 14:37 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
Hi,

the simpler solution would be to use the "shift" function
to calculate the dx and dy component of the gradient (whose
norm is sqrt(dx^2+dy^2) - similarly to the one-dimensional
case when you can compute the numerical derivative of x
as (x-shift(x,-1))/dx.

However you should be careful doing that with non-smooth
datasets.

Ciao,
Paolo



On Mar 12, 4:41 pm, mslarkin <enhlw...@gmail.com> wrote:
> Hi IDL experts,
> I have a 2-D array (2708x4060), containing reflectance data. Is it
> possible to calculate the reflectance gradient (i.e. the rate of
> reflectance change over distance or array grid) throughout the array,
> and then draw lines of equal gradient (note that they’re NOT contour
> lines)?
> Thank you very much for your help!
> IDL beginner
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Proper Map Label Clipping
Next Topic: rejecting a few pixel values from an array of pixel values

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:00:16 PDT 2025

Total time taken to generate the page: 0.00422 seconds