Pull requests

#3 Merged
Repository
alockett/python-edf2 alockett
Branch
default
Repository
cleemesser/python-edf python-edf
Branch
default

Added properties to Edfreader for all EDF+ metadata, switch digital sample to 32 bit

Author
  1. Alan Lockett
Reviewers
Description

I added properties to expose all metadata in the EDF+ file through Edfreader.

I added a function to Edfreader to allow reading of the digital samples.

Also, I corrected a problem with the function to write digital samples. The samples were passed as numpy.int16_t, and the contents were cast to a 32 bit integer as <int*> buf.data. This cause a bug in which the recast array was half the desired length, and uniformly contained samples that exceed the digital maximum/minimum. By changing the signature to numpy.int32_t, the cast to int* is made valid.

It would be preferable if the digital samples were all 16 bit, since that is what the EDF+ spec has, but edflib has already made that decision for us, and it works with 32 bit integers.

Comments (0)