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

add radiated power for JET

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@9356 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 02fa0941
No related branches found
No related tags found
No related merge requests found
......@@ -1214,11 +1214,13 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
end
% always start from ohmic so can use this time as base time since should yield full shot
fields_to_copy = {'data','units','dim','dimunits','t','x','data_fullpath','label','help','gdat_params'};
fields_to_copy = {'data','units','dim','dimunits','t','x','data_fullpath','label','help','gdat_params', ...
'rad_bulk_h','rad_bulk_u','rad_bulk_avg'};
fields_to_not_copy = {'shot','gdat_request'};
% total of each source in .data, but full data in subfield like pgyro in .ec, to check for nbi
params_eff = gdat_data.gdat_params;
params_eff.source=[]; % use default for individual calls
sources_coeff = [];
% ohmic, use its time-base
params_eff.data_request='p_ohmic';
......@@ -1235,6 +1237,7 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
end
end
gdat_data.ohm.raw_data = gdat_data.ohm.data;
sources_coeff(end+1) = 1; % to be added to sum at end
else
if gdat_params.nverbose>=3; disp(['problems with ' params_eff.data_request]); end
return
......@@ -1270,6 +1273,7 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
gdat_data.data(:,end+1) = interpos(-21,gdat_data.nbi.t,gdat_data.nbi.data(:,end),gdat_data.t);
gdat_data.x(end+1) =gdat_data.x(end)+1;
gdat_data.label{end+1}='P_{nbi}';
sources_coeff(end+1) = 1; % to be added to sum at end
end
end
%
......@@ -1289,6 +1293,7 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
gdat_data.data(:,end+1) = interpos(-21,gdat_data.ic.t,gdat_data.ic.data,gdat_data.t);
gdat_data.x(end+1) =gdat_data.x(end)+1;
gdat_data.label{end+1}='P_{ic}';
sources_coeff(end+1) = 1; % to be added to sum at end
end
end
if any(strmatch('rad',gdat_data.gdat_params.source))
......@@ -1308,10 +1313,10 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
gdat_data.data(:,end+1) = interpos(-21,gdat_data.rad.t,gdat_data.rad.data,gdat_data.t);
gdat_data.x(end+1) =gdat_data.x(end)+1;
gdat_data.label{end+1}='P_{rad}';
sources_coeff(end+1) = 0; % to not be added to sum at end
end
end
% add tot power
sources_coeff = [ 1, 1, 1, 0];
aa=sum(gdat_data.data.*repmat(reshape(sources_coeff,1,numel(sources_coeff)),size(gdat_data.data,1),1),2);
gdat_data.data(:,end+1) = aa;
% gdat_data.data(:,end+1) = sum(gdat_data.data,2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment