nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Revise RecordingBackend file format

Open heplesser opened this issue 1 year ago • 2 comments

NEST allows recording of spike times (and volt-/multimeter timestamps) in a split time_step-time_offset representation, where the actual time is given by time_step * nest.resolution - time_offset. This representation avoids any round-off problems that may occur when time is stored in milliseconds.

# NEST version: 3.6.0-post0.dev0
# RecordingBackendASCII version: 2
sender	time_step	time_offset
1	99	0.092
1	217	0.083

Unfortunately, these files cannot be interpreted meaningfully, because the length of the time step is not stored in the file and thus needs to be provided separately.

We should extend the recording backend file format to include the time step duration. To avoid any risk of loss os precision, I suggest to store the internal representation of the time resolution, e.g., like this:

# NEST version: 3.6.0-post0.dev0
# RecordingBackendASCII version: 3
# tics_per_ms: 1000.0
# tics_per_step: 100
sender	time_step	time_offset
1	99	0.092
1	217	0.083

I would include these lines in all files, even when recording time in ms, since they take very little space and provide useful information.

And if we first change the recording format, should we include more metadata on NEST, such as the Git Hash and Host information?

heplesser avatar Feb 01 '24 10:02 heplesser

One question to check is why we chose to make

https://github.com/nest/nest-simulator/blob/d5aa3fe65e3d4e6eb368de561d407a572dc4e467/nestkernel/nest_time.h#L158

a double, not an integer. It has been so at least since we moved to Github.

heplesser avatar Feb 01 '24 10:02 heplesser

Issue automatically marked stale!

github-actions[bot] avatar Apr 02 '24 08:04 github-actions[bot]