Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

durationDataRecordsSec param should be float #4

Open
waldoc89 opened this issue Jul 31, 2022 · 1 comment
Open

durationDataRecordsSec param should be float #4

waldoc89 opened this issue Jul 31, 2022 · 1 comment

Comments

@waldoc89
Copy link

Hello,
I'm currently working with some EDF files, and noticed that the durationDataRecordsSec is showing an int of 0 instead a float of 0.1.
Is there a way to resolve this or does this require a fix within the library?

@waliddoch
Copy link
Contributor

waliddoch commented Jul 31, 2022

I have no permission to edit the library files.
#5

In file: src/EdfDecoder.js
Line: 105
Change:

    header.durationDataRecordsSec = parseInt( codecutils.CodecUtils.getString8FromBuffer( this._inputBuffer , 8, offset).trim() );

to:

    header.durationDataRecordsSec = parseFloat( codecutils.CodecUtils.getString8FromBuffer( this._inputBuffer , 8, offset).trim() );

and then re-build the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants