Skip to content
Snippets Groups Projects
Commit e4b79636 authored by Antoine Merle's avatar Antoine Merle
Browse files

Fix incomplete second profiles_1d/ion substructure.

parent 4c609bcb
Branches
Tags
1 merge request!40Ids tweaks
Pipeline #31205 passed
function [ids_core_profiles,ids_core_profiles_description,varargout] = tcv_get_ids_core_profiles(shot,ids_equil_empty, gdat_params,varargin);
function [ids_core_profiles,ids_core_profiles_description,varargout] = tcv_get_ids_core_profiles(shot,ids_equil_empty, gdat_params,varargin)
%
% [ids_core_profiles,ids_core_profiles_description,varargout] = tcv_get_ids_core_profiles(shot,ids_equil_empty,varargin);
%
......@@ -13,7 +13,7 @@ function [ids_core_profiles,ids_core_profiles_description,varargout] = tcv_get_i
%
error_bar = 'delta';
if exist('gdat_params') && isfield(gdat_params,'error_bar') && ~isempty(gdat_params.error_bar)
if exist('gdat_params','var') && isfield(gdat_params,'error_bar') && ~isempty(gdat_params.error_bar)
error_bar = gdat_params.error_bar;
end
......@@ -21,7 +21,7 @@ machine = 'tcv';
tens_time = -1;
tens_rho = -0.1;
if exist('gdat_params')
if exist('gdat_params','var')
[ids_core_profiles, params_cores_profiles] = tcv_ids_headpart(shot,ids_equil_empty,'cores_profiles','gdat_params',gdat_params,varargin{:});
else
[ids_core_profiles, params_cores_profiles] = tcv_ids_headpart(shot,ids_equil_empty,'cores_profiles',varargin{:});
......@@ -29,7 +29,7 @@ else
gdat_params = aa.gdat_params; % to get default params
end
params_eff_ref = gdat_params; params_eff_ref.doplot=0;
try;params_eff_ref=rmfield(params_eff_ref,'source');catch;end % make sure no source (from ids def)
try params_eff_ref=rmfield(params_eff_ref,'source');catch;end % make sure no source (from ids def)
ids_core_profiles_description = [];
......@@ -262,6 +262,9 @@ it_ti = iround_os(temp_1d.ti.fit.t,ids_core_profiles.time);
% assumed 1 impurity with Zp=6
Zp = 6.;
for it=1:length(ids_core_profiles.time)
% Duplicate ion substructure
ids_core_profiles.profiles_1d{it}.ion(1:2) = ids_core_profiles.profiles_1d{it}.ion(1);
ids_core_profiles.profiles_1d{it}.ion{1}.element{1}.a = 2.;
ids_core_profiles.profiles_1d{it}.ion{1}.element{1}.z_n = 1;
ids_core_profiles.profiles_1d{it}.ion{1}.element{1}.atoms_n = 1;
......@@ -351,7 +354,7 @@ for it=1:length(ids_core_profiles.time)
end
% cocos automatic transform
if exist('ids_generic_cocos_nodes_transformation_symbolic') == 2
if ~isempty(which('ids_generic_cocos_nodes_transformation_symbolic'))
[ids_core_profiles,cocoscoeff]=ids_generic_cocos_nodes_transformation_symbolic(ids_core_profiles,'core_profiles',gdat_params.cocos_in, ...
gdat_params.cocos_out,gdat_params.ipsign_out,gdat_params.b0sign_out,gdat_params.ipsign_in,gdat_params.b0sign_in, ...
gdat_params.error_bar,gdat_params.nverbose);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment