Skip to content
Snippets Groups Projects
Commit 42e7e49c authored by Olivier Sauter's avatar Olivier Sauter
Browse files

new SXR

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@1899 d63d8f72-b253-0410-a779-e742ad2e26cf
parent c2d39e42
Branches
Tags
No related merge requests found
...@@ -486,41 +486,51 @@ switch JETkeywrdcase{index} ...@@ -486,41 +486,51 @@ switch JETkeywrdcase{index}
tracename=['db/j3-sxr<t' num2str(i) '/1' name_ext]; tracename=['db/j3-sxr<t' num2str(i) '/1' name_ext];
disp('Using T camera: Radius data probably wrong') disp('Using T camera: Radius data probably wrong')
end end
[a,x,t,d,e]=rda_eff(shot,ppftype,tracename); %%% [a,x,t,d,e]=rda_eff(shot,ppftype,tracename);
% Convert from raw sxr data to W/m^2 %%% % Convert from raw sxr data to W/m^2
if ~isempty(a) %%%% EDIT: on JET a is not empty on error
trace.data(i,:) = a * vconvert(i); %%%% if ~isempty(a)
trace.t=t; %%% if ~isempty(t)
if ~isempty(x) %%% trace.data(i,:) = a * vconvert(i);
trace.x(i,:)=x; %%% trace.t=t;
end %%% 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 end
error=e; trace.dim=[{[starti:endi]'} ; {trace.t}];
end trace.dimunits=[{'channels'} ; {'time [s]'}];
trace.dim=[{[starti:endi]'} ; {trace.t}]; trace.name=[ 'jpf/' num2str(shot) '/' 'db/j3-sxr<vXX' '/1' name_ext];
trace.dimunits=[{'channels'} ; {'time [s]'}]; end
trace.name=[ 'jpf/' num2str(shot) '/' 'db/j3-sxr<vXX' '/1' name_ext];
end end
% calculating intersection of the view lines with magnetics axis % calculating intersection of the view lines with magnetics axis
if strcmp(data_type_eff_noext,'sxR') if strcmp(data_type_eff_noext,'sxR')
if iloaded_data>0 if iloaded_data>0
if nargin>=5 & ~isempty(varargin{3}) if nargin>=5 & ~isempty(varargin{3})
zmag=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;
else else
varargout{1}={struct([])}; zmag=loadJETdata(shot,'zmag');
trace.R=[]; 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 end
radius.t=t;
varargout{1}={radius};
trace.R=radius.data;
else
varargout{1}={struct([])};
trace.R=[];
end end
end
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
case 'ece' case 'ece'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment