Re: Derivative along one dimension of a data cube? [message #55074] |
Sun, 29 July 2007 12:29 |
yoyoteng
Messages: 3 Registered: July 2007
|
Junior Member |
|
|
On Jul 28, 11:30 am, Ryan <RyanA1...@gmail.com> wrote:
> Hi folks,
> I am working with some hyperspectral images and would like to take the
> derivative of all the spectra in the cube. Is there a faster way to do
> this than looping through the x,y dimensions and calling deriv on
> every individual wavelength dimension?
>
> Thanks!
> Ryan
there was an article about that a while ago
http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thread/a7a6f803034f08af/df26a1f9c46df9d6?lnk=gst&q =hessian&rnum=1#df26a1f9c46df9d6
since you have a cube, try using
cube=your_data
deriv_kernel=[-1, 0, 1] & size=3
x_deriv_kernel = REFORM(deriv_kernel,size,1,1)
Lx=CONVOL(cube, x_deriv_kernel)
:) hope this was what you wanted.
|
|
|