diff --git a/JET/loadJETdata.m b/JET/loadJETdata.m index 3e5675e28982c9ad18e62d1fdbbafa7dff8955ae..fbc0ed9d7c1968cc06335ed28413e67176bb3b6a 100644 --- a/JET/loadJETdata.m +++ b/JET/loadJETdata.m @@ -486,41 +486,51 @@ switch JETkeywrdcase{index} tracename=['db/j3-sxr<t' num2str(i) '/1' name_ext]; disp('Using T camera: Radius data probably wrong') end - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - % Convert from raw sxr data to W/m^2 - if ~isempty(a) - trace.data(i,:) = a * vconvert(i); - trace.t=t; - if ~isempty(x) - trace.x(i,:)=x; - end +%%% [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); +%%% % Convert from raw sxr data to W/m^2 +%%%% EDIT: on JET a is not empty on error +%%%% if ~isempty(a) +%%% if ~isempty(t) +%%% trace.data(i,:) = a * vconvert(i); +%%% trace.t=t; +%%% if ~isempty(x) +%%% trace.x(i,:)=x; +%%% end +%%% end +%%% error=e; +%%% end + disp(['Reading channel ' tracename]); + [a, t, nwds, title, unit, ier] = jpfdat(tracename, shot); + if ~ier + % Convert from raw sxr data to W/m^2 + trace.data(i,:) = a' * vconvert(i); + trace.t=t'; end - error=e; - end - trace.dim=[{[starti:endi]'} ; {trace.t}]; - trace.dimunits=[{'channels'} ; {'time [s]'}]; - trace.name=[ 'jpf/' num2str(shot) '/' 'db/j3-sxr<vXX' '/1' name_ext]; + trace.dim=[{[starti:endi]'} ; {trace.t}]; + trace.dimunits=[{'channels'} ; {'time [s]'}]; + trace.name=[ 'jpf/' num2str(shot) '/' 'db/j3-sxr<vXX' '/1' name_ext]; + end end - % calculating intersection of the view lines with magnetics axis - if strcmp(data_type_eff_noext,'sxR') - if iloaded_data>0 - if nargin>=5 & ~isempty(varargin{3}) - zmag=varargin{3}; - else - zmag=loadJETdata(shot,'zmag'); - end - zmageff=interp1(zmag.t,zmag.data,trace.t); - for i=starti:endi - radius.data(i,:)=2.848 + (2.172-zmageff') .* tan(-4.5/180.*3.14159 - atan2(0.99.*(i-18),35.31)); - end - radius.t=t; - varargout{1}={radius}; - trace.R=radius.data; + % calculating intersection of the view lines with magnetics axis + if strcmp(data_type_eff_noext,'sxR') + if iloaded_data>0 + if nargin>=5 & ~isempty(varargin{3}) + zmag=varargin{3}; else - varargout{1}={struct([])}; - trace.R=[]; + zmag=loadJETdata(shot,'zmag'); + end + zmageff=interp1(zmag.t,zmag.data,trace.t); + for i=starti:endi + radius.data(i,:)=2.848 + (2.172-zmageff') .* tan(-4.5/180.*3.14159 - atan2(0.99.*(i-18),35.31)); end + radius.t=t; + varargout{1}={radius}; + trace.R=radius.data; + else + varargout{1}={struct([])}; + trace.R=[]; end + end %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& case 'ece'