Skip to content
Snippets Groups Projects
Commit 38baf7fe authored by Olivier Sauter's avatar Olivier Sauter Committed by Antoine Merle
Browse files

avoid breaking if CXRS not available

parent 4bd82e3d
No related branches found
No related tags found
1 merge request!162Fix time out ids
...@@ -239,23 +239,32 @@ end ...@@ -239,23 +239,32 @@ end
%% ion struct %% ion struct
% assume only D if no CXRS (need to ask how to check if H...) % assume only D if no CXRS (need to ask how to check if H...)
params_eff_fit1.data_request = 'cxrs'; params_eff_fit1.data_request = 'cxrs';
temp_1d.cxrs_rho = gdat(params_cores_profiles.shot,params_eff_fit1); try
temp_1d_desc.cxrs_rho = params_eff_fit1.data_request; temp_1d.cxrs_rho = gdat(params_cores_profiles.shot,params_eff_fit1);
temp_1d_desc.cxrs_rho = params_eff_fit1.data_request;
catch
temp_1d.cxrs_rho.data = [];
temp_1d_desc.cxrs_rho = ['Problem with gdat ' params_eff_fit1.data_request ' ; no data'];
end
params_eff_fit1.data_request = 'results.conf:ti'; params_eff_fit1.data_request = 'results.conf:ti';
temp_1d.ti_conf_rho = gdat(params_cores_profiles.shot,params_eff_fit1); temp_1d.ti_conf_rho = gdat(params_cores_profiles.shot,params_eff_fit1);
temp_1d_desc.ti_conf_rho = params_eff_fit1.data_request; temp_1d_desc.ti_conf_rho = params_eff_fit1.data_request;
params_eff_fit1.data_request = 'results.conf:ni'; params_eff_fit1.data_request = 'results.conf:ni';
temp_1d.ni_conf_rho = gdat(params_cores_profiles.shot,params_eff_fit1); temp_1d.ni_conf_rho = gdat(params_cores_profiles.shot,params_eff_fit1);
temp_1d_desc.ni_conf_rho = params_eff_fit1.data_request; temp_1d_desc.ni_conf_rho = params_eff_fit1.data_request;
data_fullpath_raw = 'Ti(C sometimes B) from cxrs system 1 to 3'; if ~isempty(temp_1d.cxrs_rho.data)
temp_1d.ti.raw = temp_1d.cxrs_rho.ti.raw; data_fullpath_raw = 'Ti(C sometimes B) from cxrs system 1 to 3';
temp_1d.ti.raw.shot = temp_1d.cxrs_rho.shot;temp_1d.ti.raw.gdat_params = temp_1d.cxrs_rho.gdat_params; temp_1d.ti.raw = temp_1d.cxrs_rho.ti.raw;
temp_1d.ti.raw.x =temp_1d.cxrs_rho.ti.raw.rho; temp_1d.ti.raw.t =temp_1d.cxrs_rho.t; temp_1d.ti.raw.shot = temp_1d.cxrs_rho.shot;temp_1d.ti.raw.gdat_params = temp_1d.cxrs_rho.gdat_params;
if ~isempty(temp_1d.cxrs_rho.ti.raw.data) temp_1d.ti.raw.x =temp_1d.cxrs_rho.ti.raw.rho; temp_1d.ti.raw.t =temp_1d.cxrs_rho.t;
data_fullpath_fit = 'Ti from fit from cxrs thus Ti(C)'; if ~isempty(temp_1d.cxrs_rho.ti.raw.data)
temp_1d.ti.raw =get_grids_1d(temp_1d.ti.raw,2,1); data_fullpath_fit = 'Ti from fit from cxrs thus Ti(C)';
temp_1d.ti.raw =get_grids_1d(temp_1d.ti.raw,2,1);
else
data_fullpath_fit = 'Ti from fit in CONF node';
end
else else
data_fullpath_fit = 'Ti from fit in CONF node, using Te/Ti and equilibrium Wmhd'; data_fullpath_fit = 'Ti from fit in CONF node';
end end
temp_1d_desc.ti.raw = data_fullpath_fit; temp_1d_desc.ti.raw = data_fullpath_fit;
temp_1d.ti.fit = temp_1d.ti_conf_rho; temp_1d.ti.fit = temp_1d.ti_conf_rho;
...@@ -312,7 +321,7 @@ for it=1:length(ids_core_profiles.time) ...@@ -312,7 +321,7 @@ for it=1:length(ids_core_profiles.time)
ids_core_profiles.profiles_1d{it}.pressure_thermal = ids_core_profiles.profiles_1d{it}.pressure_ion_total ... ids_core_profiles.profiles_1d{it}.pressure_thermal = ids_core_profiles.profiles_1d{it}.pressure_ion_total ...
+ ids_core_profiles.profiles_1d{it}.electrons.pressure_thermal; + ids_core_profiles.profiles_1d{it}.electrons.pressure_thermal;
end end
if ~isempty(temp_1d.cxrs_rho.ti.fit.data) if ~isempty(temp_1d.cxrs_rho.data) && ~isempty(temp_1d.cxrs_rho.ti.fit.data)
it_raw = iround_os(temp_1d.ti.raw.t,ids_core_profiles.time); it_raw = iround_os(temp_1d.ti.raw.t,ids_core_profiles.time);
for it=1:length(ids_core_profiles.time) for it=1:length(ids_core_profiles.time)
% ids_core_profiles.profiles_1d{it}.ion{1}.temperature_fit = temp_1d.ti.fit(:,it_ti(it)); % ids_core_profiles.profiles_1d{it}.ion{1}.temperature_fit = temp_1d.ti.fit(:,it_ti(it));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment