proc_a_sdNpar_scan

PURPOSE ^

SYNOPSIS ^

function proc_a_sdNpar_scan(filename,savepath,opt,locproc_list)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function proc_a_sdNpar_scan(filename,savepath,opt,locproc_list)
0002 %
0003 if nargin < 3,
0004     opt.save = 1;
0005     opt.nr_dep = 0;
0006     opt.peak = 'n';
0007     opt.wave = 'n';
0008     opt.rho = 't';%%%% g?
0009     opt.print = -1;
0010 end
0011 %
0012 if nargin < 2,
0013     savepath = '';
0014 end
0015 %
0016 load(filename);
0017 %
0018 if nargin < 4,
0019     locproc_list = 1:na_sdNpar;
0020 end
0021 %
0022 nproc = length(locproc_list);
0023 %
0024 basestr = id_simul0(1:find(id_simul0 == '_',1,'first')-1);
0025 %
0026 if length(dkeparam.rho_S) == 1,
0027     nrho = dkeparam.rho_S + isfield(dkeparam,'rho0');
0028 else
0029     nrho = length(dkeparam.rho_S) - 1;
0030 end
0031 %
0032 zI = NaN(1,nproc);
0033 zP = NaN(1,nproc);
0034 zxrho = NaN(nproc,nrho);
0035 zxJ = NaN(nproc,nrho);
0036 zxP = NaN(nproc,nrho);
0037 %
0038 for iproc = 1:nproc,
0039     %
0040     id_simul = [id_simul0,'_',locid_simul];
0041     %
0042     for iw = 1:length(waves),
0043         id_simul = [id_simul,'_',ids_wave{iw},'_a_sdNpar_',num2str(a_sdNpar_list(locproc_list(iproc)))];
0044     end
0045     %
0046     data_proc = fproc_data(savepath,id_simul,opt);
0047     %
0048     if ~isempty(data_proc),
0049         %
0050         zI(iproc) = data_proc.scalar.I_tot;
0051         zP(iproc) = data_proc.scalar.p_rf_2piRp*2*pi*equil.Rp;
0052         zxJ(iproc,:) = data_proc.radial.J_tot;
0053         zxP(iproc,:) = data_proc.radial.P_rf;
0054         zxrho(iproc,:) = data_proc.radial.xrho;
0055 %         if opt.rho == 'g',
0056 %             zxrho(iproc,:) = data_proc.radial.xrhoG;
0057 %         elseif opt.rho == 'p',
0058 %             zxrho(iproc,:) = data_proc.radial.xrhoP;
0059 %         elseif opt.rho == 't',
0060 %             zxrho(iproc,:) = data_proc.radial.xrhoT;
0061 %         elseif opt.rho == 'v',
0062 %             zxrho(iproc,:) = data_proc.radial.xrhoV;
0063 %         else
0064 %             error('rho type not recognozed')
0065 %         end
0066         %
0067     end
0068     %
0069 end
0070 %
0071 style0 = 'none';
0072 style = '-';
0073 style2 = '--';
0074 marker = 'none';
0075 marker1 = '+';
0076 marker2 = 'o';
0077 marker3 = 's';
0078 marker4 = '.';
0079 color = NaN;
0080 color1 = 'k';
0081 color2 = 'r';
0082 color3 = 'b';
0083 color4 = 'g';
0084 color5 = 'm';
0085 color6 = 'c';
0086 %
0087 width = 0.5;
0088 width2 = 2;
0089 siz = 20;
0090 %
0091 red = 0.9;
0092 lspace = 0.7;
0093 lspace2 = 0.5;
0094 bspace = 0.7;
0095 bspace2 = 0.5;
0096 %
0097 xmask = find(~isnan(zI));
0098 %
0099 x = a_sdNpar_list;
0100 xlim = [min(a_sdNpar_list),max(a_sdNpar_list)];
0101 xtick = a_sdNpar_list;
0102 xlab = 'a_{sdN_{||}}';
0103 %
0104 figure(1),clf,set(1,'Name','Current')
0105 %
0106 ylab = 'I (kA)';
0107 ylim = NaN;
0108 tit = '';
0109 %
0110 %leg = {'LUKE','I_p - I_{boot}'};%
0111 %
0112 graph1D_jd(x(xmask),zI(xmask)*1e3,0,0,xlab,ylab,tit,NaN,xlim,ylim,style,marker2,color2,width2,siz,gca,red,lspace,bspace);
0113 %graph1D_jd(x(xmask),Iexp*1e3*ones(1,length(xmask)),0,0,'','','',NaN,xlim,ylim,style,marker1,color3,width,siz);
0114 %
0115 %set(gca,'ytick',ytick);
0116 set(gca,'xtick',xtick);
0117 %
0118 print_jd(opt.print,'Fig_D0_scan_I');
0119 %
0120 figure(2),clf,set(2,'Name','Current profiles')
0121 %
0122 xlab = 'r/a';
0123 xlim = [0:1];
0124 xtick = 0:0.2:1;
0125 %
0126 ylab = 'J (MA/m^2)';
0127 ylim = NaN;
0128 tit = '';
0129 %
0130 graph1D_jd(zxrho(xmask,:).',zxJ(xmask,:).',0,0,xlab,ylab,tit,NaN,xlim,ylim,style,marker,color,width,siz,gca,red,lspace,bspace);
0131 %
0132 %set(gca,'ytick',ytick);
0133 set(gca,'xtick',xtick);
0134 %
0135 print_jd(opt.print,'Fig_D0_scan_J');
0136 %
0137 figure(3),clf,set(3,'Name','PRF profiles')
0138 %
0139 xlab = 'r/a';
0140 xlim = [0:1];
0141 xtick = 0:0.2:1;
0142 %
0143 ylab = 'P_{rf} (MW/m^3)';
0144 ylim = NaN;
0145 tit = '';
0146 %
0147 graph1D_jd(zxrho(xmask,:).',zxP(xmask,:).',0,0,xlab,ylab,tit,NaN,xlim,ylim,style,marker,color,width,siz,gca,red,lspace,bspace);
0148 %
0149 %set(gca,'ytick',ytick);
0150 set(gca,'xtick',xtick);
0151 %
0152 print_jd(opt.print,'Fig_D0_scan_J');
0153 %
0154 % figure(2),clf,set(2,'Name','Current profile')
0155 % %
0156 % tit = 'J (kA/m^2)';
0157 % cont = 20;
0158 % fill = 1;
0159 % %
0160 % graph2D_jd(rho,x(xmask),dfrac(:,mask).',xlab,ylab,tit,xlim,ylim,fill,NaN,cont,0,style,color,width2,siz,red);
0161 % hold on
0162 % graph2D_jd(beta_diff_list(mask),alpha_diff_list,dfrac(:,mask).','','','',xlim,ylim,0,NaN,[-Inf,dfrac_exp],0,style,color1,width2,siz);
0163 % hold off
0164 % %
0165 % colorbar
0166 % %
0167 % set(gca,'ytick',ytick);
0168 % set(gca,'xtick',xtick);
0169 % %
0170 % print_jd(p_opt,['Fig_2D_abs_',shotid,printid]);
0171 %
0172 
0173 
0174 
0175 
0176 
0177 
0178 
0179 
0180 
0181 
0182 
0183 
0184 
0185 
0186 
0187 
0188

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