From a50e4f186be11018eb460f892fd81021271f9ccd Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Sat, 21 Sep 2024 15:08:39 -0700 Subject: [PATCH] Fix #109 Add missing axis attribute for ElectricalSeries.channel_conversion --- src/nwb/ecephys/ElectricalSeries.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/nwb/ecephys/ElectricalSeries.cpp b/src/nwb/ecephys/ElectricalSeries.cpp index 7be87da..80a6ee8 100644 --- a/src/nwb/ecephys/ElectricalSeries.cpp +++ b/src/nwb/ecephys/ElectricalSeries.cpp @@ -60,10 +60,13 @@ void ElectricalSeries::initialize() std::vector(1, channelVector.size()), BaseDataType::F32, &channelConversions[0]); - m_io->createCommonNWBAttributes(getPath() + "/channel_conversion", - "hdmf-common", - "", - "Bit volts values for all channels"); + // add axis attribute for channel conversion + const signed int axis_value = 1; + m_io->createAttribute(BaseDataType::I32, + &axis_value, + this->getPath() + "/channel_conversion", + "axis", + 1); // make electrodes dataset electrodesDataset = std::unique_ptr(