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

Home » Public Forums » archive » Re: Problem with variables in memory
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: Problem with variables in memory [message #79975 is a reply to message #79974] Fri, 20 April 2012 11:58 Go to previous messageGo to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
On Friday, April 20, 2012 2:02:14 PM UTC-4, Esquerdo wrote:
> I have a problem with variables in memory (I guess)... sorry, it's a
> beginner question.
>
> I'm using the "envi_get_slice" to extract slice profiles from a
> hyperspectral image with 270 bands.
>
> For exemple, in order to get the spectral slice of the 10th line and
> the 5th column I use:
>
> spectral_profile = envi_get_slice(fid=fid, pos=indgen(273), line=10,
> xe=5, xs=5)
>
> Although it takes some time (there are 270 bands!), it works fine.
> However, if I run again the code without changing the x and y (line
> and column) the extraction is very very quick!
>
> I tried to use ".reset_session" before running the second time, but it
> doesn't work. As I am studying the speed of this extraction process I
> need to measure the real time.
>
> Does anyone has any tips to reset variables without leaving IDL?
>
> Thanks

ENVI_GET_DATA versus ENVI_GET_SLICE is an issue I've run into often. My unsupported theory is that it has to do with the interleave of the image. For my applications I work with BIP and ENVI_GET_SLICE is faster. Now, why does ENVI work faster the second time around given the same x and y? Most likely ENVI has filled a buffer with the data already. ENVI has quite a few optimizations under the hood to speed up processing. If it didn't, no one would use their API.

Other than this being a funky behavior, why should this be a problem?
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Problem with variables in memory
Next Topic: Re: cgContour / P.Multi / PDF

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

Current Time: Thu Oct 09 21:40:23 PDT 2025

Total time taken to generate the page: 0.00551 seconds