code: def scale_to(self, scale_x, scale_y, no_reset=False):
          
          try:
              self._sanity_check_scale(scale_x, scale_y)
  
          except Exception as e:
              self.logger.warning("Error in scaling: %s" % (str(e)))
              return
  
          ratio = float(scale_x) / float(scale_y)
          if ratio < 1.0:
              # Y is stretched
              scale_x_base, scale_y_base = 1.0, 1.0 / ratio
          else:
              # X may be stretched
              scale_x_base, scale_y_base = ratio, 1.0
  
          self.t_.set(scale_x_base=scale_x_base, scale_y_base=scale_y_base)
  
          self._scale_to(scale_x, scale_y, no_reset=no_reset)
docs: Scale the image in a channel.
          This only changes the viewer settings; the image is not modified
          in any way.  Also see :meth:`zoom_to`.
  
          Parameters
          ----------
          scale_x, scale_y : float
              Scaling factors for the image in the X and Y axes, respectively.
  
          no_reset : bool
              Do not reset ``autozoom`` setting.