Skip to content
Snippets Groups Projects
Commit 51d4550d authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add and copy new gdat version

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@5025 d63d8f72-b253-0410-a779-e742ad2e26cf
parent f984be8d
No related branches found
No related tags found
No related merge requests found
function [data_request_names] = get_data_request_names;
%
% get list of presently available data_request names grouped and with description
%
% at this stage using first 3 columns of file gdat_data_request_names.xlsx
%
expected_machines = [{'aug'}, {'jet'}, {'tcv'}]; % substrutures created for these at this stage (all means all of these)
for j=1:length(expected_machines)
data_request_names.(expected_machines{j}) = [];
end
filename='gdat_data_request_names_rho.xlsx';
[numeric_struct,text_struct,raw_struct]=xlsread(filename);
% use text structure
[n1,n2]=size(text_struct);
if prod(n1,n2)==0 || n2<3
disp(['problems with file ' filename])
return
end
% assume 1st column has data_request names with the headline "data_request"
ij=find(strcmp('data_request',strtrim(lower(text_struct{1,1})))==1);
if isempty(ij) || ij+1>=n1
disp(['problems with file ' filename '; ''data_request'' not found in 1st column or no extra lines'])
return
end
ij_1strow = ij+1;
for iline=ij+1:n1
if isempty(text_struct{iline,1}); keyboard; end
% extra machine
validity = text_struct{iline,3};
if ~isempty(regexpi(validity,'all'))
data_request_names.all.(strtrim(lower(text_struct{iline,1}))).description = strtrim(text_struct{iline,2});
else
for j=1:length(expected_machines)
if ~isempty(regexpi(validity,expected_machines{j}))
data_request_names.(lower(expected_machines{j})).(strtrim(lower(text_struct{iline,1}))).description = strtrim(text_struct{iline,2});
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment