Back to the main page.
Bug 3388 - implement auto-appending for Elekta fif files
Status | NEW |
Reported | 2017-12-13 12:12:00 +0100 |
Modified | 2018-12-30 18:23:36 +0100 |
Product: | FieldTrip |
Component: | fileio |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P5 normal |
Assigned to: | |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2017-12-13 12:12:07 +0100
this should be done for files that exceed the 2gb boundary
Robert Oostenveld - 2017-12-13 12:13:56 +0100
ft_read_header etc should get the option "autoappend=yes/no" which would cause them to auto append.
Lau Møller Andersen - 2017-12-13 13:56:19 +0100
Here's some code I've been using for my own projects. Let me know whether you want to implement something like this in ft_read_header split_extension = 1; %% first split file extension number directory = dir(save_path); %% get all files all_filenames = {directory.name}; split_filenames = {}; % check if filename exists filename = [cfg.input_file cfg.input_extension]; split_filenames{split_extension} = filename; filename_exists = sum(strcmp(filename, all_filenames)); if ~filename_exists error(['Filename: ' filename ' does not exist on path: ' save_path]) end % find number of split files while true %% run until break split_filename = [cfg.input_file '-' num2str(split_extension) ... cfg.input_extension]; split_filename_exists = sum(strcmp(split_filename, ... all_filenames)); if split_filename_exists split_extension = split_extension + 1; % increment split_filenames{split_extension} = split_filename; else break %% break when no more files can be found end end
Jan-Mathijs Schoffelen - 2018-12-30 18:22:21 +0100
Will anybody be picking up on this anytime soon? If there's no perceived urgency, I suggest to close this one. Otherwise, assign it to a named person (perhaps Lau :) ), so that it will be on his radar.