Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
test/IST_logfile_bids.m
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22 lines (17 sloc)
544 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% IST Logfile Extraction / Number of scans | |
% | |
% transfers logfiles into BIDS tsv format | |
% | |
% file history: | |
% created M. Czisch 25.1.2018 based on A. Kuehnel script | |
function IST_logfile_bids(BIDS) | |
log = dir([BIDS.input.dir,'/LOG/*IST*.log']); | |
logfile=readtext([log.folder,'/',log.name],'\t'); | |
string_logfile = cellfun(@num2str, logfile(:,4), 'UniformOutput', 0); | |
calc = cellfun('isempty',(regexp(string_logfile, 'calculus'))); | |
if sum(~calc)>20 | |
IST_logfile_final_bids(BIDS); | |
elseif sum(~calc)<20 | |
IST_logfile_flipped_bids(BIDS); | |
end | |
end |