def inFootprint(self, pixels, nside=None):
        """
        Open each valid filename for the set of pixels and determine the set 
        of subpixels with valid data.
        """
        if np.isscalar(pixels): pixels = np.array([pixels])
        if nside is None: nside = self.nside_likelihood

        inside = np.zeros( len(pixels), dtype='bool')
        if not self.nside_catalog:
            catalog_pix = [0]
        else:
            catalog_pix = superpixel(pixels,nside,self.nside_catalog)
            catalog_pix = np.intersect1d(catalog_pix,self.catalog_pixels)

        for filenames in self.filenames[catalog_pix]:
            # ADW: Need to replace with healpix functions...
            #logger.debug("Loading %s"%filenames['mask_1'])
            #subpix_1,val_1 = ugali.utils.skymap.readSparseHealpixMap(filenames['mask_1'],'MAGLIM',construct_map=False)
            _n,subpix_1,val_1 = read_partial_map(filenames['mask_1'],'MAGLIM',fullsky=False)
            #logger.debug("Loading %s"%filenames['mask_2'])
            #subpix_2,val_2 = ugali.utils.skymap.readSparseHealpixMap(filenames['mask_2'],'MAGLIM',construct_map=False)
            _n,subpix_2,val_2 = read_partial_map(filenames['mask_2'],'MAGLIM',fullsky=False)
            subpix = np.intersect1d(subpix_1,subpix_2)
            superpix = np.unique(superpixel(subpix,self.nside_pixel,nside))
            inside |= np.in1d(pixels, superpix)
            
        return inside