[Numpy-discussion] Extract groups of/individual bit values from UInt16 array

Philip Austin paustin@eos.ubc...
Tue Oct 12 23:53:26 CDT 2010

On 10/12/2010 9:14 PM, Pinner, Luke wrote:

> I'm working with some MODIS satellite imagery. MODIS data includes a
> quality flag mask. For the particular dataset I'm working with, this is
> a two dimensional unsigned 16 bit integer array. The quality flags are
> stored as one or more bits in each integer value:

I've written a cython wrapper around some C++ functions that use
the the std::bitset datatype to read bits in the MODIS cloud
mask (the MYD035/MOD035 files).  Email me if you'd like
a copy with a simple demo, it wouldn't be hard to adapt
to the quality flag mask -- regards, Phil Austin

More information about the NumPy-Discussion mailing list