Skip to content

Commit 8e633c5

Browse files
committed
rename
1 parent 165a0a4 commit 8e633c5

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

neo/rawio/neuralynxrawio/ncssections.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,9 @@ def calc_sample_time(sampFr, startTime, posn):
172172
return round(startTime + NcsSectionsFactory.get_micros_per_samp_for_freq(sampFr) * posn)
173173

174174
@staticmethod
175-
def _buildNcsGeneric(ncsMemMap, sampFreq, gapTolerance=0):
175+
def _buildNcsSections(ncsMemMap, sampFreq, gapTolerance=0):
176176
"""
177-
Build
178-
179-
This replace:
180-
_buildGivenActualFrequency
181-
_buildForMaxGap
177+
Construct NcsSections with fast mode when no gaps or parsing the file to detect gaps.
182178
"""
183179
channel_id = ncsMemMap["channel_id"][0]
184180

@@ -264,7 +260,7 @@ def build_for_ncs_file(ncsMemMap, nlxHdr, gapTolerance=None, strict_gap_mode=Tru
264260
else:
265261
gapTolerance = 0
266262

267-
ncsSects = NcsSectionsFactory._buildNcsGeneric(ncsMemMap, sampFreqUsed, gapTolerance=gapTolerance)
263+
ncsSects = NcsSectionsFactory._buildNcsSections(ncsMemMap, sampFreqUsed, gapTolerance=gapTolerance)
268264
ncsSects.sampFreqUsed = sampFreqUsed
269265
ncsSects.microsPerSampUsed = microsPerSampUsed
270266

@@ -277,7 +273,7 @@ def build_for_ncs_file(ncsMemMap, nlxHdr, gapTolerance=None, strict_gap_mode=Tru
277273
else:
278274
# quarter of paquet size is tolerate
279275
gapTolerance = round(0.25 * NcsSection._RECORD_SIZE * 1e6 / freq)
280-
ncsSects = NcsSectionsFactory._buildNcsGeneric(ncsMemMap, freq, gapTolerance=gapTolerance)
276+
ncsSects = NcsSectionsFactory._buildNcsSections(ncsMemMap, freq, gapTolerance=gapTolerance)
281277

282278

283279
# take longer data block to compute reaal sampling rate
@@ -305,7 +301,7 @@ def build_for_ncs_file(ncsMemMap, nlxHdr, gapTolerance=None, strict_gap_mode=Tru
305301
else:
306302
# quarter of paquet size is tolerate
307303
gapTolerance = round(0.25 * NcsSection._RECORD_SIZE * 1e6 / freq)
308-
ncsSects = NcsSectionsFactory._buildNcsGeneric(ncsMemMap, freq, gapTolerance=gapTolerance)
304+
ncsSects = NcsSectionsFactory._buildNcsSections(ncsMemMap, freq, gapTolerance=gapTolerance)
309305
ncsSects.sampFreqUsed = freq
310306
ncsSects.microsPerSampUsed = NcsSectionsFactory.get_micros_per_samp_for_freq(freq)
311307

0 commit comments

Comments
 (0)