Skip to content

Commit 50f9b8c

Browse files
samuelbray32rly
andauthored
Apply suggestions from code review
Co-authored-by: Ryan Ly <[email protected]>
1 parent 000f3ff commit 50f9b8c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/trodes_to_nwb/spike_gadgets_raw_io.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def _produce_ephys_channel_ids(
139139
# case where all channels are recorded, no censoring required
140140
return channel_names
141141

142-
if hw_channels_recorded is None:
142+
if not hw_channels_recorded or len(hw_channels_recorded) != n_channels_recorded:
143143
raise ValueError(
144144
"If n_total_channels != n_channels_recorded, "
145145
"hw_channels_recorded must be provided to censor the returned list."
@@ -191,9 +191,7 @@ def _parse_header(self):
191191
num_chip_channels = int(
192192
hconf.attrib["numChannels"]
193193
) # number of channels the hardware supports
194-
num_ephy_channels = int(
195-
hconf.attrib["numChannels"]
196-
) # number of channels recorder
194+
num_ephy_channels = num_chip_channels # number of channels recorded
197195
# check for agreement with number of channels in xml
198196
sconf_channels = np.sum([len(x) for x in sconf])
199197
if sconf_channels < num_ephy_channels:

0 commit comments

Comments
 (0)