Back to the main page.
Bug 1366 - add a small version of biosig file reading functions to fieldtrip/external
Status | CLOSED FIXED |
Reported | 2012-03-10 13:10:00 +0100 |
Modified | 2012-04-11 16:48:29 +0200 |
Product: | FieldTrip |
Component: | external |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P3 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | 1266 |
See also: |
Robert Oostenveld - 2012-03-10 13:10:24 +0100
Since some of the fieldtrip/realtime applications write data to gdf, it also makes sense to have gdf readers included in fieldtrip. The ft_read_xxx functions use biosig for this, so biosig should be added to fieldtrip/external.
Robert Oostenveld - 2012-03-10 13:19:12 +0100
I downloaded version 2.61 from sf.net and made a selection from t200_FileAccess. Except for sopen, sread and sclose, all files go into fieldtrip/external/biosig/private. All private functions that are not being called by other functions should be removed, this includes the mexSSAVE mex files.
Robert Oostenveld - 2012-03-10 14:18:07 +0100
To determine the functions in T200 that are not really needed, I used following script restoredefaultpath inlist = { 'sopen' 'sread' 'sclose' }; prev_outlist = {}; outlist = {}; loop = 1; while (true) fprintf('loop=%d\n', loop); [outlist, depmat] = mydepfun(inlist); if isequal(outlist, prev_outlist) break; end prev_outlist = outlist; inlist = outlist; loop = loop + 1; end % while dirlist = dir('*.m'); dirlist = {dirlist.name}; for i=1:length(dirlist) dirlist{i} = fullfile(pwd, dirlist{i}); end % show the list of functions on which there is no dependence from the main functions disp(setdiff(dirlist, outlist)');
Robert Oostenveld - 2012-03-10 14:32:35 +0100
(In reply to comment #2) The list of functions that are not needed by sopen, sread and sclose is '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/Contents.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/adb2event.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/asn1read2.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/biosigVersion.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/eload.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/fepi2gdf.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/gtfopen.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/hdr2ascii.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/load_micromed_ep_ascii.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/mat2sel.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/nk2hyp.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/openeep.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/openxlt.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/save2bkr.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/save2edf.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/save2gdf.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/save2mm.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/save2txt.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/seof.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/sload.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/sload2.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/srewind.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/ssave.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/sseek.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/stell.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/str2double2.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/swrite.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/tload.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/tlvread.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/trigandsave2gdf.m' '/Users/robert/matlab/biosig-2.61/biosig/t200_FileAccess/wscore2event.m' I removed these from fieldtrip/external/biosig/private
Robert Oostenveld - 2012-03-10 14:44:45 +0100
after some testing it became clear that there are some external text files with "constants" such as units.csv eventcodes.txt DecimalFactors.txt that need to be in biosig/doc.
Robert Oostenveld - 2012-03-10 14:45:18 +0100
mbp> svn commit Adding external/biosig Adding external/biosig/CREDITS Adding external/biosig/LICENSE Adding external/biosig/doc Adding external/biosig/doc/Contents.m Adding external/biosig/doc/DecimalFactors.txt Adding external/biosig/doc/IEEEandUCUM.1b.txt Adding external/biosig/doc/ManufacturerInformation.cfg Adding external/biosig/doc/datatype.txt Adding external/biosig/doc/elecpos.txt Adding external/biosig/doc/eventcodes.txt Adding external/biosig/doc/header.txt Adding external/biosig/doc/leadidtable_scpecg.txt Adding external/biosig/doc/patientcodes.txt Adding external/biosig/doc/units.csv Adding external/biosig/private Adding external/biosig/private/Contents.m Adding external/biosig/private/bdf2biosig_events.m Adding external/biosig/private/bkropen.m Adding external/biosig/private/bni2hdr.m Adding external/biosig/private/bv2biosig_events.m Adding external/biosig/private/cntopen.m Adding external/biosig/private/famosopen.m Adding external/biosig/private/fefopen.m Transmitting file data ..................... Committed revision 5426.
Robert Oostenveld - 2012-03-10 14:53:01 +0100
(In reply to comment #5) The previous commit turned out not to be complete because of line style ending inconsistencies. I fixed those. Furthermore, the function rs was missing. I copied that from biosig-2.61/biosig/t250_ArtifactPreProcessingQualityControl/rs.m mbp> svn commit Adding private/fltopen.m Adding private/gdfdatatype.m Adding private/getfiletype.m Adding private/iopen.m Adding private/iread.m Adding private/leadidcodexyz.m Adding private/matread.m Adding private/mwfopen.m Adding private/opendicom.m Adding private/openiff.m Adding private/openldr.m Adding private/openxml.m Adding private/physicalunits.m Adding private/rs.m Adding private/scpopen.m Adding private/str2double.m Transmitting file data ................ Committed revision 5427.