code: def cmd_rot(self, deg=None, ch=None):
          
          viewer = self.get_viewer(ch)
          if viewer is None:
              self.log("No current viewer/channel.")
              return
  
          if deg is None:
              self.log("%f deg" % (viewer.get_rotation()))
  
          else:
              viewer.rotate(deg)
docs: rot deg=num_deg ch=chname
  
          Rotate the image for the given viewer/channel by the given
          number of degrees.
          If no value is given, reports the current rotation.