load_LH_tsbase_yp

PURPOSE ^

SYNOPSIS ^

function [flag,LH_out] = load_LH_tsbase_yp(shotnum,certif,shotime,tmin,tmax,basestr);

DESCRIPTION ^

   Load processed experimental data (THYB treatment) of the tokamak Tore
   Supra

   by Y. Peysson (CEA/DSM/IRFM,yves.peysson@cea.fr) and J. Decker (CEA/DSM/IRFM,joan.decker@cea.fr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function  [flag,LH_out] = load_LH_tsbase_yp(shotnum,certif,shotime,tmin,tmax,basestr);
0002 %
0003 %   Load processed experimental data (THYB treatment) of the tokamak Tore
0004 %   Supra
0005 %
0006 %   by Y. Peysson (CEA/DSM/IRFM,yves.peysson@cea.fr) and J. Decker (CEA/DSM/IRFM,joan.decker@cea.fr)
0007 %
0008 method = 'spline';
0009 flag = 1;
0010 %
0011 if strcmp(basestr,'TS'),
0012     %
0013     shotnum = str2num(shotnum) + certif/10;  
0014     %
0015     %
0016     % Load LH power and phase
0017     %
0018     [LH_in.Plh_C2,LH_in.t_Plh_C2] = tsbase(shotnum,'GPHYB%1');%LH power from C2 antenna (MW)
0019     [LH_in.Plh_C3,LH_in.t_Plh_C3] = tsbase(shotnum,'GPHYB%2');%LH power from C3 antenna (MW)
0020     [LH_in.phaselh_C2,LH_in.t_phaselh_C2] = tsbase(shotnum,'GPHASHYB%1');%LH phasing from C2 antenna (deg)
0021     [LH_in.phaselh_C3,LH_in.t_phaselh_C3] = tsbase(shotnum,'GPHASHYB%2');%LH phasing from C2 antenna (deg)
0022     %
0023     % Time averaging between tmin and tmax
0024     %
0025     if ~isempty(LH_in.Plh_C2),
0026         Plh_C2_tmin = interp_tprof_time_fxdrg(LH_in.t_Plh_C2,LH_in.Plh_C2,tmin,method);%Time interpolation
0027         Plh_C2_tmax = interp_tprof_time_fxdrg(LH_in.t_Plh_C2,LH_in.Plh_C2,tmax,method);%Time interpolation
0028         dt_Plh_C2 = [tmin;LH_in.t_Plh_C2(find((LH_in.t_Plh_C2 > tmin).*(LH_in.t_Plh_C2 < tmax)));tmax];
0029         LH_out.Plh_C2 = mean([Plh_C2_tmin;LH_in.Plh_C2(find((LH_in.t_Plh_C2 > tmin).*(LH_in.t_Plh_C2 < tmax)),:);Plh_C2_tmax]);%Mean value
0030     %
0031         phaselh_C2_tmin = interp_tprof_time_fxdrg(LH_in.t_phaselh_C2,LH_in.phaselh_C2,tmin,method);%Time interpolation
0032         phaselh_C2_tmax = interp_tprof_time_fxdrg(LH_in.t_phaselh_C2,LH_in.phaselh_C2,tmax,method);%Time interpolation
0033         dt_phaselh_C2 = [tmin;LH_in.t_phaselh_C2(find((LH_in.t_phaselh_C2 > tmin).*(LH_in.t_phaselh_C2 < tmax)));tmax];
0034         LH_out.phaselh_C2 = mean([phaselh_C2_tmin;LH_in.phaselh_C2(find((LH_in.t_phaselh_C2 > tmin).*(LH_in.t_phaselh_C2 < tmax)),:);phaselh_C2_tmax]);%Mean value
0035         LH_out.npar_C2 = 1.83 + LH_out.phaselh_C2/200;%From A. Ekedahl using SWANN output (5/7/2004)
0036     %
0037         Plh_C3_tmin = interp_tprof_time_fxdrg(LH_in.t_Plh_C3,LH_in.Plh_C3,tmin,method);%Time interpolation
0038         Plh_C3_tmax = interp_tprof_time_fxdrg(LH_in.t_Plh_C3,LH_in.Plh_C3,tmax,method);%Time interpolation
0039         dt_Plh_C3 = [tmin;LH_in.t_Plh_C3(find((LH_in.t_Plh_C3 > tmin).*(LH_in.t_Plh_C3 < tmax)));tmax];
0040         LH_out.Plh_C3 = mean([Plh_C3_tmin;LH_in.t_Plh_C3(find((LH_in.Plh_C3 > tmin).*(LH_in.t_Plh_C3 < tmax)),:);Plh_C3_tmax]);%Mean value
0041     %
0042         phaselh_C3_tmin = interp_tprof_time_fxdrg(LH_in.t_phaselh_C3,LH_in.phaselh_C3,tmin,method);%Time interpolation
0043         phaselh_C3_tmax = interp_tprof_time_fxdrg(LH_in.t_phaselh_C3,LH_in.phaselh_C3,tmax,method);%Time interpolation
0044         dt_phaselh_C3 = [tmin;LH_in.t_phaselh_C3(find((LH_in.t_phaselh_C3 > tmin).*(LH_in.t_phaselh_C3 < tmax)));tmax];
0045         LH_out.phaselh_C3 = mean([phaselh_C3_tmin;LH_in.phaselh_C3(find((LH_in.t_phaselh_C3 > tmin).*(LH_in.t_phaselh_C3 < tmax)),:);phaselh_C3_tmax]);%Mean value
0046         LH_out.npar_C3 = 2.03 + (LH_out.phaselh_C3 + 90)/310;%From A. Ekedahl using SWANN output (5/7/2004)
0047     else
0048         LH_out.Plh_C2 = '';
0049         LH_out.phaselh_C2 = '';
0050         LH_out.npar_C2 = '';
0051         LH_out.Plh_C3 = '';
0052         LH_out.phaselh_C3 = '';
0053         LH_out.npar_C3 = '';
0054         flag = 0;
0055     end
0056 else
0057     disp('Not yet implemented for this machine.')
0058     return
0059 end
0060

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.