@@ -2744,14 +2744,25 @@ def _is_set(self, flag, pos):
27442744# Used to create masks that filter raw data packets by their packet ID field.
27452745# Single values indicate equality check, tuples (min, max) indicate range check.
27462746# According to NEV spec: packet IDs < 32768 identify channels, IDs >= 32768 are system events.
2747+ # Packets whose ID is not listed for a spec are not read. Known cases, ignored on purpose:
2748+ # - 0x8000 + channel (e.g. 32769): preview packets of the live protocol (cbproto's "Preview Data Packet
2749+ # Definitions"), found in 3.0 files written by Central. They carry no neural data.
2750+ # - 0xFFF9: recording events of 3.0 files written by Central (header type 0 start, 1 stop, 2 pause,
2751+ # 3 resume; Central's CNevFile30::AddRecordingEvent). Not used to split segments, which come from
2752+ # resets and gaps.
27472753NEV_PACKET_IDENTIFIERS_BY_SPEC = {
27482754 "2.1" : {
27492755 "NonNeural" : 0 ,
27502756 "Spikes" : (1 , 255 ), # Packet IDs in this range identify spike events on electrodes
27512757 },
27522758 "2.2" : {
27532759 "NonNeural" : 0 ,
2754- "Spikes" : (1 , 255 ), # Packet IDs in this range identify spike events on electrodes
2760+ # Packet IDs in this range identify spike events on electrodes. Wider than 2.1's range:
2761+ # Ripple Trellis writes 2.2 files with electrode IDs above 255 (its front-end ports are
2762+ # numbered 1-128, 129-256, 257-384...), and every spike on them was dropped without a
2763+ # warning (NeuralEnsemble/python-neo#1918). The bound is 5120 because Trellis writes
2764+ # stimulation packets on 5120 plus the electrode ID.
2765+ "Spikes" : (1 , 5120 ),
27552766 },
27562767 "2.3" : {
27572768 "NonNeural" : 0 ,
0 commit comments