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

indent and remove empty lines

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@7331 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 44027a92
Branches
Tags
No related merge requests found
...@@ -864,7 +864,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -864,7 +864,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
end end
else else
disp('should not be here in ''mhd'', ask O. Sauter') disp('should not be here in ''mhd'', ask O. Sauter')
return return
...@@ -925,17 +925,17 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -925,17 +925,17 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
zeffshift=zshift; zeffshift=zshift;
% set zeffshift time array same as psitdi % set zeffshift time array same as psitdi
switch length(zeffshift) switch length(zeffshift)
case 1 case 1
zeffshift=zeffshift * ones(size(psitdi.dim{3})); zeffshift=zeffshift * ones(size(psitdi.dim{3}));
case length(psitdi.dim{3}) case length(psitdi.dim{3})
% ok % ok
case length(psiscatvol.dim{1}) case length(psiscatvol.dim{1})
zeffshift=interp1(psiscatvol.dim{1},zeffshift,psitdi.dim{3}); zeffshift=interp1(psiscatvol.dim{1},zeffshift,psitdi.dim{3});
otherwise otherwise
if (gdat_params.nverbose>=1); if (gdat_params.nverbose>=1);
disp(' bad time dimension for zshift') disp(' bad time dimension for zshift')
disp(['it should be 1 or ' num2str(length(psiscatvol.dim{1})) ' or ' num2str(length(psitdi.dim{3}))]) disp(['it should be 1 or ' num2str(length(psiscatvol.dim{1})) ' or ' num2str(length(psitdi.dim{3}))])
end end
end end
for it=1:length(psiscatvol.dim{1}) for it=1:length(psiscatvol.dim{1})
itpsitdi=iround(psitdi.dim{3},psiscatvol.dim{1}(it)); itpsitdi=iround(psitdi.dim{3},psiscatvol.dim{1}(it));
...@@ -1037,9 +1037,9 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -1037,9 +1037,9 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
elseif strcmp(data_request_eff(1:2),'te') elseif strcmp(data_request_eff(1:2),'te')
nodenameeff = [def_proffit 'teft']; nodenameeff = [def_proffit 'teft'];
else else
if (gdat_params.nverbose>=1); if (gdat_params.nverbose>=1);
disp(['should not be here: data_request_eff, data_request_eff(1:2)= ',data_request_eff, data_request_eff(1:2)]); disp(['should not be here: data_request_eff, data_request_eff(1:2)= ',data_request_eff, data_request_eff(1:2)]);
end end
end end
end end
if isfield(gdat_data.gdat_params,'trialindx') && ~isempty(gdat_data.gdat_params.trialindx) && ... if isfield(gdat_data.gdat_params,'trialindx') && ~isempty(gdat_data.gdat_params.trialindx) && ...
...@@ -1398,270 +1398,220 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -1398,270 +1398,220 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
[qfit,~,~,phi]=interpos(q_rho.dim{1}(ij).^2,q_rho.data(ij,it),rhoequal.^2); [qfit,~,~,phi]=interpos(q_rho.dim{1}(ij).^2,q_rho.data(ij,it),rhoequal.^2);
dataeff = sqrt(phi .* psi_axis.data(it) ./ b0tpsi(it) ./ pi) ; % Delta_psi = -psi_axis dataeff = sqrt(phi .* psi_axis.data(it) ./ b0tpsi(it) ./ pi) ; % Delta_psi = -psi_axis
else else
dataeff = NaN; dataeff = NaN;
end end
if strcmp(data_request_eff,'rhotor_edge') if strcmp(data_request_eff,'rhotor_edge')
gdat_data.data(it) = dataeff(end); gdat_data.data(it) = dataeff(end);
elseif strcmp(data_request_eff,'rhotor') elseif strcmp(data_request_eff,'rhotor')
gdat_data.data(:,it) = dataeff./dataeff(end); gdat_data.data(:,it) = dataeff./dataeff(end);
gdat_data.rhotor_edge(it) = dataeff(end); gdat_data.rhotor_edge(it) = dataeff(end);
end end
gdat_data.b0 = b0tpsi(it); gdat_data.b0 = b0tpsi(it);
end end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'rhovol','volume_rho','volume'} case {'rhovol','volume_rho','volume'}
% volume_rho = vol(rho); volume = vol(LCFS) = vol(rho=1); % volume_rho = vol(rho); volume = vol(LCFS) = vol(rho=1);
% rhovol = sqrt(vol(rho)/vol(rho=1)); % rhovol = sqrt(vol(rho)/vol(rho=1));
nodenameeff='\results::psitbx:vol'; nodenameeff='\results::psitbx:vol';
if liuqe_version==-1 if liuqe_version==-1
nodenameeff=[begstr 'vol' substr_liuqe]; nodenameeff=[begstr 'vol' substr_liuqe];
end end
tracetdi=tdi(nodenameeff); tracetdi=tdi(nodenameeff);
if isempty(tracetdi.data) || isempty(tracetdi.dim) if isempty(tracetdi.data) || isempty(tracetdi.dim)
% try to run psitbxput % try to run psitbxput
psitbxput_version = 1.3; psitbxput_version = 1.3;
psitbxput(psitbxput_version,shot); psitbxput(psitbxput_version,shot);
ishot = mdsopen(shot); ishot = mdsopen(shot);
tracetdi=tdi(nodenameeff); tracetdi=tdi(nodenameeff);
if isempty(tracetdi.data) || isempty(tracetdi.dim) if isempty(tracetdi.data) || isempty(tracetdi.dim)
return return
end end
end
gdat_data.units = tracetdi.units;
if strcmp(data_request_eff,'volume')
gdat_data.data = tracetdi.data(end,:);
gdat_data.dim{1} = tracetdi.dim{2};
gdat_data.data_fullpath=['\results::psitbx:vol(end,:)'];
gdat_data.dimunits{1} = tracetdi.dimunits{2};
gdat_data.request_description = 'volume(LCFS)=volume(rhopol=1)';
else
gdat_data.data = tracetdi.data;
gdat_data.dim = tracetdi.dim;
gdat_data.x = gdat_data.dim{1};
gdat_data.dimunits = tracetdi.dimunits;
if strcmp(data_request_eff,'volume_rho')
gdat_data.data_fullpath=['\results::psitbx:vol'];
gdat_data.request_description = 'volume(rho)';
elseif strcmp(data_request_eff,'rhovol')
gdat_data.volume_edge = gdat_data.data(end,:);
gdat_data.data = sqrt(gdat_data.data./repmat(reshape(gdat_data.volume_edge,1,size(gdat_data.data,2)),size(gdat_data.data,1),1));
gdat_data.data_fullpath='sqrt(\results::psitbx:vol/vol_edge)';
gdat_data.request_description = 'sqrt(volume(rho)/volume(edge))';
else
if (gdat_params.nverbose>=1)
disp(['should not be here in vol cases with data_request = ' data_request_eff]);
end
return
end
end
gdat_data.t = gdat_data.dim{mapping_for_tcv.gdat_timedim};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'rtc'}
% load all real-time memory signals for various nodes
%Get the data from mds and fill the data structure defined by
%define_simulink_signals
% If the rtccode/developemnet folder is not in your path
% read from Carpanese's folder ( he might have not
% updated the folder to the last version)
if exist('~/rtccode/development/tools/io_defs')
addpath('~/rtccode/development/tools/io_defs');
else
addpath('/home/carpanes/rtccode/development/tools/io_defs');
end
sources_avail = {'defined', 'all'};
%Check if varargins match source_avail
if ~isfield(gdat_data.gdat_params,'source') || isempty(gdat_data.gdat_params.source) % with no specifications all, defined, combined are taken
gdat_data.gdat_params.source = sources_avail;
elseif ~iscell(gdat_data.gdat_params.source)
if ischar(gdat_data.gdat_params.source)
gdat_data.gdat_params.source = lower(gdat_data.gdat_params.source);
if ~any(strmatch(gdat_data.gdat_params.source,lower(sources_avail)))
if (gdat_params.nverbose>=1)
warning(['source= ' gdat_data.gdat_params.source ' is not part of the available sources: ' sprintf('''%s'' ',sources_avail{:})]);
end end
gdat_data.units = tracetdi.units; return
if strcmp(data_request_eff,'volume') else
gdat_data.data = tracetdi.data(end,:); gdat_data.gdat_params.source = {gdat_data.gdat_params.source};
gdat_data.dim{1} = tracetdi.dim{2}; end
gdat_data.data_fullpath=['\results::psitbx:vol(end,:)']; else
gdat_data.dimunits{1} = tracetdi.dimunits{2}; if (gdat_params.nverbose>=1); warning([' source parameter not compatible with: ' sprintf('''%s'' ',sources_avail{:})]); end
gdat_data.request_description = 'volume(LCFS)=volume(rhopol=1)'; return
else end
gdat_data.data = tracetdi.data; else
gdat_data.dim = tracetdi.dim; tmp = {};
gdat_data.x = gdat_data.dim{1}; for i=1:length(gdat_data.gdat_params.source)
gdat_data.dimunits = tracetdi.dimunits; gdat_data.gdat_params.source{i} = lower(gdat_data.gdat_params.source{i}); %put vargin in params
if strcmp(data_request_eff,'volume_rho')
gdat_data.data_fullpath=['\results::psitbx:vol']; if ~any(strmatch(gdat_data.gdat_params.source{i},lower(sources_avail)))
gdat_data.request_description = 'volume(rho)'; if gdat_data.gdat_params.nverbose>=1
elseif strcmp(data_request_eff,'rhovol') warning(['source = ' gdat_data.gdat_params.source{i} ' not expected with data_request= ' data_request_eff])
gdat_data.volume_edge = gdat_data.data(end,:);
gdat_data.data = sqrt(gdat_data.data./repmat(reshape(gdat_data.volume_edge,1,size(gdat_data.data,2)),size(gdat_data.data,1),1));
gdat_data.data_fullpath='sqrt(\results::psitbx:vol/vol_edge)';
gdat_data.request_description = 'sqrt(volume(rho)/volume(edge))';
else
if (gdat_params.nverbose>=1)
disp(['should not be here in vol cases with data_request = ' data_request_eff]);
end
return
end
end end
gdat_data.t = gdat_data.dim{mapping_for_tcv.gdat_timedim}; else
tmp{end+1} = gdat_data.gdat_params.source{i};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end
case {'rtc'} end
gdat_data.gdat_params.source = tmp;
% load all real-time memory signals for various nodes end
%Get the data from mds and fill the data structure defined by % Get data for the source requested
%define_simulink_signals for ii=1:numel(gdat_data.gdat_params.source)
switch gdat_data.gdat_params.source{ii}
case 'defined'
% If the rtccode/developemnet folder is not in your path DS = take_all_signals(shot); %Read from mds
% read from Carpanese's folder ( he might have not SDS_DS = define_simulink_signals(DS); %Put them in predifined structure
% updated the folder to the last version) % Add the .data and .t structure
if exist('~/rtccode/development/tools/io_defs') for ii=1:numel(SDS_DS) %iter over node
addpath('~/rtccode/development/tools/io_defs'); node = ii;
else for jj=1:numel(SDS_DS{ii}) %iter over threads
addpath('/home/carpanes/rtccode/development/tools/io_defs'); thread = jj;
end fieldnameslist = fieldnames(SDS_DS{ii}{jj});
sources_avail = {'defined', 'all'}; if SDS_DS{ii}{1}.conf.hasthreads
%Check if varargins match source_avail is_with_threads = 1;
if ~isfield(gdat_data.gdat_params,'source') || isempty(gdat_data.gdat_params.source) % with no specifications all, defined, combined are taken else
gdat_data.gdat_params.source = sources_avail; is_with_threads = 0;
end
elseif ~iscell(gdat_data.gdat_params.source) for kk=2:numel(fieldnameslist) %iter over fieldnames (the first one is configuration)
if ischar(gdat_data.gdat_params.source) indices = SDS_DS{ii}{jj}.(fieldnameslist{kk}).ind;
gdat_data.gdat_params.source = lower(gdat_data.gdat_params.source); SDS_DS{ii}{jj}.(fieldnameslist{kk}).data = [];
if ~any(strmatch(gdat_data.gdat_params.source,lower(sources_avail))) for zz=1:numel(indices) %iter over indices
if (gdat_params.nverbose>=1) ind = indices(zz);
warning(['source= ' gdat_data.gdat_params.source ' is not part of the available sources: ' sprintf('''%s'' ',sources_avail{:})]); mdsconnect('scd');
end mdsopen('rtc', shot);
return % data expression
else if is_with_threads ==0
gdat_data.gdat_params.source = {gdat_data.gdat_params.source}; expression = sprintf('\\top.crpprt%.2d.mems.mem_%.2d',node,ind);
end else
else expression = sprintf('\\top.crpprt%.2d.thread%.1d.mems.mem_%.3d',node,thread,ind);
if (gdat_params.nverbose>=1); warning([' source parameter not compatible with: ' sprintf('''%s'' ',sources_avail{:})]); end end
return tmp = tdi(expression);
end if isnumeric(tmp.data) && ~isempty(tmp.data)
else SDS_DS{ii}{jj}.(fieldnameslist{kk}).data =[SDS_DS{ii}{jj}.(fieldnameslist{kk}).data; tmp.data'];
tmp = {};
for i=1:length(gdat_data.gdat_params.source)
gdat_data.gdat_params.source{i} = lower(gdat_data.gdat_params.source{i}); %put vargin in params
if ~any(strmatch(gdat_data.gdat_params.source{i},lower(sources_avail))) SDS_DS{ii}{jj}.(fieldnameslist{kk}).t = tmp.dim{1};
if gdat_data.gdat_params.nverbose>=1 else
warning(['source = ' gdat_data.gdat_params.source{i} ' not expected with data_request= ' data_request_eff]) fprintf('Warning node: %d thread: %d signal: %s ind %d not available\n', ii,jj,fieldnameslist{kk}, zz );
end end
else
tmp{end+1} = gdat_data.gdat_params.source{i};
end
end end
gdat_data.gdat_params.source = tmp; end
end end
end
gdat_data.rtc_defined = SDS_DS;
% Get data for the source requested mdsclose;
for ii=1:numel(gdat_data.gdat_params.source) mdsdisconnect;
switch gdat_data.gdat_params.source{ii}
case 'defined' case 'all'
mdsconnect('scd');
DS = take_all_signals(shot); %Read from mds mdsopen('rtc', shot);
SDS_DS = define_simulink_signals(DS); %Put them in predifined structure %[node, threads, #number of signals for each thread of the node]
global_node_thread_signals = ...
[1,1,32;
% Add the .data and .t structure 2,1,32;
for ii=1:numel(SDS_DS) %iter over node 3,1,32;
node = ii; 6,4,256;
for jj=1:numel(SDS_DS{ii}) %iter over threads 7,2,32];
thread = jj; % Default signals initialization
fieldnameslist = fieldnames(SDS_DS{ii}{jj}); AS = init_all_signals(global_node_thread_signals);
% Put signals in standard data strucure (SDS)
if SDS_DS{ii}{1}.conf.hasthreads SDS_AS = define_simulink_signals(AS);
is_with_threads = 1; % Add the .data and .t structure
else for ii=1:numel(SDS_AS) %iter over node
is_with_threads = 0; node = ii;
end for jj=1:numel(SDS_AS{ii}) %iter over threads
thread = jj;
for kk=2:numel(fieldnameslist) %iter over fieldnames (the first one is configuration) fieldnameslist = fieldnames(SDS_AS{ii}{jj});
if numel(SDS_AS{ii})>1
indices = SDS_DS{ii}{jj}.(fieldnameslist{kk}).ind; is_with_threads = 1;
SDS_DS{ii}{jj}.(fieldnameslist{kk}).data = []; else
is_with_threads = 0;
end
for zz=1:numel(indices) %iter over indices for kk=2:numel(fieldnameslist) %iter over fieldnames (the first one is configuration)
ind = indices(zz); indices = SDS_AS{ii}{jj}.(fieldnameslist{kk}).ind;
SDS_AS{ii}{jj}.(fieldnameslist{kk}).data = [];
for zz=1:numel(indices) %iter over indices
mdsconnect('scd'); ind = indices(zz);
mdsopen('rtc', shot); % data expression
if is_with_threads ==0
% data expression expression = sprintf('\\top.crpprt%.2d.mems.mem_%.2d',node,ind);
if is_with_threads ==0 else
expression = sprintf('\\top.crpprt%.2d.mems.mem_%.2d',node,ind); expression = sprintf('\\top.crpprt%.2d.thread%.1d.mems.mem_%.3d',node,thread,ind);
else end
expression = sprintf('\\top.crpprt%.2d.thread%.1d.mems.mem_%.3d',node,thread,ind); tmp = tdi(expression);
end if isnumeric(tmp.data)
SDS_AS{ii}{jj}.(fieldnameslist{kk}).data =[SDS_AS{ii}{jj}.(fieldnameslist{kk}).data; tmp.data'];
tmp = tdi(expression); SDS_AS{ii}{jj}.(fieldnameslist{kk}).t = tmp.dim{1};
else
fprintf('Warning node: %d thread: %d signal: %s ind %d not available\n', ii,jj,fieldnameslist{kk}, zz );
if isnumeric(tmp.data) && ~isempty(tmp.data) end
SDS_DS{ii}{jj}.(fieldnameslist{kk}).data =[SDS_DS{ii}{jj}.(fieldnameslist{kk}).data; tmp.data'];
SDS_DS{ii}{jj}.(fieldnameslist{kk}).t = tmp.dim{1};
else
fprintf('Warning node: %d thread: %d signal: %s ind %d not available\n', ii,jj,fieldnameslist{kk}, zz );
end
end
end
end
end
gdat_data.rtc_defined = SDS_DS;
mdsclose;
mdsdisconnect;
case 'all'
mdsconnect('scd');
mdsopen('rtc', shot);
%[node, threads, #number of signals for each thread of the node]
global_node_thread_signals = ...
[1,1,32;
2,1,32;
3,1,32;
6,4,256;
7,2,32];
% Default signals initialization
AS = init_all_signals(global_node_thread_signals);
% Put signals in standard data strucure (SDS)
SDS_AS = define_simulink_signals(AS);
% Add the .data and .t structure
for ii=1:numel(SDS_AS) %iter over node
node = ii;
for jj=1:numel(SDS_AS{ii}) %iter over threads
thread = jj;
fieldnameslist = fieldnames(SDS_AS{ii}{jj});
if numel(SDS_AS{ii})>1
is_with_threads = 1;
else
is_with_threads = 0;
end
for kk=2:numel(fieldnameslist) %iter over fieldnames (the first one is configuration)
indices = SDS_AS{ii}{jj}.(fieldnameslist{kk}).ind;
SDS_AS{ii}{jj}.(fieldnameslist{kk}).data = [];
for zz=1:numel(indices) %iter over indices
ind = indices(zz);
% data expression
if is_with_threads ==0
expression = sprintf('\\top.crpprt%.2d.mems.mem_%.2d',node,ind);
else
expression = sprintf('\\top.crpprt%.2d.thread%.1d.mems.mem_%.3d',node,thread,ind);
end
tmp = tdi(expression);
if isnumeric(tmp.data)
SDS_AS{ii}{jj}.(fieldnameslist{kk}).data =[SDS_AS{ii}{jj}.(fieldnameslist{kk}).data; tmp.data'];
SDS_AS{ii}{jj}.(fieldnameslist{kk}).t = tmp.dim{1};
else
fprintf('Warning node: %d thread: %d signal: %s ind %d not available\n', ii,jj,fieldnameslist{kk}, zz );
end
end
end
end
end
gdat_data.rtc_all = SDS_AS;
mdsclose;
mdsdisconnect;
otherwise
%to be added in case
end end
end
end end
end
gdat_data.rtc_all = SDS_AS;
mdsclose;
mdsdisconnect;
otherwise
%to be added in case
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end
case {'sxr', 'mpx'}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'sxr', 'mpx'}
if strcmp(data_request_eff,'mpx') if strcmp(data_request_eff,'mpx')
data_request_eff = 'mpx'; % mpx chosen through parameter 'source' within 'sxr' data_request_eff = 'mpx'; % mpx chosen through parameter 'source' within 'sxr'
...@@ -1730,7 +1680,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -1730,7 +1680,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
gdat_data.(gdat_data.gdat_params.camera).x = gdat_data.x; gdat_data.(gdat_data.gdat_params.camera).x = gdat_data.x;
gdat_data.(gdat_data.gdat_params.camera).channel = mpx.(gdat_data.gdat_params.camera(1:3)).signal.dim{2}; gdat_data.(gdat_data.gdat_params.camera).channel = mpx.(gdat_data.gdat_params.camera(1:3)).signal.dim{2};
gdat_data.data_fullpath = ['MPX for ' gdat_data.gdat_params.camera ' camera in .data, "rho" in .x between [-1,1]' ... gdat_data.data_fullpath = ['MPX for ' gdat_data.gdat_params.camera ' camera in .data, "rho" in .x between [-1,1]' ...
char(10) gdat_data.data_fullpath]; char(10) gdat_data.data_fullpath];
else else
gdat_data.data = mpx.signal.data'; gdat_data.data = mpx.signal.data';
gdat_data.t = mpx.signal.dim{1}; gdat_data.t = mpx.signal.dim{1};
...@@ -1745,7 +1695,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -1745,7 +1695,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
gdat_data.bottom.channel = mpx.bottom.signal.dim{2}; gdat_data.bottom.channel = mpx.bottom.signal.dim{2};
gdat_data.(gdat_data.gdat_params.camera).channel = mpx.(gdat_data.gdat_params.camera(1:3)).signal.dim{2}; gdat_data.(gdat_data.gdat_params.camera).channel = mpx.(gdat_data.gdat_params.camera(1:3)).signal.dim{2};
gdat_data.data_fullpath = ['MPX for ' gdat_data.gdat_params.camera ' camera in .data, "rho" in .x between [-1,1]' ... gdat_data.data_fullpath = ['MPX for ' gdat_data.gdat_params.camera ' camera in .data, "rho" in .x between [-1,1]' ...
char(10) gdat_data.data_fullpath]; char(10) gdat_data.data_fullpath];
gdat_data.x = gdat_data.dim{1}; gdat_data.x = gdat_data.dim{1};
end end
...@@ -1815,7 +1765,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -1815,7 +1765,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
return return
end end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'profnerho','profterho'} case {'profnerho','profterho'}
...@@ -1825,9 +1775,9 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -1825,9 +1775,9 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
nodenameeff_vers = [nodenameeff ':version_num']; nodenameeff_vers = [nodenameeff ':version_num'];
avers = tdi(nodenameeff_vers); avers = tdi(nodenameeff_vers);
if avers.data==0 if avers.data==0
% may be because nodes not yet filled in, so call once a node % may be because nodes not yet filled in, so call once a node
ab=tdi(nodenameeff); ab=tdi(nodenameeff);
avers = tdi(nodenameeff_vers); avers = tdi(nodenameeff_vers);
end end
if avers.data>0 if avers.data>0
tracetdi=tdi(nodenameeff); tracetdi=tdi(nodenameeff);
...@@ -1839,7 +1789,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -1839,7 +1789,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
gdat_data.t=tracetdi.dim{2}; gdat_data.t=tracetdi.dim{2};
error_status=0; error_status=0;
else else
error_status=2; error_status=2;
gdat_data.x=[]; gdat_data.x=[];
gdat_data.t=[]; gdat_data.t=[];
end end
...@@ -1853,7 +1803,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -1853,7 +1803,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
else else
gdat_data.x=[]; gdat_data.x=[];
gdat_data.t=[]; gdat_data.t=[];
error_status=2; error_status=2;
end end
end end
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment