Skip to content

Commit

Permalink
Merge pull request #1021 from samuelgarcia/winwcp_fix_rate
Browse files Browse the repository at this point in the history
Small fix for winwcp files.
  • Loading branch information
JuliaSprenger authored Jul 26, 2021
2 parents 89eaaf7 + 1e3c645 commit a807ce8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions neo/rawio/winwcprawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def _parse_header(self):

all_sampling_interval.append(analysisHeader['SamplingInterval'])

assert np.unique(all_sampling_interval).size == 1

self._sampling_rate = 1. / all_sampling_interval[0]
# sampling interval can be slightly varying due to float precision
# all_sampling_interval are not always unique
self._sampling_rate = 1. / np.median(all_sampling_interval)

signal_channels = []
for c in range(header['NC']):
Expand Down

0 comments on commit a807ce8

Please sign in to comment.