Skip to content

Commit 3b9e290

Browse files
committed
Remove location annotations
1 parent 91d0d3a commit 3b9e290

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

neo/rawio/biocamrawio.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,22 @@ class BiocamRawIO(BaseRawIO):
3737
extensions = ['h5']
3838
rawmode = 'one-file'
3939

40-
def __init__(self, filename='', mea_pitch=42, verbose=False):
40+
def __init__(self, filename=''):
4141
BaseRawIO.__init__(self)
4242
self.filename = filename
43-
self._mea_pitch = mea_pitch
44-
self._verbose = verbose
4543

4644
def _source_name(self):
4745
return self.filename
4846

4947
def _parse_header(self):
5048
assert HAVE_H5PY, 'h5py is not installed'
51-
self._header_dict = open_biocam_file_header(self.filename, self._mea_pitch, self._verbose)
49+
self._header_dict = open_biocam_file_header(self.filename)
5250
self._num_channels = self._header_dict["num_channels"]
5351
self._num_frames = self._header_dict["num_frames"]
5452
self._sampling_rate = self._header_dict["sampling_rate"]
5553
self._filehandle = self._header_dict["file_handle"]
5654
self._read_function = self._header_dict["read_function"]
5755
self._channels = self._header_dict["channels"]
58-
channel_locations = self._header_dict["locations"]
5956
gain = self._header_dict["gain"]
6057
offset = self._header_dict["offset"]
6158

@@ -91,8 +88,6 @@ def _parse_header(self):
9188
self.header['event_channels'] = event_channels
9289

9390
self._generate_minimal_annotations()
94-
stram_ann = self.raw_annotations['blocks'][0]['segments'][0]['signals'][0]
95-
stram_ann['__array_annotations__']['locations'] = np.array(channel_locations)
9691

9792
def _segment_t_start(self, block_index, seg_index):
9893
all_starts = [[0.]]
@@ -122,7 +117,7 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop,
122117
return np.squeeze(data[:, channel_indexes])
123118

124119

125-
def open_biocam_file_header(filename, mea_pitch, verbose=False):
120+
def open_biocam_file_header(filename):
126121
"""Open a Biocam hdf5 file, read and return the recording info, pick te correct method to access raw data,
127122
and return this to the caller."""
128123
assert HAVE_H5PY, 'h5py is not installed'
@@ -148,11 +143,8 @@ def open_biocam_file_header(filename, mea_pitch, verbose=False):
148143
else:
149144
raise Exception('Unknown data file format.')
150145

151-
# get channel locations
146+
# # get channels
152147
channels = rf['3BRecInfo/3BMeaStreams/Raw/Chs'][:]
153-
rows = channels['Row'] - 1
154-
cols = channels['Col'] - 1
155-
locations = np.vstack((rows, cols)).T * mea_pitch
156148

157149
# determine correct function to read data
158150
if format_100:
@@ -174,7 +166,7 @@ def open_biocam_file_header(filename, mea_pitch, verbose=False):
174166
offset = min_uv
175167

176168
return dict(file_handle=rf, num_frames=n_frames, sampling_rate=sampling_rate, num_channels=n_channels,
177-
channels=channels, file_format=file_format, signal_inv=signal_inv, locations=locations,
169+
channels=channels, file_format=file_format, signal_inv=signal_inv,
178170
read_function=read_function, gain=gain, offset=offset)
179171

180172

0 commit comments

Comments
 (0)