3 %> @brief Attempts to detect type of single-spectrum files
5 %> Possible outcomes are
'pir',
'opus',
'wire', or []
9 %> @
return String. Possible outcomes are [],
'pir',
'opus',
'wire'
12 % Extracts first file name
15 [filenames, groupcodes] =
resolve_dir(wild, trimdot, flag_image); %
#ok<NASGU>
18 irerror('No files in directory');
21 wild_new = fullfile(fileparts(wild), filenames{1});
23 totry = {
'pir',
'opus',
'wire'};
25 for it = 1:numel(totry)
29 s_code = sprintf('[mint, flag_error] = %s2data(''%s'', 0, 0, 0);', totry{it}, wild_new);
31 flag_ok = ~flag_error;
33 irverbose(
'detect_spectrum_type() caught error:');
38 irverbose(sprintf(
'<<< YES %s !!! >>>', totry{it}), 1);
42 irverbose(sprintf(
'<<< Not %s ... >>>', totry{it}), 1);
function irverbose(in s, in level)
function resolve_dir(in wild, in trimdot, in flag_image)
function detect_spectrum_type(in wild)