diff --git a/matlab/IMAS/gdat_imas.m b/matlab/IMAS/gdat_imas.m index 49722c68b2d4c4eb031b8ecaf499b9982d377a16..5978eb9f64f59823ec466a0fec2d7f38d854c417 100644 --- a/matlab/IMAS/gdat_imas.m +++ b/matlab/IMAS/gdat_imas.m @@ -405,6 +405,10 @@ elseif strcmp(mapping_for_imas.method,'switchcase') rmpath(ids_empty_path); return end + if ~isfield(params_eff,'fix_homogeneous') || isempty(params_eff.fix_homogeneous) + params_eff.fix_homogeneous = 0; + gdat_data.gdat_params.fix_homogeneous = params_eff.fix_homogeneous; + end ids_gen_ok = ~~exist('ids_gen','file'); if ~isfield(gdat_data.gdat_params,'error_bar') || isempty(gdat_data.gdat_params.error_bar) gdat_data.gdat_params.error_bar = 'delta'; @@ -483,11 +487,15 @@ elseif strcmp(mapping_for_imas.method,'switchcase') case -999999999 warning([ids_top_name '.ids_properties.homogeneous_time is not defined']); if isempty(gdat_data.(ids_top_name).time) - gdat_data.(ids_top_name).ids_properties.homogeneous_time = 0; - warning([ids_top_name '.ids_properties.homogeneous_time set to 0 since .time empty']); + if gdat_data.gdat_params.fix_homogeneous + gdat_data.(ids_top_name).ids_properties.homogeneous_time = 0; + warning([ids_top_name '.ids_properties.homogeneous_time set to 0 since .time empty']); + end elseif isfinite(gdat_data.(ids_top_name).time) - gdat_data.(ids_top_name).ids_properties.homogeneous_time = 1; - warning([ids_top_name '.ids_properties.homogeneous_time set to 1 since .time finite']); + if gdat_data.gdat_params.fix_homogeneous + gdat_data.(ids_top_name).ids_properties.homogeneous_time = 1; + warning([ids_top_name '.ids_properties.homogeneous_time set to 1 since .time finite']); + end end case 0 if ~isempty(gdat_data.(ids_top_name).time)