Support Board
Date/Time: Fri, 14 Mar 2025 11:14:29 +0000
Post From: Intraday SCID Data: handling out-of-order timestamps
[2022-06-03 18:25:45] |
homestar - Posts: 21 |
Inspecting .scid files, I sometimes see out-of-order timestamps. Here is an example that came up when inspecting ESU21.scid: ... (3834901046258000, -1.999001e37, 4283.75, 4283.5, 4283.75, 1, 1, 0, 1), (3834901046258001, -1.999002e37, 4283.75, 4283.5, 4283.75, 1, 3, 0, 3), (3834299750838560, 0.000000e00, 4284.0, 4283.75, 4283.75, 1, 1, 1, 0), (3834901046263000, -1.999001e37, 4283.75, 4283.5, 4283.5, 1, 1, 1, 0), (3834901046263001, 0.000000e00, 4283.75, 4283.5, 4283.5, 1, 1, 1, 0), ... Here's another example: ... (3834901040302008, 0.000000e00, 4285.75, 4285.5, 4285.75, 1, 1, 0, 1), (3834901040302009, 0.000000e00, 4285.75, 4285.5, 4285.75, 1, 1, 0, 1), (3834226730436538, -1.999002e37, 4285.75, 4285.5, 4285.75, 1, 1, 0, 1), (3834901040365000, -1.999001e37, 4286.0, 4285.75, 4286.0, 1, 116, 0, 2), (3834901040365001, -1.999002e37, 4286.0, 4285.75, 4286.0, 1, 2, 0, 2), ... How should I handle out-of-order timestamps programmatically? Here are a few options I've considered: - Use a stable sort to sort all the records by timestamp. - Drop the records that appear to be out-of-order. - Change the timestamp of the out-of-order record so it equals the timestamp of the previous record. What would you recommend? Thanks. |