@@ -257,29 +257,29 @@ def _parse_header(self):
257257 else :
258258 chan_loop = range (nb_sig_chan )
259259 for chan_index in chan_loop :
260- channel_headers = slowChannelHeaders [chan_index ]
260+ slow_channel_headers = slowChannelHeaders [chan_index ]
261261
262262 # To avoid overflow errors when doing arithmetic operations on numpy scalars
263263 np_scalar_to_python_scalar = lambda x : x .item () if isinstance (x , np .generic ) else x
264- channel_headers = {key : np_scalar_to_python_scalar (channel_headers [key ]) for key in channel_headers .dtype .names }
264+ slow_channel_headers = {key : np_scalar_to_python_scalar (slow_channel_headers [key ]) for key in slow_channel_headers .dtype .names }
265265
266- name = channel_headers ["Name" ].decode ("utf8" )
267- chan_id = channel_headers ["Channel" ]
266+ name = slow_channel_headers ["Name" ].decode ("utf8" )
267+ chan_id = slow_channel_headers ["Channel" ]
268268 length = self ._data_blocks [5 ][chan_id ]["size" ].sum () // 2
269269 if length == 0 :
270270 continue # channel not added
271- source_id .append (channel_headers ["SrcId" ])
271+ source_id .append (slow_channel_headers ["SrcId" ])
272272 channel_num_samples .append (length )
273- sampling_rate = float (channel_headers ["ADFreq" ])
273+ sampling_rate = float (slow_channel_headers ["ADFreq" ])
274274 sig_dtype = "int16"
275275 units = "" # I don't know units
276276 if global_header ["Version" ] in [100 , 101 ]:
277- gain = 5000.0 / (2048 * channel_headers ["Gain" ] * 1000.0 )
277+ gain = 5000.0 / (2048 * slow_channel_headers ["Gain" ] * 1000.0 )
278278 elif global_header ["Version" ] in [102 ]:
279- gain = 5000.0 / (2048 * channel_headers ["Gain" ] * channel_headers ["PreampGain" ])
279+ gain = 5000.0 / (2048 * slow_channel_headers ["Gain" ] * slow_channel_headers ["PreampGain" ])
280280 elif global_header ["Version" ] >= 103 :
281281 gain = global_header ["SlowMaxMagnitudeMV" ] / (
282- 0.5 * (2 ** global_header ["BitsPerSpikeSample" ]) * channel_headers ["Gain" ] * channel_headers ["PreampGain" ]
282+ 0.5 * (2 ** global_header ["BitsPerSpikeSample" ]) * slow_channel_headers ["Gain" ] * slow_channel_headers ["PreampGain" ]
283283 )
284284 offset = 0.0
285285
0 commit comments