        target = open("/data2/lbd/kitti/train/" + str(i).zfill(4) + "_td.dat", "wb")
    with h5py.File(file,'r') as f:
        events = f["events"]
        events = rfn.unstructured_to_structured(events, dtype = dtype([('t', '<u8'), ('x', '<f4'), ('y', '<f4'), ('p', '<i4')]))
        dat_events_tools.write_event_buffer(target, events)