From 1f85370bfd2171f914d8822dcbbdfd3deec08d01 Mon Sep 17 00:00:00 2001 From: Olivier Sauter <olivier.sauter@epfl.ch> Date: Fri, 20 Aug 2010 12:31:52 +0000 Subject: [PATCH] add pgyro git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@2260 d63d8f72-b253-0410-a779-e742ad2e26cf --- crpptbx/TCV/loadTCVdata.m | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/crpptbx/TCV/loadTCVdata.m b/crpptbx/TCV/loadTCVdata.m index 4145ad92..915106a8 100644 --- a/crpptbx/TCV/loadTCVdata.m +++ b/crpptbx/TCV/loadTCVdata.m @@ -37,6 +37,7 @@ % 'MPX' = soft x-ray from wire chambers % 'IOH' = current in ohmic transformer coils IOH_1 % 'vloop' = loop voltage +% 'pgyro' = ECH power for each gyro(1:9) and total (10) % % 'xx_2 or xx_3' for Liuqe2 or 3: same as above for xx related to equilibrium % 'xx_-1 or xx_-1' for FBTE values (model or shot=-1 or shot>=100000): same as above for xx related to equilibrium @@ -199,7 +200,7 @@ TCVkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhovol'} {' {'delta'} {'deltatop'} {'deltabot'} {'neint'} ... {'ne'} {'te'} {'nerho'} {'terho'} {'nerhozshift'} {'terhozshift'} {'profnerho'} {'profterho'} ... {'neft'} {'teft'} {'neftav'} {'teftav'} ... - {'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'}]; + {'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'pgyro'}]; TCVsig.iip=strmatch('Ip',TCVkeywrdall,'exact'); TCVsig.izmag=strmatch('zmag',TCVkeywrdall,'exact'); TCVsig.irmag=strmatch('rmag',TCVkeywrdall,'exact'); @@ -232,6 +233,7 @@ TCVsig.iece=strmatch('ece',TCVkeywrdall,'exact'); TCVsig.iMPX=strmatch('MPX',TCVkeywrdall,'exact'); TCVsig.iIOH=strmatch('IOH',TCVkeywrdall,'exact'); TCVsig.ivloop=strmatch('vloop',TCVkeywrdall,'exact'); +TCVsig.ipgyro=strmatch('pgyro',TCVkeywrdall,'exact'); % For each keyword, specify which case to use. As most common is 'simpletdi', fill in with this and change % only indices needed. Usually use name of case same as keyword name @@ -254,6 +256,7 @@ TCVkeywrdcase(TCVsig.iece)=TCVkeywrdall(TCVsig.iece); TCVkeywrdcase(TCVsig.iMPX)=TCVkeywrdall(TCVsig.iMPX); TCVkeywrdcase(TCVsig.iIOH)=TCVkeywrdall(TCVsig.iIOH); TCVkeywrdcase(TCVsig.ivloop)=TCVkeywrdall(TCVsig.ivloop); +TCVkeywrdcase(TCVsig.ipgyro)=TCVkeywrdall(TCVsig.ipgyro); % Information about which dimension has time, always return 2D data as (x,t) array % as most are 1D arrays with time as first index, fill in with ones and change only those needed @@ -916,6 +919,25 @@ switch TCVkeywrdcase{index} mdsclose; error=0; + %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& + case 'pgyro' + % ECH power for each gyro(1:9) and total (10) + mdsopen(shot); + nodenameeff=[{'\results::toray.input:p_gyro'}]; + tracetdi=tdi(nodenameeff{:}); + trace.data=tracetdi.data; + trace.x=[]; + trace.t=tracetdi.dim{1}; + trace.dim=tracetdi.dim; + trace.dimunits=tracetdi.dimunits; + % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work + if any(strcmp(fieldnames(tracetdi),'units')) + trace.units=tracetdi.units; + end + trace.name=[num2str(shot) ';' nodenameeff]; + mdsclose; + error=0; + otherwise % eval(['!mailto_Andrea ''from loadTCVdata, data_type_eff= ' data_type_eff '''']) disp(['this data_type_eff' ' ' data_type_eff ' ' 'not yet programmed in loadTCVdata, ask Andrea.Scarabosio@epfl.ch']); -- GitLab