Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _parse_header(self):
self.file = nix.File.open(self.filename, nix.FileMode.ReadOnly)
sig_channels = []
size_list = []
for bl in self.file.blocks:
for seg in bl.groups:
for da_idx, da in enumerate(seg.data_arrays):
if da.type == "neo.analogsignal":
chan_id = da_idx
ch_name = da.metadata['neo_name']
units = str(da.unit)
dtype = str(da.dtype)
sr = 1 / da.dimensions[0].sampling_interval
da_leng = da.size
if da_leng not in size_list:
size_list.append(da_leng)
group_id = 0
for sid, li_leng in enumerate(size_list):