Skip to content

Instantly share code, notes, and snippets.

@rectified-evasion
rectified-evasion / edf_block_size.py
Last active October 21, 2024 09:08
Estimate .edf block size to avoid zero padded data.
# -*- coding: utf-8 -*-
"""
Created on Sun Oct 20 2024
@author: J.-B. Kordaß
Gist to estimate .edf block size to avoid non-zero padded data files (at the expense of precision/skewing and
possibly truncation)
- If you are using skjerns/save_edf.py (https://gist.github.com/skjerns/bc660ef59dca0dbd53f00ed38c42f6be),
truncate the data to the sample size n returned and use f.setDatarecordDuration(R) for R as returned.
"""