diff --git a/matlab/TCV_IMAS/tcv_get_ids_core_sources.m b/matlab/TCV_IMAS/tcv_get_ids_core_sources.m index d8ab9cead6bc3c3ec17b1886e4e53790f1e69b55..1ecd2167b47a00ae74b419065bed8a4e142c7867 100644 --- a/matlab/TCV_IMAS/tcv_get_ids_core_sources.m +++ b/matlab/TCV_IMAS/tcv_get_ids_core_sources.m @@ -395,7 +395,7 @@ if strcmp(hostname,'lac8.epfl.ch') else unix(sprintf('ssh $(whoami)@lac8 "ls /Lac8_D/ASTRA/ | grep ''%i'' && echo File for shotnumber exists! || echo File for shotnumber does not exist! && exit"',shot)); end - +rho_test = linspace(0,1,101); if numel(active_nbi)>0 for i_nbi = active_nbi % get tgrid (same for NBI1 & 2 if both active) from active_nbi(1) @@ -422,6 +422,7 @@ if numel(active_nbi)>0 p_nbi_injected_tmp = interpos(nbi_powers_tgrid,powers_gdat.(nbi_names{i_nbi}).data,nbi_tgrid_out); for ii = 1:nt_nbi_out ids_core_sources.source{last_index+i_nbi}.profiles_1d{ii}.time = nbi_tgrid_out(ii); + ids_core_sources.source{last_index+i_nbi}.profiles_1d{ii}.rho_tor_norm = rho_test; % globals ids_core_sources.source{last_index+i_nbi}.global_quantities{ii}.time = nbi_tgrid_out(ii); ids_core_sources.source{last_index+i_nbi}.global_quantities{ii}.power = p_nbi_injected_tmp(ii); @@ -442,6 +443,7 @@ if ~isempty(powers_gdat.dnbi) % find times where DNBI is on to define time grid with extra time slice just % before/after DNBI power and at start/end of shot itime_dnbi = find((powers_gdat.dnbi.data>0)); + rho_test = linspace(0,1,101); if ~isempty(itime_dnbi) if dnbi_powers_tgrid(itime_dnbi(end))>=ohm_tgrid(end) i_time_end = iround(dnbi_powers_tgrid,ohm_tgrid(end)); @@ -461,6 +463,7 @@ if ~isempty(powers_gdat.dnbi) p_dnbi_injected = interpos(dnbi_powers_tgrid,powers_gdat.dnbi.data,dnbi_tgrid_out); for ii = 1:nt_dnbi_out ids_core_sources.source{last_index+1}.profiles_1d{ii}.time = dnbi_tgrid_out(ii); + ids_core_sources.source{last_index+1}.profiles_1d{ii}.rho_tor_norm = rho_test; % globals ids_core_sources.source{last_index+1}.global_quantities{ii}.time = dnbi_tgrid_out(ii); ids_core_sources.source{last_index+1}.global_quantities{ii}.power = p_dnbi_injected(ii);