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

Home » Public Forums » archive » Re: Rescaling byte (0-200) ndvi to -1 to 1 values
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: Rescaling byte (0-200) ndvi to -1 to 1 values [message #80868 is a reply to message #80863] Thu, 19 July 2012 11:41 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 07/19/12 14:18, Narnia wrote:
> I'm using the eMODIS 10-day product from the USGS with this description: "MODIS NDVI data are stretched (mapped)
> linearly (to byte values) as follows: [-1.0, 1.0] -> [0, 200] Invalid Values: 201 - 255
>
> NDVI = (value � 100) / 100; example: [ (150 � 100) / 100 = 0.5 NDVI ]"
>
> I am trying thus to scale the data in ENVI just using Band Math [expression:((b1-100)/100)] and all the values I get
> are 0 across my entire image. Any thoughts as to why?

IDL> value = 150
IDL> help, (value - 100) / 100
<Expression> LONG = 0

IDL> value = 150.0
IDL> help, (value - 100) / 100
<Expression> FLOAT = 0.500000

>
> Secondly, I need to do this for over 400 images; can someone suggest a quick script that can read and scale this data
> in IDL? I tried 'ScaledImage' but i keep getting errors as well...

I would write one myself. Mostly since the scaling is just a one-line operation. At least you know you're getting the
correct (or wrong) answer that way. :o)

cheers,

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Speeding up xy distance calculations using complex numbers
Next Topic: Re: IDL8 plot

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

Current Time: Sat Oct 11 16:15:51 PDT 2025

Total time taken to generate the page: 1.91999 seconds