code: def video_time_to_gyro_sample(self, t):
          
          f_g = self.parameter['gyro_rate']
          d_c = self.parameter['time_offset']
          n = f_g * (t + d_c)
          n0 = int(np.floor(n))
          tau = n - n0
          return n0, tau
docs: Convert video time to gyroscope sample index and interpolation factor
  
          Parameters
          -------------------
          t : float
              Video timestamp
  
          Returns
          --------------------
          n : int
              Sample index that precedes t
          tau : float
              Interpolation factor [0.0-1.0]. If tau=0, then t falls on exactly n. If tau=1 then t falls exactly on n+1