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

Home » Public Forums » archive » Re: help with reading unsigned 16-bit integers
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: help with reading unsigned 16-bit integers [message #57470 is a reply to message #57453] Sun, 09 December 2007 06:59 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
dcleon@gmail.com writes:

> Try using ISHFT to create a mask that you will use to determine (by
> using a bitwise AND) if/where given bits are set:
> Taking your example for the 2-'cloud' bit:
>> cloudmask = ISHFT(1,2)
>> cloudy = FEATURE_CLASSIFICATION_FLAGS AND cloudmask
> The resulting "CLOUDY" variable will be nonzero where the 2-'cloud'
> bit is set.
> combine with other bits as needed.

Here is an article that might give you some help with
how to use ISHFT:

http://www.dfanning.com/code_tips/convert24to8.html

This is essentially what you want to do with your
value.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to increase dpi of an IPLOT?
Next Topic: Re: Subversion in IDL Workbench

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

Current Time: Sun Oct 12 03:02:40 PDT 2025

Total time taken to generate the page: 0.48178 seconds