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

Home » Public Forums » archive » Normalize image after running FLAASH
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: Normalize image after running FLAASH [message #89021 is a reply to message #89016] Tue, 15 July 2014 20:28 Go to previous message
pthlien is currently offline  pthlien
Messages: 1
Registered: July 2014
Junior Member
On Wednesday, July 16, 2014 12:52:55 AM UTC+12, Josh Sixsmith wrote:
> Well your example of CASE isn't a single value for comparing which CASE to evaluate. You've got an entire array ie "b3 le 0".
>
>
>
> Take a look at the example in the help file:
>
>
>
> http://www.exelisvis.com/docs/CASE.html
>
>
>
> It's a single evaluation.
>
>
>
> As for other parts of your code.
>
> You've already retrieved the "number of samples (the ns variable)" and the "number of lines" (nl) from you call to "ENVI_FILE_QUERY", so you can probably leave out the lines where you redefine them.
>
>
>
> Also, I may be wrong, but "b1*float(b1)/10000 doesn't sound like normalizing your data. A value of 9000 now becomes 8100. It sounds like you just need to apply a scale factor in which case just do "b1 / 10000.0"
>
>
>
> Back to dealing with your different cases, of "LE 0", "GE 10000" etc, just evaluate the array in a series of complement expressions that account for you different cases.
>
>
>
> result = (b1 le 0) * 0 + (b1 ge 10000) * 10000 + ((b1 gt 0) and (b1 lt 10000) * (b1 / 10000)
>
>
>
> That might get you what you're after. It'll use a lot of memory in IDL though. Seeing as you're using ENVI try the 'MATH_DOIT" rountine, and ENVI will tile your data automatically.
>
>
>
> Hope that helps
>
>
>
> Josh

Thanks Josh so much. It works after I corrected following your advice and the syntax error I got corrected by br[...]=..., not br(...)=

Lien
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Case Insensitive Hash but still preserve cases of original keys
Next Topic: the problem of symbol Function

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

Current Time: Thu Oct 09 20:55:15 PDT 2025

Total time taken to generate the page: 1.20109 seconds