From 435866c45cff11520092cecae46f1d26d5a77ec5 Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Sat, 21 Sep 2024 15:05:11 -0700 Subject: [PATCH] Fix #109 Add missing axis attribute for channel_conversion and remove extra attributes --- src/nwb/ecephys/ElectricalSeries.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/nwb/ecephys/ElectricalSeries.cpp b/src/nwb/ecephys/ElectricalSeries.cpp index ba7c62a..d406711 100644 --- a/src/nwb/ecephys/ElectricalSeries.cpp +++ b/src/nwb/ecephys/ElectricalSeries.cpp @@ -58,12 +58,13 @@ void ElectricalSeries::initialize(const IO::BaseDataType& dataType, std::vector(1, channelVector.size()), IO::BaseDataType::F32, &channelConversions[0]); - - m_io->createCommonNWBAttributes( - this->getPath() + "/channel_conversion", - "hdmf-common", // TODO shouldn't this be core? - "", - "Bit volts values for all channels"); + // add axis attribute for channel conversion + const signed int axis_value = 1; + m_io->createAttribute(IO::BaseDataType::I32, + &axis_value, + this->getPath() + "/channel_conversion", + "axis", + 1); // make electrodes dataset electrodesDataset = std::unique_ptr(