Skip to content

Commit 676a31d

Browse files
committed
Fix bug related to metadata writinf in spikes
1 parent 85091b4 commit 676a31d

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

Source/Plugins/BinaryWriter/BinaryRecording.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,7 @@ void BinaryRecording::writeSpike(int electrodeIndex, const SpikeEvent* spike)
578578

579579
uint16 sortedID = spike->getSortedID();
580580
rec->extraFile->writeData(&sortedID, sizeof(uint16));
581+
writeEventMetaData(spike, rec->metaDataFile);
581582

582583
increaseEventCounts(rec);
583584
}

Source/Plugins/BinaryWriter/NpyFile.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,20 @@ using namespace BinaryRecordingEngine;
2727

2828
NpyFile::NpyFile(String path, const Array<NpyType>& typeList)
2929
{
30+
3031
m_dim1 = 1;
3132
m_dim2 = 1;
33+
34+
/*If there is only one element on the list but is
35+
an array, make this a multidimensional file.
36+
*/
37+
if (typeList.size() == 1)
38+
{
39+
NpyType type = typeList[0];
40+
if (type.getType() != BaseType::CHAR) //strings work different
41+
m_dim1 = type.getTypeLength();
42+
}
43+
3244
if (!openFile(path))
3345
return;
3446
writeHeader(typeList);

0 commit comments

Comments
 (0)