code: def zero_level_calibrate(self, duration, t0=0.0):
          
          
          t1 = t0 + duration
          indices = np.flatnonzero((self.timestamps >= t0) & (self.timestamps <= t1))
          m = np.mean(self.gyro_data[:, indices], axis=1)
          self.gyro_data -= m.reshape(3,1)
          
          return self.gyro_data
docs: Performs zero-level calibration from the chosen time interval.
          
          This changes the previously lodaded data in-place.
          
          Parameters
          --------------------
          duration : float
                  Number of timeunits to use for calibration
          t0 : float 
                  Starting time for calibration
                  
          Returns
          ----------------------
          gyro_data : (3, N) float ndarray
                  The calibrated data (note that it is also changed in-place!)