From 72313e5bdbd423f601e9eec6390c2a05f3ead6aa Mon Sep 17 00:00:00 2001 From: Olivier Sauter <olivier.sauter@epfl.ch> Date: Thu, 23 Nov 2006 09:49:45 +0000 Subject: [PATCH] in case jpfdat does not exist git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@1901 d63d8f72-b253-0410-a779-e742ad2e26cf --- JET/loadJETdata.m | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/JET/loadJETdata.m b/JET/loadJETdata.m index fbc0ed9d..43e1d62e 100644 --- a/JET/loadJETdata.m +++ b/JET/loadJETdata.m @@ -486,25 +486,29 @@ 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 -%%%% 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 + a=which('jpfdat'); + if isempty(a) + [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); % Convert from raw sxr data to W/m^2 - trace.data(i,:) = a' * vconvert(i); - trace.t=t'; + % 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 + else + 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 end trace.dim=[{[starti:endi]'} ; {trace.t}]; trace.dimunits=[{'channels'} ; {'time [s]'}]; -- GitLab