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

Home » Public Forums » archive » masking float/interger arrays in 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: masking float/interger arrays in IDL [message #94428 is a reply to message #94427] Fri, 19 May 2017 02:48 Go to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
On 05/19/2017 06:39 AM, priyamalik484@gmail.com wrote:
> I want to know what is the masked value for float or integer in IDL?
>
> For eg. just to explain with very simple code:
>
> A=[-0.9,0.0,1.0,2.0,3.0,-0.7]
> B=[-0.6,2.1,2.3,3.4,0.0,4.1]
> C=[0.0,0.0,-0.7,1.7,1.2,0.0]
>
> I have three arrays with same dimension. I want to do addition of these arrays.
> However I don't want to include those indices in addition where the value is 0.0 or
> its negative.
> With "where" command I can get indices but I can not remove them, as then array will become of different dimensions, then I will not be able to do addition.
>
> Any help?? Actually this concept I will further use in Image processing!!!!
>
> PS: It is very easy in python. If you assign a value 9999 to any integer code will consider it as a masked number and will not use it in addition and array dimension will remain intact.
a*(a gt 0)+b*(b gt 0)+c*(c gt 0)
[Message index]
 
Read Message
Read Message
Previous Topic: Problem writing SCATTERPLOT() with more than 4096 points to PDF file
Next Topic: read_write Binary file. Bsq

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

Current Time: Wed Oct 08 14:53:33 PDT 2025

Total time taken to generate the page: 0.00387 seconds