function [runType,targetPosition,maskerPattern] = parse_file_name(str)

token = 'kopco_run_';
idx = strfind(str, token);
if isempty(idx)
    error('Error parsing line %s', str);
end
str = str(idx+length(token):end);

splitStr = regexp(str,'_','split');

idx = 3;
runType = splitStr{idx};
if strcmp('catch', splitStr{idx+1})
    idx = idx + 1;
    runType = strcat(runType, '_catch');
end
targetPosition = str2double(splitStr{idx+2});
maskerPattern = str2double(splitStr{idx+4});

