Skip to content

Commit

Permalink
Updated TimerSeries to use mergePaths function
Browse files Browse the repository at this point in the history
  • Loading branch information
oruebel committed Sep 21, 2024
1 parent 156910c commit 962faaa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/nwb/base/TimeSeries.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "nwb/base/TimeSeries.hpp"

#include "Utils.hpp"

using namespace AQNWB::NWB;

// TimeSeries
Expand Down Expand Up @@ -38,14 +40,16 @@ void TimeSeries::initialize(const IO::BaseDataType& dataType,

// setup datasets
this->data = std::unique_ptr<IO::BaseRecordingData>(m_io->createArrayDataSet(
dataType, dsetSize, chunkSize, m_path + "/data"));
dataType, dsetSize, chunkSize, AQNWB::mergePaths(m_path, "data")));
m_io->createDataAttributes(m_path, conversion, resolution, unit);

SizeArray tsDsetSize = {
dsetSize[0]}; // timestamps match data along first dimension
this->timestamps =
std::unique_ptr<IO::BaseRecordingData>(m_io->createArrayDataSet(
this->timestampsType, tsDsetSize, chunkSize, m_path + "/timestamps"));
this->timestamps = std::unique_ptr<IO::BaseRecordingData>(
m_io->createArrayDataSet(this->timestampsType,
tsDsetSize,
chunkSize,
AQNWB::mergePaths(m_path, "timestamps")));
m_io->createTimestampsAttributes(m_path);
}

Expand Down

0 comments on commit 962faaa

Please sign in to comment.