code: def update_position(self, new_position=None):
          
          if new_position is not None:
              lg.debug('Updating position to {}'.format(new_position))
              self.parent.value('window_start', new_position)
              self.idx_current.setPos(new_position, 0)
  
              current_time = (self.start_time +
                              timedelta(seconds=new_position))
              msg = 'Current time: ' + current_time.strftime('%H:%M:%S')
              msg2 = f' ({new_position} seconds from start)'
              self.parent.statusBar().showMessage(msg + msg2)
              lg.debug(msg)
          else:
              lg.debug('Updating position at {}'
                       ''.format(self.parent.value('window_start')))
  
          if self.parent.info.dataset is not None:
              self.parent.traces.read_data()
              if self.parent.traces.data is not None:
                  self.parent.traces.display()
                  self.parent.spectrum.display_window()
  
          if self.parent.notes.annot is not None:
              self.parent.notes.set_stage_index()
              self.parent.notes.set_quality_index()
  
          self.display_current()
docs: Update the cursor position and much more.
  
          Parameters
          ----------
          new_position : int or float
              new position in s, for plotting etc.
  
          Notes
          -----
          This is a central function. It updates the cursor, then updates
          the traces, the scores, and the power spectrum. In other words, this
          function is responsible for keep track of the changes every time
          the start time of the window changes.