Commit b498aaca authored by Matteo Vallar's avatar Matteo Vallar
Browse files

powers data stored in the correct field of the output structure

parent 4f040b7d
Pipeline #83216 failed with stages
in 50 seconds
......@@ -2469,24 +2469,24 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
nbi_neutral_power_tot = nbh_data_tdi.data.*1e6; % in W
ij = nbi_neutral_power_tot<100;
nbi_neutral_power_tot(ij) = 0.;
gdat_data.nbi.data = nbi_neutral_power_tot; % at this stage p_gyro is in kW'
gdat_data.nbi.units = 'W';
gdat_data.nbi.dim{1}=nbh_data_tdi.dim{1};
gdat_data.nbi.dimunits{1}=nbh_data_tdi.dimunits{1};
gdat_data.nbi.t=gdat_data.nbi.dim{1};
gdat_data.nbi.x=[];
gdat_data.nbi.data_fullpath=[nodenameeff];
gdat_data.nbi.label='P_{nbi1}';
gdat_data.nbi.help = nbh_data_tdi.help;
gdat_data.nbi1.data = nbi_neutral_power_tot; % at this stage p_gyro is in kW'
gdat_data.nbi1.units = 'W';
gdat_data.nbi1.dim{1}=nbh_data_tdi.dim{1};
gdat_data.nbi1.dimunits{1}=nbh_data_tdi.dimunits{1};
gdat_data.nbi1.t=gdat_data.nbi1.dim{1};
gdat_data.nbi1.x=[];
gdat_data.nbi1.data_fullpath=[nodenameeff];
gdat_data.nbi1.label='P_{nbi1}';
gdat_data.nbi1.help = nbh_data_tdi.help;
nodenameeff2 = '\results::nbh:energy';
gdat_data.nbi.data_fullpath=[nodenameeff ' *1e6 for W; and ' nodenameeff2 ' *1e3 for eV'];
gdat_data.nbi1.data_fullpath=[nodenameeff ' *1e6 for W; and ' nodenameeff2 ' *1e3 for eV'];
nbh_energy_data_tdi = tdi(nodenameeff2);
gdat_data.nbi.energy = nbh_energy_data_tdi.data*1e3; % for eV
gdat_data.nbi1.energy = nbh_energy_data_tdi.data*1e3; % for eV
% add to main with linear interpolation and 0 for extrapolated values
ij=[isfinite(gdat_data.nbi.data)];
gdat_data.data(:,end+1) = interpos(-21,gdat_data.nbi.t(ij),gdat_data.nbi.data(ij),gdat_data.t);
ij=[isfinite(gdat_data.nbi1.data)];
gdat_data.data(:,end+1) = interpos(-21,gdat_data.nbi1.t(ij),gdat_data.nbi1.data(ij),gdat_data.t);
gdat_data.x(end+1) = size(gdat_data.data,2);
gdat_data.label{end+1}=gdat_data.nbi.label;
gdat_data.label{end+1}=gdat_data.nbi1.label;
end
end
%
......@@ -2522,24 +2522,24 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
nbi_neutral_power_tot = nb2_data_tdi.data.*1e6; % in W
ij = nbi_neutral_power_tot<100;
nbi_neutral_power_tot(ij) = 0.;
gdat_data.nbi.data = nbi_neutral_power_tot; % at this stage p_gyro is in kW'
gdat_data.nbi.units = 'W';
gdat_data.nbi.dim{1}=nb2_data_tdi.dim{1};
gdat_data.nbi.dimunits{1}=nb2_data_tdi.dimunits{1};
gdat_data.nbi.t=gdat_data.nbi.dim{1};
gdat_data.nbi.x=[];
gdat_data.nbi.data_fullpath=[nodenameeff];
gdat_data.nbi.label='P_{nbi2}';
gdat_data.nbi.help = nb2_data_tdi.help;
gdat_data.nbi2.data = nbi_neutral_power_tot; % at this stage p_gyro is in kW'
gdat_data.nbi2.units = 'W';
gdat_data.nbi2.dim{1}=nb2_data_tdi.dim{1};
gdat_data.nbi2.dimunits{1}=nb2_data_tdi.dimunits{1};
gdat_data.nbi2.t=gdat_data.nbi2.dim{1};
gdat_data.nbi2.x=[];
gdat_data.nbi2.data_fullpath=[nodenameeff];
gdat_data.nbi2.label='P_{nbi2}';
gdat_data.nbi2.help = nb2_data_tdi.help;
nodenameeff2 = '\results::nb2:energy';
gdat_data.nbi.data_fullpath=[nodenameeff ' *1e6 for W; and ' nodenameeff2 ' *1e3 for eV'];
gdat_data.nbi2.data_fullpath=[nodenameeff ' *1e6 for W; and ' nodenameeff2 ' *1e3 for eV'];
nbh_energy_data_tdi = tdi(nodenameeff2);
gdat_data.nbi.energy = nbh_energy_data_tdi.data*1e3; % for eV
gdat_data.nbi2.energy = nbh_energy_data_tdi.data*1e3; % for eV
% add to main with linear interpolation and 0 for extrapolated values
ij=[isfinite(gdat_data.nbi.data)];
gdat_data.data(:,end+1) = interpos(-21,gdat_data.nbi.t(ij),gdat_data.nbi.data(ij),gdat_data.t);
ij=[isfinite(gdat_data.nbi2.data)];
gdat_data.data(:,end+1) = interpos(-21,gdat_data.nbi2.t(ij),gdat_data.nbi2.data(ij),gdat_data.t);
gdat_data.x(end+1) = size(gdat_data.data,2);
gdat_data.label{end+1}=gdat_data.nbi.label;
gdat_data.label{end+1}=gdat_data.nbi2.label;
end
end
if any(strmatch('dnbi',gdat_data.gdat_params.source))
......@@ -2550,24 +2550,24 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
nbi_neutral_power_tot = nb2_data_tdi.data.*1e6; % in W
ij = nbi_neutral_power_tot<100;
nbi_neutral_power_tot(ij) = 0.;
gdat_data.nbi.data = nbi_neutral_power_tot; % at this stage p_gyro is in kW'
gdat_data.nbi.units = 'W';
gdat_data.nbi.dim{1}=nb2_data_tdi.dim{1};
gdat_data.nbi.dimunits{1}=nb2_data_tdi.dimunits{1};
gdat_data.nbi.t=gdat_data.nbi.dim{1};
gdat_data.nbi.x=[];
gdat_data.nbi.data_fullpath=[nodenameeff];
gdat_data.nbi.label='P_{dnbi}';
gdat_data.nbi.help = nb2_data_tdi.help;
gdat_data.dnbi.data = nbi_neutral_power_tot; % at this stage p_gyro is in kW'
gdat_data.dnbi.units = 'W';
gdat_data.dnbi.dim{1}=nb2_data_tdi.dim{1};
gdat_data.dnbi.dimunits{1}=nb2_data_tdi.dimunits{1};
gdat_data.dnbi.t=gdat_data.dnbi.dim{1};
gdat_data.dnbi.x=[];
gdat_data.dnbi.data_fullpath=[nodenameeff];
gdat_data.dnbi.label='P_{dnbi}';
gdat_data.dnbi.help = nb2_data_tdi.help;
nodenameeff2 = '\RESULTS::DNBI:ENERGY';
gdat_data.nbi.data_fullpath=[nodenameeff ' *1e6 for W; and ' nodenameeff2 ' *1e3 for eV'];
gdat_data.dnbi.data_fullpath=[nodenameeff ' *1e6 for W; and ' nodenameeff2 ' *1e3 for eV'];
nbh_energy_data_tdi = tdi(nodenameeff2);
gdat_data.nbi.energy = nbh_energy_data_tdi.data*1e3; % for eV
gdat_data.dnbi.energy = nbh_energy_data_tdi.data*1e3; % for eV
% add to main with linear interpolation and 0 for extrapolated values
ij=[isfinite(gdat_data.nbi.data)];
gdat_data.data(:,end+1) = interpos(-21,gdat_data.nbi.t(ij),gdat_data.nbi.data(ij),gdat_data.t);
ij=[isfinite(gdat_data.dnbi.data)];
gdat_data.data(:,end+1) = interpos(-21,gdat_data.dnbi.t(ij),gdat_data.dnbi.data(ij),gdat_data.t);
gdat_data.x(end+1) = size(gdat_data.data,2);
gdat_data.label{end+1}=gdat_data.nbi.label;
gdat_data.label{end+1}=gdat_data.dnbi.label;
end
end
% add all to last index of .data(:,i)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment