beacon-biosignals / EDF.jl

Read and write EDF files in Julia
MIT License
18 stars 5 forks source link

support scientific notation when attempting to write numeric values within the 8 ASCII character limit #31

Open jrevels opened 4 years ago

jrevels commented 4 years ago

see https://github.com/beacon-biosignals/EDF.jl/blob/c2f706b0854319f4d464aa4dfa4d46bfaddad3c9/src/write.jl#L9

OTDE commented 4 years ago

Doing some additional looking through the EDF+ annotations spec, it actually doesn't require an 8-character limit for annotation offset/duration floating point representations, which means we don't necessarily need to toggle between supporting and not supporting e-notation in _edf_repr, which should make solving this a tad more straightforward.

kleinschmidt commented 1 year ago

FWIW, EDFlib (the python library that PyMNE uses for EDF import/export) does not support scientific notation in the physical min/max fields, and uses integers to represent the digital minimum/maximum.

https://gitlab.com/Teuniz/EDFlib-Python/-/blob/master/src/EDFlib/edfwriter.py

It's not clear from the spec whether scientific notation is intended (it just says "8 ASCII characters" and nothing else about the format). So it's possible that other EDF readers wouldn't be able to handle exported EDFs with scientific notation in the physical min/max.