code: def find_DQ_extension(self):
          
          dqfile = None
          # Look for additional file with DQ array, primarily for WFPC2 data
  
          indx = self._filename.find('.fits')
  
          if indx > 3:
              suffix = self._filename[indx-4:indx]
              dqfile = self._filename.replace(suffix[:3],'_c1')
  
          elif indx < 0 and len(self._filename) > 3 and \
               self._filename[-4] == os.extsep and \
               self._filename[-1].lower() == 'h':
  
              # assume we've got a GEIS file
              dqfile  = self._filename[:-2]+'1'+self._filename[-1]
              hdulist = readgeis.readgeis(dqfile)
              prih    = hdulist[0].header
              if 'FILETYPE' in prih:
                  dq_suffix = prih['FILETYPE'].strip().upper()
              else:
                  # assume extension name is 'SDQ' for WFPC2 GEIS files
                  dq_suffix = 'SDQ'
              hdulist.close()
              return dqfile,dq_suffix
  
          else:
              raise ValueError("Input file {} does not appear to be neither " \
                          "a FITS file nor a GEIS file.".format(self._filename))
  
          if os.path.exists(dqfile):
              dq_suffix = fits.getval(dqfile, "EXTNAME", ext=1, memmap=False)
          else:
              dq_suffix = "SCI"
  
          return dqfile, dq_suffix
docs: Return the suffix for the data quality extension and the name of
          the file which that DQ extension should be read from.