diff --git a/gdat.m b/gdat.m index 1c56ff610a48197337aa695d3a4d3ad90d8f7e5f..e6956d3c624a68da4a820585c510268737bada73 100644 --- a/gdat.m +++ b/gdat.m @@ -20,12 +20,12 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin) % shot: shot number % data_type: type of the required data.( see above) % -% optional arguments valid for all values of data_type: +% optional arguments valid for all values of data_type (not passed on to loadMACHINEdata function): % % varargin{1}: 0 => no plot (default), 1 => plot % varargin{2}: machine name 'JET', 'TCV' (default) % -% Additional input arguments for specific traces +% Additional input arguments for specific traces (passed on to loadMACHINEdata function) % % data_type=sxr or ece: % varargin{3}: channel status 1= unread yet, 0= read @@ -78,10 +78,10 @@ machine='TCV'; if (nargineff>=4 & ~isempty(varargin{2})); machine=varargin{2}; end % load data from specified machine -if nargineff<=2 +if nargineff<=4 eval(['[trace,error,varargout] = load' machine 'data(shot,data_type);']); else - eval(['[trace,error,varargout] = load' machine 'data(shot,data_type,varargin);']); + eval(['[trace,error,varargout] = load' machine 'data(shot,data_type,varargin(3:end));']); end % PLOT DATA (if required)