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

uid and seq per da name

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@1857 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 2f2cd933
No related branches found
No related tags found
No related merge requests found
...@@ -20,8 +20,9 @@ function [efitdata]=geteqdskJET(shot,time,nrg,nzg,savedir,deltaz,efitlab,uid,seq ...@@ -20,8 +20,9 @@ function [efitdata]=geteqdskJET(shot,time,nrg,nzg,savedir,deltaz,efitlab,uid,seq
% = -99: shift so that zmag=0 (thus deltaz=-zmag) % = -99: shift so that zmag=0 (thus deltaz=-zmag)
% otherwise: shift Z position by this amount % otherwise: shift Z position by this amount
% efitlab : 'efit' or 'eftm' (default: 'efit') % efitlab : 'efit' or 'eftm' (default: 'efit')
% uid: user id if different from main database (default: 'jetppf') % uid{i}: user id if different from main database (default: 'jetppf')
% seq: sequence number if not last one required (default: 0) % seq(i): sequence number if not last one required (default: 0)
% i: 1 (efit), 2 (chain2: lid2), 3 (equi)
% %
% varargin{1}: plot option: 0: do not plot contours, >0 plot contour with varargin{1} nb of contours (60 is good) % varargin{1}: plot option: 0: do not plot contours, >0 plot contour with varargin{1} nb of contours (60 is good)
% varargin{2}: efitdata in input (no need to load again if shot=efitdata.shot) % varargin{2}: efitdata in input (no need to load again if shot=efitdata.shot)
...@@ -44,13 +45,30 @@ end ...@@ -44,13 +45,30 @@ end
if nargin<=6 | isempty(efitlab) if nargin<=6 | isempty(efitlab)
efitlab='efit'; efitlab='efit';
end end
if nargin<=7 | isempty(uid) iexefit=1;
uid='jetppf'; iexchain2=2;
iexequi=3;
uid0{iexefit}='jetppf';
uid0{iexchain2}='jetppf';
uid0{iexequi}='jetppf';
seqd0(1:iexequi)=0;
if nargin>=8 & ~isempty(uid)
for i=length(uid)+1:length(uid0)
uid{i}=uid0{i}
end
else
uid=uid0;
end
if nargin>=9 & ~isempty(seqd)
for i=length(uid)+1:length(uid0)
seqd(i)=seqd(i);
end
else
seqd=seqd0;
end end
if nargin<=8 | isempty(seqd) for i=1:length(uid)
seqd=0; s_extra{i}=['?uid=' uid{i} '+seq=' num2str(seqd(i))];
end end
s_extra=['?uid=' uid '+seq=' num2str(seqd)];
ncont=0; ncont=0;
if nargin>=10 & ~isempty(varargin{1}) if nargin>=10 & ~isempty(varargin{1})
...@@ -71,49 +89,49 @@ end ...@@ -71,49 +89,49 @@ end
if iread==1 if iread==1
efitdata.shot=shot; efitdata.shot=shot;
% get data needed % get data needed
efitdata.Rbnd=gdat(shot,['ppf/' efitlab '/RBND' s_extra],0,'JET'); efitdata.Rbnd=gdat(shot,['ppf/' efitlab '/RBND' s_extra{iexefit}],0,'JET');
efitdata.tefit=efitdata.Rbnd.t; efitdata.tefit=efitdata.Rbnd.t;
efitdata.Zbnd=gdat(shot,['ppf/' efitlab '/ZBND' s_extra],0,'JET'); efitdata.Zbnd=gdat(shot,['ppf/' efitlab '/ZBND' s_extra{iexefit}],0,'JET');
efitdata.R0=gdat(shot,['ppf/' efitlab '/RGEO' s_extra],0,'JET'); efitdata.R0=gdat(shot,['ppf/' efitlab '/RGEO' s_extra{iexefit}],0,'JET');
efitdata.a=gdat(shot,['ppf/' efitlab '/CR0' s_extra],0,'JET'); efitdata.a=gdat(shot,['ppf/' efitlab '/CR0' s_extra{iexefit}],0,'JET');
% $$$ efitdata.Z0=gdat(shot,['ppf/' efitlab '/ZO' s_extra],0,'JET'); % $$$ efitdata.Z0=gdat(shot,['ppf/' efitlab '/ZO' s_extra{iexefit}],0,'JET');
efitdata.rmag=gdat(shot,['ppf/' efitlab '/rmag' s_extra],0,'JET'); efitdata.rmag=gdat(shot,['ppf/' efitlab '/rmag' s_extra{iexefit}],0,'JET');
efitdata.zmag=gdat(shot,['ppf/' efitlab '/zmag' s_extra],0,'JET'); efitdata.zmag=gdat(shot,['ppf/' efitlab '/zmag' s_extra{iexefit}],0,'JET');
efitdata.faxs=gdat(shot,['ppf/' efitlab '/faxs' s_extra],0,'JET'); efitdata.faxs=gdat(shot,['ppf/' efitlab '/faxs' s_extra{iexefit}],0,'JET');
efitdata.fbnd=gdat(shot,['ppf/' efitlab '/fbnd' s_extra],0,'JET'); efitdata.fbnd=gdat(shot,['ppf/' efitlab '/fbnd' s_extra{iexefit}],0,'JET');
efitdata.bvac=gdat(shot,['ppf/' efitlab '/bvac' s_extra],0,'JET'); efitdata.bvac=gdat(shot,['ppf/' efitlab '/bvac' s_extra{iexefit}],0,'JET');
efitdata.ip=gdat(shot,['ppf/' efitlab '/xip' s_extra],0,'JET'); efitdata.ip=gdat(shot,['ppf/' efitlab '/xip' s_extra{iexefit}],0,'JET');
efitdata.F=gdat(shot,['ppf/' efitlab '/F' s_extra],0,'JET'); efitdata.F=gdat(shot,['ppf/' efitlab '/F' s_extra{iexefit}],0,'JET');
efitdata.psin=efitdata.F.x; efitdata.psin=efitdata.F.x;
efitdata.P=gdat(shot,['ppf/' efitlab '/P' s_extra],0,'JET'); efitdata.P=gdat(shot,['ppf/' efitlab '/P' s_extra{iexefit}],0,'JET');
efitdata.Q=gdat(shot,['ppf/' efitlab '/Q' s_extra],0,'JET'); efitdata.Q=gdat(shot,['ppf/' efitlab '/Q' s_extra{iexefit}],0,'JET');
efitdata.kappa=gdat(shot,['ppf/' efitlab '/ELON' s_extra],0,'JET'); efitdata.kappa=gdat(shot,['ppf/' efitlab '/ELON' s_extra{iexefit}],0,'JET');
efitdata.q95=gdat(shot,['ppf/' efitlab '/q95' s_extra],0,'JET'); efitdata.q95=gdat(shot,['ppf/' efitlab '/q95' s_extra{iexefit}],0,'JET');
efitdata.btpd=gdat(shot,['ppf/' efitlab '/btpd' s_extra],0,'JET'); efitdata.btpd=gdat(shot,['ppf/' efitlab '/btpd' s_extra{iexefit}],0,'JET');
efitdata.bttd=gdat(shot,['ppf/' efitlab '/bttd' s_extra],0,'JET'); efitdata.bttd=gdat(shot,['ppf/' efitlab '/bttd' s_extra{iexefit}],0,'JET');
efitdata.btnd=gdat(shot,['ppf/' efitlab '/btnd' s_extra],0,'JET'); efitdata.btnd=gdat(shot,['ppf/' efitlab '/btnd' s_extra{iexefit}],0,'JET');
efitdata.btpm=gdat(shot,['ppf/' efitlab '/btpm' s_extra],0,'JET'); efitdata.btpm=gdat(shot,['ppf/' efitlab '/btpm' s_extra{iexefit}],0,'JET');
efitdata.bttm=gdat(shot,['ppf/' efitlab '/bttm' s_extra],0,'JET'); efitdata.bttm=gdat(shot,['ppf/' efitlab '/bttm' s_extra{iexefit}],0,'JET');
efitdata.btnm=gdat(shot,['ppf/' efitlab '/btnm' s_extra],0,'JET'); efitdata.btnm=gdat(shot,['ppf/' efitlab '/btnm' s_extra{iexefit}],0,'JET');
efitdata.xli=gdat(shot,['ppf/' efitlab '/xli' s_extra],0,'JET'); efitdata.xli=gdat(shot,['ppf/' efitlab '/xli' s_extra{iexefit}],0,'JET');
efitdata.sspr=gdat(shot,['ppf/' efitlab '/sspr' s_extra],0,'JET'); efitdata.sspr=gdat(shot,['ppf/' efitlab '/sspr' s_extra{iexefit}],0,'JET');
efitdata.sspi=gdat(shot,['ppf/' efitlab '/sspi' s_extra],0,'JET'); efitdata.sspi=gdat(shot,['ppf/' efitlab '/sspi' s_extra{iexefit}],0,'JET');
% add for profiles % add for profiles
efitdata.ti=gdat(shot,['ppf/TION/TI' s_extra],0,'JET'); efitdata.ti=gdat(shot,['ppf/TION/TI' s_extra{iexchain2}],0,'JET');
efitdata.pi=gdat(shot,['ppf/NION/DD' s_extra],0,'JET'); efitdata.pi=gdat(shot,['ppf/NION/DD' s_extra{iexchain2}],0,'JET');
efitdata.zef=gdat(shot,['ppf/NION/ZEF' s_extra],0,'JET'); efitdata.zef=gdat(shot,['ppf/NION/ZEF' s_extra{iexchain2}],0,'JET');
% add for calculating NTM parameters % add for calculating NTM parameters
ii=findstr('efit',efitlab); efitdata.bpol=gdat(shot,['ppf/equi/bpol' s_extra{iexequi}],0,'JET');
efitdata.bpol=gdat(shot,['ppf/equi' efitlab(ii+4:end) '/bpol' s_extra],0,'JET'); efitdata.bpo2=gdat(shot,['ppf/equi/bpo2' s_extra{iexequi}],0,'JET');
efitdata.qmag=gdat(shot,['ppf/' efitlab '/qmag' s_extra],0,'JET'); efitdata.qmag=gdat(shot,['ppf/' efitlab '/qmag' s_extra{iexefit}],0,'JET');
efitdata.lidrpe=gdat(shot,['ppf/lidr/pe' s_extra],0,'JET'); efitdata.lidrpe=gdat(shot,['ppf/lidr/pe'],0,'JET');
efitdata.nexav=gdat(shot,['ppf/nex/av' s_extra],0,'JET'); efitdata.nexav=gdat(shot,['ppf/nex/av'],0,'JET');
efitdata.nbi=gdat(shot,['ppf/nbi/ptot' s_extra],0,'JET'); efitdata.nbi=gdat(shot,['ppf/nbi/ptot'],0,'JET');
efitdata.icrh=gdat(shot,['ppf/icrh/ptot' s_extra],0,'JET'); efitdata.icrh=gdat(shot,['ppf/icrh/ptot'],0,'JET');
efitdata.ptot=gdat(shot,['ppf/mg3/yto' s_extra],0,'JET'); efitdata.ptot=gdat(shot,['ppf/mg3/yto'],0,'JET');
efitdata.halpha=gdat(shot,['jpf/dd/s3-ad35' s_extra],0,'JET'); efitdata.halpha=gdat(shot,['jpf/dd/s3-ad35'],0,'JET');
efitdata.n1=gdat(shot,['jpf/da/c1-g101' s_extra],0,'JET'); efitdata.n1=gdat(shot,['jpf/da/c1-g101'],0,'JET');
efitdata.n2=gdat(shot,['jpf/da/c1-g102' s_extra],0,'JET'); efitdata.n2=gdat(shot,['jpf/da/c1-g102'],0,'JET');
end end
tefit=efitdata.tefit; tefit=efitdata.tefit;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment