Skip to content

Commit 878f3b6

Browse files
committed
Added a simple function to write cut files to fileWriters
1 parent 4eb6297 commit 878f3b6

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

fileWriters.c

+13
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,16 @@ void writeAdjSpikesObject(const char* fname, double *framepts, unsigned int nfra
8787
status = H5Gclose(as_group);
8888
status = H5Fclose(file);
8989
}
90+
91+
void writeCutFile(const char* fname, int *cids, uint64_t n)
92+
{
93+
FILE *fid;
94+
fid = fopen(fname,"w");
95+
uint64_t i;
96+
for(i=0;i<n;i++)
97+
{
98+
fprintf(fid,"%d\n",cids[i]);
99+
}
100+
fclose(fid);
101+
102+
}

fileWriters.h

+2
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
#include <stdlib.h>
1515

1616
void writeAdjSpikesObject(const char* fname, double *framepts, unsigned int nframes, double *sptrain, unsigned int nspikes, unsigned int nreps);
17+
18+
void writeCutFile(const char* fname, int *cids, uint64_t n);

0 commit comments

Comments
 (0)