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

Home » Public Forums » archive » Re: How to correct errors an IDL
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: How to correct errors an IDL [message #82375 is a reply to message #82374] Sat, 08 December 2012 05:44 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Saturday, December 8, 2012 1:12:58 PM UTC+1, Dry in water wrote:
> It seems I found out the reason why it cannot open. Null value (Nodata) of this image is -3.4028234663e+038. Pixel type is float-point, 32 bit. So the number is out of range of float-point. So how can I set null value into 0. Is there any way to do this in IDL.

I guess that you could use the where command. Something like:

LowestValue = 1.0e+030
BadPoints = where((temper gt (-1.0*LowestValue)) && (temper lt LowestValue), Count)
if count ge 0 then temper[BadPoints] = 0.0

This will set to zero all value of Temper within -1.0e+030 and +1.0e+030. You might change LowestValue accordingly to what you consider too small or to what does not give an error anymore.

Given your image size, the "where" method might be slow... I think there were quite a few posts in the past about this.

Cheers,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Some IDL8.2.1 Workbench related problems
Next Topic: meanclip

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

Current Time: Sat Oct 11 00:08:38 PDT 2025

Total time taken to generate the page: 0.79868 seconds