code: def getflat(self, chip):
          
          sci_chip = self._image[self.scienceExt,chip]
          exten = self.errExt+','+str(chip)
  
          # The keyword for STIS flat fields in the primary header of the flt
  
          lflatfile = fileutil.osfn(self._image["PRIMARY"].header['LFLTFILE'])
          pflatfile = fileutil.osfn(self._image["PRIMARY"].header['PFLTFILE'])
  
          # Try to open the file in the location specified by LFLTFILE.
          try:
              handle = fileutil.openImage(lflatfile, mode='readonly', memmap=False)
              hdu = fileutil.getExtn(handle,extn=exten)
              lfltdata = hdu.data
              if lfltdata.shape != self.full_shape:
                  lfltdata = expand_image(lfltdata, self.full_shape)
          except IOError:
              lfltdata = np.ones(self.full_shape, dtype=sci_chip.data.dtype)
              print("Cannot find file '{:s}'. Treating flatfield constant value "
                    "of '1'.\n".format(lflatfile))
  
          # Try to open the file in the location specified by PFLTFILE.
          try:
              handle = fileutil.openImage(pflatfile, mode='readonly', memmap=False)
              hdu = fileutil.getExtn(handle,extn=exten)
              pfltdata = hdu.data
          except IOError:
              pfltdata = np.ones(self.full_shape, dtype=sci_chip.data.dtype)
              print("Cannot find file '{:s}'. Treating flatfield constant value "
                    "of '1'.\n".format(pflatfile))
  
          flat = lfltdata * pfltdata
  
          return flat
docs: Method for retrieving a detector's flat field. For STIS there are three.
          This method will return an array the same shape as the image.