@@ -96,10 +96,9 @@ def __init__(self, processor):
96
96
self .probe_SN = self .probe_info ['@probe_serial_number' ]
97
97
98
98
# Determine probe-model (TODO: how to determine npx 2.0 SS and MS?)
99
- if processor ['@pluginName' ] == 'Neuropix-PXI' :
100
- self .probe_model = 'neuropixels 1.0 - 3B'
101
- elif processor ['@pluginName' ] == 'Neuropix-3a' :
102
- self .probe_model = 'neuropixels 1.0 - 3A'
99
+ self .probe_model = {
100
+ "Neuropix-PXI" : "neuropixels 1.0 - 3B" ,
101
+ "Neuropix-3a" : "neuropixels 1.0 - 3A" }[processor ['@pluginName' ]]
103
102
104
103
self .ap_meta = None
105
104
self .lfp_meta = None
@@ -112,21 +111,21 @@ def __init__(self, processor):
112
111
'recording_durations' : [],
113
112
'recording_files' : []}
114
113
115
- self ._ap_data = None
114
+ self ._ap_timeseries = None
116
115
self ._ap_timestamps = None
117
- self ._lfp_data = None
116
+ self ._lfp_timeseries = None
118
117
self ._lfp_timestamps = None
119
118
120
119
@property
121
- def ap_data (self ):
120
+ def ap_timeseries (self ):
122
121
"""
123
122
AP data concatenated across recordings. Shape: (sample x channel)
124
123
Channels' gains (bit_volts) applied - unit: uV
125
124
"""
126
- if self ._ap_data is None :
127
- self ._ap_data = np .hstack ([s .signal for s in self .ap_analog_signals ]).T
128
- self ._ap_data = self . _ap_data * self .ap_meta ['channels_gains' ]
129
- return self ._ap_data
125
+ if self ._ap_timeseries is None :
126
+ self ._ap_timeseries = np .hstack ([s .signal for s in self .ap_analog_signals ]).T
127
+ self ._ap_timeseries *= self .ap_meta ['channels_gains' ]
128
+ return self ._ap_timeseries
130
129
131
130
@property
132
131
def ap_timestamps (self ):
@@ -135,15 +134,15 @@ def ap_timestamps(self):
135
134
return self ._ap_timestamps
136
135
137
136
@property
138
- def lfp_data (self ):
137
+ def lfp_timeseries (self ):
139
138
"""
140
139
LFP data concatenated across recordings. Shape: (sample x channel)
141
140
Channels' gains (bit_volts) applied - unit: uV
142
141
"""
143
- if self ._lfp_data is None :
144
- self ._lfp_data = np .hstack ([s .signal for s in self .lfp_analog_signals ]).T
145
- self ._lfp_data = self . _lfp_data * self .lfp_meta ['channels_gains' ]
146
- return self ._lfp_data
142
+ if self ._lfp_timeseries is None :
143
+ self ._lfp_timeseries = np .hstack ([s .signal for s in self .lfp_analog_signals ]).T
144
+ self ._lfp_timeseries *= self .lfp_meta ['channels_gains' ]
145
+ return self ._lfp_timeseries
147
146
148
147
@property
149
148
def lfp_timestamps (self ):
@@ -171,7 +170,7 @@ def extract_spike_waveforms(self, spikes, channel, n_wf=500, wf_win=(-32, 32)):
171
170
if len (spikes ) > 0 :
172
171
spike_indices = np .searchsorted (self .ap_timestamps , spikes , side = "left" )
173
172
# waveform at each spike: (sample x channel x spike)
174
- spike_wfs = np .dstack ([self .ap_data [int (spk + wf_win [0 ]):int (spk + wf_win [- 1 ]), channel_ind ]
173
+ spike_wfs = np .dstack ([self .ap_timeseries [int (spk + wf_win [0 ]):int (spk + wf_win [- 1 ]), channel_ind ]
175
174
for spk in spike_indices ])
176
175
return spike_wfs
177
176
else : # if no spike found, return NaN of size (sample x channel x 1)
0 commit comments