Ejemplo n.º 1
0
def get_sync_time(data):
    """
    Get for each record the time (in ps) since the last sync.
    """
    if len(data) == 0:
        return np.zeros((0, 3), dtype='u8')

    t0 = time.time()
    print '* get times relative to previous syncs... ',
    st = T2_tools.get_sync_time_ps(data)
    t1 = time.time() - t0 
    print 'done ({:.2f} s).'.format(t1)

    return st