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 #89016 is a reply to message #88999] Tue, 15 July 2014 05:52 Go to previous messageGo to previous message
Josh Sixsmith is currently offline  Josh Sixsmith
Messages: 13
Registered: December 2012
Junior Member
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
[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: Fri Oct 10 15:29:34 PDT 2025

Total time taken to generate the page: 0.79747 seconds