Back to the main page.

Bug 1266 - GDF files are written in blocks of 1 gig (biosemi2ft buffer), but not concatinated when read

Status CLOSED FIXED
Reported 2012-01-18 10:50:00 +0100
Modified 2012-04-11 16:48:31 +0200
Product: FieldTrip
Component: fileio
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 major
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on: 1366
Blocks:
See also:

Stephen Whitmarsh - 2012-01-18 10:50:14 +0100

Similarly as our CTF data, GDF data is stored in blocks (of 1 gig). To read the data, apparantly the FT implementation does not contain the intelligence yet to concatinate the data chunks. Concatinating after ft_preprocessing would miss intermediate trials as it is unknown how the samples continue between files. Anyone have any idea?


Stephen Whitmarsh - 2012-03-06 16:42:55 +0100

BUMB!


Robert Oostenveld - 2012-03-10 09:01:53 +0100

there are two pieces in the buffer/cpp ODM code where new files are created with a number "GDF_BackgroundWriter.h" line 119 of 221 char suffix[12]; snprintf(suffix,12,"_%i.gdf", fileCounter); filename.append(suffix); and in "OnlineDataManager.h" line 459 of 764 if (fileCounter == 0) { curWriter->start(curFilename.c_str()); } else { char *compName = new char[curFilename.size() + 20]; sprintf(compName, "%s_S%i", curFilename.c_str(), fileCounter); The first seems to be related to the file size, i.e. the automatic splitting of a continuous recording over 1GB files. The second relates to the user stopping and starting saving multiple times, i.e. resulting in files that do not represent a continuous recording. So there are test.gdf test_1.gdf test_2.gdf ... and test.gdf test_S1.gdf test_S2.gdf where only the first should be auto-appended in ft_read_xxx


Robert Oostenveld - 2012-03-10 16:13:11 +0100

I made the required changes to the code, which was more work than expected :-( While making the changes, I also came across the solution for bug #1281. mbp> svn commit `cat out` Sending fileio/ft_read_data.m Sending fileio/ft_read_event.m Sending fileio/ft_read_header.m Sending fileio/private/read_biosig_data.m Sending fileio/private/read_biosig_header.m Sending fileio/private/read_combined_ds.m Adding test/test_bug1266.m Transmitting file data ....... Committed revision 5429.


Robert Oostenveld - 2012-04-11 16:48:31 +0200

I cleaned up my bugzilla list by changing the status from resolved (either fixed or wontfix) into closed. If you don't agree, please reopen the bug. Robert