diff --git a/src/BaseIO.cpp b/src/BaseIO.cpp index 6e7c369b..d4971736 100644 --- a/src/BaseIO.cpp +++ b/src/BaseIO.cpp @@ -75,11 +75,10 @@ Status BaseIO::createDataAttributes(const std::string& path, return Status::Success; } -Status BaseIO::createTimestampsAttributes(const std::string& path, - const float& interval) +Status BaseIO::createTimestampsAttributes(const std::string& path) { - createAttribute( - BaseDataType::F32, &interval, path + "/timestamps", "interval"); + int interval = 1; + createAttribute(BaseDataType::I32, static_cast(&interval), path + "/timestamps", "interval"); createAttribute("seconds", path + "/timestamps", "unit"); return Status::Success; diff --git a/src/BaseIO.hpp b/src/BaseIO.hpp index 60104f01..6fa39ae5 100644 --- a/src/BaseIO.hpp +++ b/src/BaseIO.hpp @@ -291,8 +291,7 @@ class BaseIO * @param interval Value is '1' * @return The status of the operation. */ - Status createTimestampsAttributes(const std::string& path, - const float& interval); + Status createTimestampsAttributes(const std::string& path); /** * @brief Returns true if the file is open. * @return True if the file is open, false otherwise. diff --git a/src/nwb/NWBFile.cpp b/src/nwb/NWBFile.cpp index 80fdb184..5ea0f851 100644 --- a/src/nwb/NWBFile.cpp +++ b/src/nwb/NWBFile.cpp @@ -148,8 +148,7 @@ Status NWBFile::startRecording(std::vector recordingArrays) SizeArray {0}, SizeArray {CHUNK_XSIZE}, electricalSeries->getPath() + "/timestamps"); - io->createTimestampsAttributes(electricalSeries->getPath(), - 1 / channelGroup[0].getSamplingRate()); + io->createTimestampsAttributes(electricalSeries->getPath()); electricalSeries->channelConversion = createRecordingData( BaseDataType::F32,