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

Home » Public Forums » archive » Reading individual bits of MODIS BRDF quality files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Reading individual bits of MODIS BRDF quality files [message #68098] Fri, 18 September 2009 02:54
emitchard is currently offline  emitchard
Messages: 3
Registered: May 2008
Junior Member
I am running IDL 7.0.6 on Windows vista (with ENVI 4.6). I am using
MODIS BRDF corrected 500 m data (MCD43A4). I have sucessfully written
a program to open the HDF files and produce the output vegetation
indices I'm interested in. However, I need to filter out cloud-
contaminated pixels, and am having problem reading the bit-packed
quality control file (MCD43A2).

I have written a program to extract the layer I'm interested in from
the HDF file and save it as a 32-bit unsigned integer. However, I
really need to extract the raw values of the first 12 bits of this
number (the values of the remaining fields do not matter to me). I
started writing a program to list all the numbers (from 0-4294967295)
that result from my required bit combination of these first 12 bits,
but that approach is not going to work as there are several million
'allowable' numbers.

Is there a function in IDL that can read individual bits, or any other
clever way to produce an array of 1s and 0s from a 32-bit integer?

Many thanks for your help,

Edward Mitchard
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: rotated empirical orthogonal functions
Next Topic: Is there an automated way to estimated FWHM on 2-D image

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

Current Time: Wed Oct 08 19:43:37 PDT 2025

Total time taken to generate the page: 0.00555 seconds