diff --git a/src/nwb/ecephys/ElectricalSeries.cpp b/src/nwb/ecephys/ElectricalSeries.cpp index d406711..09adf1c 100644 --- a/src/nwb/ecephys/ElectricalSeries.cpp +++ b/src/nwb/ecephys/ElectricalSeries.cpp @@ -46,7 +46,7 @@ void ElectricalSeries::initialize(const IO::BaseDataType& dataType, electrodeInds[i] = channelVector[i].getGlobalIndex(); channelConversions[i] = channelVector[i].getConversion(); } - samplesRecorded = SizeArray(channelVector.size(), 0); + m_samplesRecorded = SizeArray(channelVector.size(), 0); // make channel conversion dataset channelConversion = std::unique_ptr( @@ -94,11 +94,11 @@ Status ElectricalSeries::writeChannel(SizeType channelInd, // get offsets and datashape std::vector dataShape = { numSamples, 1}; // Note: schema has 1D and 3D but planning to deprecate - std::vector positionOffset = {samplesRecorded[channelInd], + std::vector positionOffset = {m_samplesRecorded[channelInd], channelInd}; // track samples recorded per channel - samplesRecorded[channelInd] += numSamples; + m_samplesRecorded[channelInd] += numSamples; // write channel data if (channelInd == 0) { diff --git a/src/nwb/ecephys/ElectricalSeries.hpp b/src/nwb/ecephys/ElectricalSeries.hpp index e4bf60b..9e32ef1 100644 --- a/src/nwb/ecephys/ElectricalSeries.hpp +++ b/src/nwb/ecephys/ElectricalSeries.hpp @@ -90,6 +90,6 @@ class ElectricalSeries : public TimeSeries /** * @brief The number of samples already written per channel. */ - SizeArray samplesRecorded; + SizeArray m_samplesRecorded; }; } // namespace AQNWB::NWB