code: def display(self, frame, width, height, reverse=False):
          
  
          fb = self.get_frame(frame)
          self.current_frame = frame
  
          if reverse:
              fb.buffer.reverse()
  
          # frames are indexed from 1 in IRAF
          chname = fb.chname
          if chname is None:
              chname = 'Frame%d' % (frame + 1)
              fb.chname = chname
  
          self.logger.debug("display to %s" % (chname))
  
          try:
              data = fb.buffer
              byteswap = False  # noqa
              dims = (fb.height, fb.width)
              dtype = np.uint8
              metadata = {}
  
              image = IRAF_AstroImage(logger=self.logger)
              #image.load_buffer(fb.buffer, dims, dtype, byteswap=byteswap,
              #                  metadata=metadata)
              data = np.fromstring(fb.buffer, dtype=dtype)
              data = data.reshape(dims)
              # Image comes in from IRAF flipped for screen display
              data = np.flipud(data)
              image.set_data(data, metadata=metadata)
              # Save coordinate transform info
              image.set(ct=fb.ct)
  
              # make up a name (is there a protocol slot for the name?)
              fitsname = str(time.time())
  
              # extract path from ref
              oldref = fb.ct.ref
              items = oldref.split('!')
              host = items[0]
              path = '!'.join(items[1:])
  
              image.set(name=fitsname, path=path, host=host)
              #image.update_keywords(header)
  
          except Exception as e:
              # Some kind of error unpacking the data
              errmsg = "Error creating image data for '%s': %s" % (
                  chname, str(e))
              self.logger.error(errmsg)
              raise GingaPlugin.PluginError(errmsg)
  
          # Do the GUI bits as the GUI thread
          self.fv.gui_do(self._gui_display_image, fitsname, image, chname)
docs: NOTE: this is called from the IISRequestHandler