import dv_processing as dv
# Recreating your event store
store = dv.EventStore()
store.push_back(1698313800401700, 193, 126, True)
store.push_back(1698313800401700, 193, 127, True)
store.push_back(1698313800401706, 192, 126, True)
store.push_back(1698313800401706, 192, 127, True)
store.push_back(1698313800401717, 190, 127, True)
store.push_back(1698313800401732, 187, 123, False)
store.push_back(1698313800401732, 187, 127, False)
store.push_back(1698313800401738, 186, 126, False)
store.push_back(1698313800401738, 186, 127, False)
# Printing the events with original timestamps
for ev in store:
print(f"Original event [{ev.timestamp()}, {ev.x()}, {ev.y()}, {ev.polarity()}]")
# Printing the events with shifted timestamps
origin_of_time = store.getLowestTime()
for ev in store:
print(f"Shifted event [{ev.timestamp() - origin_of_time}, {ev.x()}, {ev.y()}, {ev.polarity()}]")
This code is inspired from our dv-processing documentation: