code: def buildMask(self, chip, bits=0, write=False):
          
          sci_chip = self._image[self.scienceExt,chip]
          ### For WFPC2 Data, build mask files using:
          maskname = sci_chip.dqrootname+'_dqmask.fits'
          dqmask_name = buildmask.buildShadowMaskImage(sci_chip.dqfile,sci_chip.detnum,sci_chip.extnum,maskname,bitvalue=bits,binned=sci_chip.binned)
          sci_chip.dqmaskname = dqmask_name
          sci_chip.outputNames['dqmask'] = dqmask_name
          sci_chip.outputNames['tmpmask'] = 'wfpc2_inmask%d.fits'%(sci_chip.detnum)
          dqmask = fits.getdata(dqmask_name, ext=0, memmap=False)
          return dqmask
docs: Build masks as specified in the user parameters found in the
              configObj object.