Skip to content

Commit fba6444

Browse files
sprengerJuliaSprenger
authored andcommitted
[Neuralynx] improve sampling frequency estimation
1 parent ce3d424 commit fba6444

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neo/rawio/neuralynxrawio/ncssections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def _buildForMaxGap(ncsMemMap, nomFreq):
386386
endTime = NcsSectionsFactory.calc_sample_time(nomFreq, lts, lnb)
387387
curBlock = NcsSection(0, ts0, lastBlkI, endTime, numSampsForPred)
388388
nb.sects.append(curBlock)
389-
nb.sampFreqUsed = numSampsForPred / (lts - ts0) * 1e6
389+
nb.sampFreqUsed = (numSampsForPred + lnb) / (endTime - ts0) * 1e6
390390
nb.microsPerSampUsed = NcsSectionsFactory.get_micros_per_samp_for_freq(nb.sampFreqUsed)
391391

392392
# otherwise parse records to determine blocks using default maximum gap length

0 commit comments

Comments
 (0)