Skip to content

Commit e59abbf

Browse files
committed
Add support for single-shank Neuropixels 2.0 probes
- Update shift register bit setting for single-shank probes - Add combo box to the 2.0 GUIs allowing the user to change the probe type
1 parent 30eda75 commit e59abbf

File tree

7 files changed

+331
-37
lines changed

7 files changed

+331
-37
lines changed

OpenEphys.Onix1.Design/ChannelConfigurationDialog.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,21 @@ internal virtual bool OpenFile<T>() where T : ProbeGroup
291291
return false;
292292
}
293293

294-
if (ProbeGroup.NumberOfContacts == newConfiguration.NumberOfContacts)
294+
bool skipContactNumberMismatchCheck = false;
295+
296+
if (ProbeGroup.Probes.First().Annotations.Name != newConfiguration.Probes.First().Annotations.Name)
297+
{
298+
var result = MessageBox.Show($"There is a mismatch between the current probe name ({ProbeGroup.Probes.First().Annotations.Name})" +
299+
$" and the new probe name ({newConfiguration.Probes.First().Annotations.Name}). Continue loading?", "Probe Name Mismatch", MessageBoxButtons.YesNo);
300+
301+
if (result == DialogResult.No)
302+
return false;
303+
304+
skipContactNumberMismatchCheck = true; // NB: If the probe names do not match, skip the check to see if the number of contacts match.
305+
// Example: loading a Neuropixels single-shank 2.0 probe, but the current probe is a quad-shank 2.0 probe.
306+
}
307+
308+
if (skipContactNumberMismatchCheck || ProbeGroup.NumberOfContacts == newConfiguration.NumberOfContacts)
295309
{
296310
newConfiguration.Validate();
297311

OpenEphys.Onix1.Design/NeuropixelsV2eProbeConfigurationDialog.Designer.cs

Lines changed: 47 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)