From 5975ef20103c522071ad1eca256dabf4c4275618 Mon Sep 17 00:00:00 2001 From: bparks13 Date: Mon, 28 Jul 2025 15:33:15 -0400 Subject: [PATCH 1/2] Add electrode X/Y positions to the XML file --- Source/UI/NeuropixelsV1Interface.cpp | 8 +++++++- Source/UI/NeuropixelsV2eProbeInterface.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Source/UI/NeuropixelsV1Interface.cpp b/Source/UI/NeuropixelsV1Interface.cpp index 47678e1..4caa1f8 100644 --- a/Source/UI/NeuropixelsV1Interface.cpp +++ b/Source/UI/NeuropixelsV1Interface.cpp @@ -1034,12 +1034,18 @@ void NeuropixelsV1Interface::saveParameters(XmlElement* xml) probeViewerNode->setAttribute("apFilter", filterComboBox->getText()); XmlElement* channelsNode = xmlNode->createNewChildElement("SELECTED_CHANNELS"); + XmlElement* xposNode = xmlNode->createNewChildElement("ELECTRODE_XPOS"); + XmlElement* yposNode = xmlNode->createNewChildElement("ELECTRODE_YPOS"); for (int i = 0; i < settings->selectedElectrode.size(); i++) { int globalIndex = settings->selectedElectrode[i]; + + String chId = "CH" + String(i); + channelsNode->setAttribute(chId, std::to_string(globalIndex)); - channelsNode->setAttribute("CH" + String(i), std::to_string(globalIndex)); + xposNode->setAttribute(chId, String(settings->electrodeMetadata[globalIndex].xpos)); + yposNode->setAttribute(chId, String(settings->electrodeMetadata[globalIndex].ypos)); } } diff --git a/Source/UI/NeuropixelsV2eProbeInterface.cpp b/Source/UI/NeuropixelsV2eProbeInterface.cpp index 43403fa..5ecddec 100644 --- a/Source/UI/NeuropixelsV2eProbeInterface.cpp +++ b/Source/UI/NeuropixelsV2eProbeInterface.cpp @@ -679,12 +679,18 @@ void NeuropixelsV2eProbeInterface::saveParameters(XmlElement* xml) probeViewerNode->setAttribute("referenceChannel", referenceComboBox->getText()); XmlElement* channelsNode = xmlNode->createNewChildElement("SELECTED_CHANNELS"); + XmlElement* xposNode = xmlNode->createNewChildElement("ELECTRODE_XPOS"); + XmlElement* yposNode = xmlNode->createNewChildElement("ELECTRODE_YPOS"); for (int i = 0; i < settings->selectedElectrode.size(); i++) { int globalIndex = settings->selectedElectrode[i]; - channelsNode->setAttribute(String("CH" + std::to_string(i)), std::to_string(globalIndex)); + String chId = "CH" + String(i); + channelsNode->setAttribute(chId, std::to_string(globalIndex)); + + xposNode->setAttribute(chId, String(settings->electrodeMetadata[globalIndex].xpos)); + yposNode->setAttribute(chId, String(settings->electrodeMetadata[globalIndex].ypos)); } } From d67594ec922eb0c2592f506b6e67adff6bfc26fc Mon Sep 17 00:00:00 2001 From: bparks13 Date: Mon, 28 Jul 2025 15:38:22 -0400 Subject: [PATCH 2/2] Bump version to 0.1.1 --- Source/OpenEphysLib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/OpenEphysLib.cpp b/Source/OpenEphysLib.cpp index 5694750..5dc622d 100644 --- a/Source/OpenEphysLib.cpp +++ b/Source/OpenEphysLib.cpp @@ -47,7 +47,7 @@ extern "C" EXPORT void getLibInfo(Plugin::LibraryInfo* info) info->name = "ONIX Source"; //Version of the library, used only for information - info->libVersion = "0.1.0"; + info->libVersion = "0.1.1"; info->numPlugins = NUM_PLUGINS; }