Skip to content

Commit

Permalink
rename startRecording to createElectricalSeries
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Jul 26, 2024
1 parent 4f928aa commit c71ec22
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/nwb/NWBFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Status NWBFile::createFileStructure()
return Status::Success;
}

Status NWBFile::startElectricalSeriesRecording(
Status NWBFile::createElectricalSeries(
std::vector<Types::ChannelVector> recordingArrays,
const BaseDataType& dataType)
{
Expand Down
7 changes: 4 additions & 3 deletions src/nwb/NWBFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ class NWBFile
void finalize();

/**
* @brief Starts a recording.
* @brief Create ElectricalSeries objects to record data into.
* Created objects are stored in recordingContainers.
* @param dataType The data type of the elements in the data block.
* @return Status The status of the recording operation.
* @return Status The status of the object creation operation.
*/
Status startElectricalSeriesRecording(
Status createElectricalSeries(
std::vector<Types::ChannelVector> recordingArrays,
const BaseDataType& dataType = BaseDataType::I16);

Expand Down
2 changes: 1 addition & 1 deletion src/nwb/NWBRecording.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Status NWBRecording::openFile(const std::string& rootFolder,
nwbfile->initialize();

// start the new recording
return nwbfile->startElectricalSeriesRecording(recordingArrays);
return nwbfile->createElectricalSeries(recordingArrays);
}

void NWBRecording::closeFile()
Expand Down
7 changes: 3 additions & 4 deletions tests/testNWBFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ TEST_CASE("saveNWBFile", "[nwb]")
nwbfile.finalize();
}

TEST_CASE("startElectricalSeriesRecording", "[nwb]")
TEST_CASE("createElectricalSeries", "[nwb]")
{
std::string filename = getTestFilePath("startElectricalSeriesRecording.nwb");
std::string filename = getTestFilePath("createElectricalSeries.nwb");

// initialize nwbfile object and create base structure
NWB::NWBFile nwbfile(generateUuid(),
Expand All @@ -31,8 +31,7 @@ TEST_CASE("startElectricalSeriesRecording", "[nwb]")

// start recording
std::vector<Types::ChannelVector> mockArrays = getMockChannelArrays(1, 2);
Status result =
nwbfile.startElectricalSeriesRecording(mockArrays, BaseDataType::F32);
Status result = nwbfile.createElectricalSeries(mockArrays, BaseDataType::F32);

// write timeseries data
std::vector<float> mockData = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f};
Expand Down

0 comments on commit c71ec22

Please sign in to comment.