diff --git a/crpptbx/AUG/gdat_aug.m b/crpptbx/AUG/gdat_aug.m index ed1322890dbb89fa02283479b8f2506d89d186af..988cfeccda01eef4c71c61c72517c07e03060fae 100644 --- a/crpptbx/AUG/gdat_aug.m +++ b/crpptbx/AUG/gdat_aug.m @@ -898,6 +898,10 @@ elseif strcmp(mapping_for_aug.method,'switchcase') case {'equil'} % get equil params and time array in gdat_data.t [gdat_data,exp_name_eff,DIAG,NTIME_Lpf,NTIME,Lpf1_t,Lpf_SOL,M_Rmesh,N_Zmesh] = get_EQ_params(gdat_data); + if isempty(Lpf1_t) + disp('Lpf1_t is empty, probably no data, return') + return + end % since Lpf depends on time, need to load all first and then loop over time for easier mapping [qpsi,e]=rdaAUG_eff(shot,DIAG,'Qpsi',exp_name_eff,[],gdat_data.gdat_params.extra_arg_sf2sig); ndimrho = size(qpsi.data,2); @@ -2304,6 +2308,16 @@ function [gdat_data,exp_name_eff,DIAG,NTIME_Lpf,NTIME,Lpf1_t,Lpf_SOL,M_Rmesh,N_Z % get basic params to be able to read results in EQ-like shotfiles % M_Rmesh,N_Zmesh only needed for equil when 2D quantities are required % + +exp_name_eff = gdat_data.gdat_params.exp_name; +DIAG = []; +NTIME_Lpf = []; +NTIME = []; +Lpf1_t = []; +Lpf_SOL = []; +M_Rmesh = []; +N_Zmesh = []; + extra_arg_sf2sig_eff_string = ''; if ~strcmp(gdat_data.gdat_params.extra_arg_sf2sig,'[]') extra_arg_sf2sig_eff_string = [',' gdat_data.gdat_params.extra_arg_sf2sig]; @@ -2328,12 +2342,16 @@ Lpf_par = rdaAUG_eff(shot,DIAG,'Lpf',exp_name_eff,[],gdat_data.gdat_params.extra % since June, nb of time points in EQ results is not consistent with NTIME and time % It seems the first NTIME points are correct, so use this explicitely NTIME_Lpf = length(Lpf_par.value); -if (NTIME < NTIME_Lpf) +if ~isempty(NTIME) && ~isempty(NTIME_Lpf) && isnumeric(NTIME) && isnumeric(NTIME_Lpf) && (NTIME < NTIME_Lpf) if gdat_data.gdat_params.nverbose>=3; disp('WARNING: nb of times points smaller then equil results, use first NTIME points'); end -elseif (NTIME > NTIME_Lpf) +elseif ischar(NTIME) || ischar(NTIME_Lpf) || (NTIME > NTIME_Lpf) if gdat_data.gdat_params.nverbose >= 1 - disp('ERROR: nb of times points LARGER then equil results') - disp('this is unexpected, so stop there and ask Olivier.Sauter@epfl.ch') + if ischar(NTIME) || ischar(NTIME_Lpf) + disp(['probably no data, NTIME_Lpf = ' NTIME_Lpf]) + else + disp('ERROR: nb of times points LARGER then equil results') + disp('this is unexpected, so stop there and ask Olivier.Sauter@epfl.ch') + end end return end diff --git a/crpptbx/AUG/rdaAUG_eff.m b/crpptbx/AUG/rdaAUG_eff.m index c3343ccf8d8d9ecb6a322830b22b4889722ad10c..96998cd4758b709d7892a9792555b48587492b1d 100644 --- a/crpptbx/AUG/rdaAUG_eff.m +++ b/crpptbx/AUG/rdaAUG_eff.m @@ -200,7 +200,7 @@ if usemdsplus nb_surfaces_m1 = 40; nb_xpoints_m1 = 4; if strcmp(sigtype,'Lpf') - if (min(adata.data)<100000+3 && min(adata.data)~=0) || max(adata.data)>100000*20 + if (min(adata.data)<0*100000+3 && min(adata.data)~=0) || max(adata.data)>100000*20 keyboard disp(['seems to be a problem with Lpf assume 1 sol point and ' num2str(nb_surfaces_m1+1) ' surfaces']) adata.data(:) = 100000 + nb_surfaces_m1; diff --git a/crpptbx/gdat_plot.m b/crpptbx/gdat_plot.m index 58546d0cf6aa54bf05ad007ffac91e5a75d8a9a2..5b16e5f268ab956a5d015d838cd37f8dd8bf0789 100644 --- a/crpptbx/gdat_plot.m +++ b/crpptbx/gdat_plot.m @@ -81,7 +81,12 @@ if all(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty( if ~isfield(gdat_data,'shot'); return; end % allows to plot if just .t and .data exist title([gdat_data.gdat_params.machine ' #' num2str(gdat_data.shot)]); if isfield(gdat_data,'mapping_for') - xlabel(['time [' gdat_data.dimunits{gdat_data.mapping_for.(gdat_data.gdat_params.machine).gdat_timedim} ']']); + dimunits_x = gdat_data.dimunits{gdat_data.mapping_for.(gdat_data.gdat_params.machine).gdat_timedim}; + if ischar(dimunits_x) + xlabel(['time [' dimunits_x ']']); + else + xlabel(['time']); + end else xlabel(['time']); end diff --git a/crpptbx/test_all_requestnames.m b/crpptbx/test_all_requestnames.m index 0c53ba39add0a30a26b70bb71ad61cccbbaec75e..ad8db3efe8d3c4b70f424f7b90c30c035c0bb0fd 100644 --- a/crpptbx/test_all_requestnames.m +++ b/crpptbx/test_all_requestnames.m @@ -68,7 +68,12 @@ for ireq = 1:Nreq if ~ismember(myrequest,skip) % build request string - gdat_call{ireq} = sprintf(['gdat_' machine '(%d,''%s'',''doplot'',%d)'],shot,myrequest,doplot); + if strcmp(myrequest,'transp') + shotfile_user='PUETTI'; + gdat_call{ireq} = sprintf(['gdat_' machine '(%d,''%s'',''doplot'',%d,''exp_name'',''%s'')'],shot,myrequest,doplot,shotfile_user); + else + gdat_call{ireq} = sprintf(['gdat_' machine '(%d,''%s'',''doplot'',%d)'],shot,myrequest,doplot); + end % eval call [err(ireq),telaps(ireq),gdat_results{ireq}] = do_gdat_call(gdat_call{ireq},nverbose);