Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions neo/rawio/neuralynxrawio/ncssections.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ def _buildNcsSections(ncsMemMap, sampFreq, gapTolerance=0):
all_gap_inds = np.flatnonzero(np.abs(delta - delta_prediction) > strict_tolerance)
gap_sizes_us = (delta - delta_prediction)[all_gap_inds]
ncsSects.detected_gaps = [
(int(record_index + 1), int(gap_size))
for record_index, gap_size in zip(all_gap_inds, gap_sizes_us)
(int(record_index + 1), int(gap_size)) for record_index, gap_size in zip(all_gap_inds, gap_sizes_us)
]

# Use user-provided tolerance for actual segmentation
Expand Down
7 changes: 2 additions & 5 deletions neo/rawio/neuralynxrawio/neuralynxrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,7 @@ def _format_gap_report(self, detected_gaps, sampling_frequency, filename):
"""
gap_durations_ms = [abs(gap_size) / 1000.0 for _, gap_size in detected_gaps]
gap_positions_seconds = [
record_index * NcsSection._RECORD_SIZE / sampling_frequency
for record_index, _ in detected_gaps
record_index * NcsSection._RECORD_SIZE / sampling_frequency for record_index, _ in detected_gaps
]

gap_detail_lines = [
Expand Down Expand Up @@ -1033,9 +1032,7 @@ def scan_stream_ncs_files(self, ncs_filenames):

verify_sec_struct = NcsSectionsFactory._verifySectionsStructure
if not chanSectMap or (not verify_sec_struct(data, chan_ncs_sections)):
chan_ncs_sections = NcsSectionsFactory.build_for_ncs_file(
data, nlxHeader, **factory_kwargs
)
chan_ncs_sections = NcsSectionsFactory.build_for_ncs_file(data, nlxHeader, **factory_kwargs)

# Check for gaps and handle according to gap_tolerance_ms
if not self._use_legacy_gap_mode and chan_ncs_sections.detected_gaps:
Expand Down