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

fix segment length rounding error #473 #475

Merged
merged 1 commit into from
Jan 5, 2021

Conversation

tmchartrand
Copy link
Collaborator

Addresses #473
In the DAT converter, segments of sweeps are constructed with length calculated by floating point division. The result can be slightly less or greater than the the actual integer value, so applying math.trunc was dropping data points in some cases. This fixes the issue by rounding instead, and raises an error if the unrounded value is not close to an integer.

@tmchartrand
Copy link
Collaborator Author

These failures seem to be related to pynwb/hdmf versions, not this PR - is that being addressed?

@wbwakeman
Copy link

Yes, a new release should be available soon
#474

@wbwakeman
Copy link

@tmchartrand The pynwb/hdmf version issue was fixed with the 1.0.1 version released on September 16th. Based on your comment, is this PR still needed?

@tmchartrand
Copy link
Collaborator Author

@wbwakeman yes, definitely still needed. That previous comment was referring to the tests that were initially showing as failing for this PR, not the underlying issue, sorry it was unclear.

@tmchartrand tmchartrand force-pushed the dat_conversion_bugfix branch from e4b4e74 to ea9950a Compare October 19, 2020 23:24
@sgratiy sgratiy changed the base branch from master to dev January 5, 2021 21:05
@sgratiy sgratiy merged commit 79bd4af into AllenInstitute:dev Jan 5, 2021
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

Successfully merging this pull request may close these issues.

3 participants