code: def cmd_zf(self, ch=None):
          
          viewer = self.get_viewer(ch)
          if viewer is None:
              self.log("No current viewer/channel.")
              return
  
          viewer.zoom_fit()
          cur_lvl = viewer.get_zoom()
          self.log("zoom=%f" % (cur_lvl))
docs: zf ch=chname
  
          Zoom the image for the given viewer/channel to fit the window.