0001 function [antenna] = build_aloha_power_spectrum_yp(sc,edge_ne,rc,optim,dkepath,scheduler)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 remote = dkepath.remote(scheduler.remnum);
0013
0014 if isempty(rc)
0015
0016 job = matstandardjob_jd('runmat');
0017
0018 sc.antenna.a_ampl = sc.antenna.a_ampl(1,:)';
0019 sc.antenna.a_phase = sc.antenna.a_phase(1,:)';
0020
0021 sc.plasma.ne0 = edge_ne;
0022
0023 [err,job,sc_out] = matremote_jd('aloha_scenario',{sc},remote,job);
0024
0025 if isempty(err)
0026
0027 clear job
0028
0029 antenna.aloha = sc_out;
0030
0031 else
0032 return
0033 end
0034 else
0035
0036 remote.timeout = 0;
0037
0038 sc_temp = sc;
0039
0040 for ii = 1:size(sc.antenna.a_ampl,1)
0041
0042 job = matstandardjob_jd('runmat');
0043 job.remtimout = 0;
0044
0045 sc_temp.antenna.a_ampl = sc.antenna.a_ampl(ii,:)';
0046 sc_temp.antenna.a_phase = sc.antenna.a_phase(ii,:)';
0047
0048 rc_temp = rc(ii,:)';
0049
0050 [err,job,dummy] = matremote_jd('aloha_process_yp',{sc_temp,rc_temp,optim},remote,job);
0051
0052 if isempty(err)
0053
0054 if isempty(job.remote.host)
0055 disp(['ALOHA job for row #',int2str(ii),'/',int2str(size(sc.antenna.a_ampl,1)),' has been launched on the local host to find density in front of the grill consistent with RC'])
0056 else
0057 disp(['ALOHA job for row #',int2str(ii),'/',int2str(size(sc.antenna.a_ampl,1)),' has been launched on host : ',job.remote.host,' to find density in front of the grill consistent with RC'])
0058 end
0059
0060 antenna.job{ii} = job;
0061
0062 else
0063 return
0064 end
0065 end
0066 end