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

Home » Public Forums » archive » Help with Idl+Envi
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Help with Idl+Envi [message #71738] Fri, 16 July 2010 01:42 Go to next message
MaxA is currently offline  MaxA
Messages: 1
Registered: July 2010
Junior Member
Hi guys!

I need some help in image processing with IDL and Envi.

I have an image corresponding to the local Moran Index, computed
through envi basic tools.

Its values range from -0.000189 and 0.008413.

When I open this image in envi, it is displayed as a greyscale image
(8bit for each channel rgb).

What I'd like to do is to write an idl procedure that does the same
mapping from floating values to rgb 8 bit.

I'm a bit stucked with that and any help would be precious!

Thanks everybody!

Max
Re: help with idl [message #83182 is a reply to message #71738] Thu, 07 February 2013 10:26 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
On Thursday, February 7, 2013 9:13:36 AM UTC-5, fd_...@mail.com wrote:
> Does anyone know how to create a Toeplitz matrix in idl??
>
>
>
> Best Wishes
>
> Mar

And the Make_Array call is not needed...
Re: help with idl [message #83183 is a reply to message #71738] Thu, 07 February 2013 10:26 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
On Thursday, February 7, 2013 9:13:36 AM UTC-5, fd_...@mail.com wrote:
> Does anyone know how to create a Toeplitz matrix in idl??
>
>
>
> Best Wishes
>
> Mar

DIAG_MATRIX can build this easily.

N=8
OneLine = Indgen(N)+1
a = make_array(N,N)
FOR ii=-N+1, N-1 DO a += Diag_Matrix(Replicate(OneLine[ii],abs(N-abs(ii))),ii)

The abs() business was to allow for lower triangular portion to be filled. I usually use upper triangular matrices.

-B
Re: help with idl [message #83193 is a reply to message #71738] Thu, 07 February 2013 06:28 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Thursday, February 7, 2013 3:26:46 PM UTC+1, Helder wrote:
> On Thursday, February 7, 2013 3:13:36 PM UTC+1, fd_...@mail.com wrote:
>
>> Does anyone know how to create a Toeplitz matrix in idl??
>
>>
>
>>
>
>>
>
>> Best Wishes
>
>>
>
>> Mar
>
>
>
> Well, I'm not sure that this is what you are looking for and I don't think that this is the the "IDL" way, however it does the job:
>
>
>
> IDL> n = 5
>
> IDL> a = make_array(n,n)
>
> IDL> OneLine = findgen(2*n)
>
> IDL> FOR I=0,n-1 DO a[*,I] = (shift(OneLine,I))[0:4]
>
> IDL> print, a
>
> 0.000000 1.00000 2.00000 3.00000 4.00000
>
> 8.00000 0.000000 1.00000 2.00000 3.00000
>
> 7.00000 8.00000 0.000000 1.00000 2.00000
>
> 6.00000 7.00000 8.00000 0.000000 1.00000
>
> 5.00000 6.00000 7.00000 8.00000 0.000000
>
>
>
> Hope it helps.
>
>
>
> Cheers,
>
> h

Oh, yeah, to define the general elements you should edit the definition of OneLine. For instance you could try with:
OneLine = [0.0,1,2,3,4,8,7,6,5]

Cheers,
H
Re: help with idl [message #83194 is a reply to message #71738] Thu, 07 February 2013 06:26 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Thursday, February 7, 2013 3:13:36 PM UTC+1, fd_...@mail.com wrote:
> Does anyone know how to create a Toeplitz matrix in idl??
>
>
>
> Best Wishes
>
> Mar

Well, I'm not sure that this is what you are looking for and I don't think that this is the the "IDL" way, however it does the job:

IDL> n = 5
IDL> a = make_array(n,n)
IDL> OneLine = findgen(2*n)
IDL> FOR I=0,n-1 DO a[*,I] = (shift(OneLine,I))[0:4]
IDL> print, a
0.000000 1.00000 2.00000 3.00000 4.00000
8.00000 0.000000 1.00000 2.00000 3.00000
7.00000 8.00000 0.000000 1.00000 2.00000
6.00000 7.00000 8.00000 0.000000 1.00000
5.00000 6.00000 7.00000 8.00000 0.000000

Hope it helps.

Cheers,
h
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: New IDL 8.2.2 Workbench
Next Topic: Kronecker product reversal, or division

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

Current Time: Wed Oct 08 15:28:51 PDT 2025

Total time taken to generate the page: 0.00450 seconds