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

Home » Public Forums » archive » Multi-band sampling strategy
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
Multi-band sampling strategy [message #72184] Tue, 17 August 2010 20:10 Go to next message
JessW is currently offline  JessW
Messages: 5
Registered: August 2010
Junior Member
Hi all,

I'm using an IDL script in ENVI to retrieve the values of a multiband
image at a user-specified number of pixels. The script works as
intended, but is quite slow; sampling an 8-band image at ~ 38,000
pixel locations takes
52.35 minutes. The issue is the following loop:

FOR i= 0L, nSamplePix - 1 DO BEGIN
pixValues[i,*] = ENVI_GET_SLICE(fid=fid,line=(index[1,i]-1),$
pos=bandsSelected,xs=(index[0,i]-1), xe=(index[0,i]-1))
ENDFOR

If anyone can suggest an alternate, faster sampling strategy--
preferably one that doesn't include the purchase of a new, faster
computer--I would be extremely grateful.

Thanks,

Jess
Re: Multi-band sampling strategy [message #72291 is a reply to message #72184] Wed, 25 August 2010 11:30 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 25, 3:13 pm, JessW <jess.wal...@gmail.com> wrote:
> Wow! I had no idea histograms could deliver that kind of efficient
> performance. It looks like I'll just have to keep the aspirin handy
> from now on.

In IDL 8, the contents of reverse_indices can be more nicely presented
in a list, where each element contains the (possibly empty) array of
indices for the corresponding bin. I made a simple wrapper to return
such a list with a new keyword (reverse_list):

http://www.ppenteado.net/idl/histogram_pp.html
http://www.ppenteado.net/idl/histogram_pp.pro
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: widget_table crash IDL8.0
Next Topic: IDLDE 8.0 Command Line Errors

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

Current Time: Wed Oct 08 17:27:43 PDT 2025

Total time taken to generate the page: 0.03860 seconds