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

correct power and energy node for NBH

parent 78565975
No related branches found
No related tags found
1 merge request!16Imas codecamp develop
Pipeline #17908 passed
......@@ -1991,11 +1991,10 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
end
end
if NBH_in_TCV
nodenameeff = '\ATLAS::NBH.DATA.MAIN_ADC:DATA';
nodenameeff = '\results::NBH:POWR_TCV';
nbh_data_tdi = tdi(nodenameeff);
if ~isempty(nbh_data_tdi.data) && ~ischar(nbh_data_tdi.data) && ~isempty(nbh_data_tdi.dim)
index_for_tot_pow = 37;
nbi_neutral_power_tot = nbh_data_tdi.data(:,index_for_tot_pow).*1e6; % in W
nbi_neutral_power_tot = nbh_data_tdi.data.*1e6; % in W
nbi_neutral_power_tot = max(nbi_neutral_power_tot,0.);
gdat_data.nbi.data = nbi_neutral_power_tot; % at this stage p_gyro is in kW'
gdat_data.nbi.units = 'W';
......@@ -2003,11 +2002,13 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
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 ', index ' num2str(index_for_tot_pow) ', CLC NEUTRAL POWER'];
gdat_data.nbi.data_fullpath=[nodenameeff];
gdat_data.nbi.label='P_{nbi}';
gdat_data.nbi.help = nbh_data_tdi.help;
index_for_energy = 33;
gdat_data.nbi.energy = nbh_data_tdi.data(:,index_for_energy);
nodenameeff2 = '\results::nbh:energy';
gdat_data.nbi.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
% 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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment