code: def cmd_scale(self, x=None, y=None, ch=None):
          
          viewer = self.get_viewer(ch)
          if viewer is None:
              self.log("No current viewer/channel.")
              return
  
          scale_x, scale_y = viewer.get_scale_xy()
  
          if x is None and y is None:
              self.log("x=%f y=%f" % (scale_x, scale_y))
  
          else:
              if x is not None:
                  if y is None:
                      y = x
              if y is not None:
                  if x is None:
                      x = y
              viewer.scale_to(x, y)
docs: scale x=scale_x y=scale_y ch=chname
  
          Scale the image for the given viewer/channel by the given amounts.
          If only one scale value is given, the other is assumed to be the
          same.  If no value is given, reports the current scale.