0001 function [hxrspec,hxrparam] = get_hxrspec_forLUKE_jd(basestr,shot,data_path)
0002
0003 if ~(strcmp(basestr,'TS') || strcmp(basestr,'WEST')),
0004 error('Function valid for TS or WEST for now')
0005 end
0006
0007 dkepath = load_structures_yp('dkepath','','');
0008 opt_gui = false;
0009 select.style = struct;
0010 scheduler.remnum = iselect_jd(dkepath.remprofiles,'Remote calculation mode (mdce_remote): ',opt_gui,select.style,1)-1;
0011 if scheduler.remnum > 1,
0012 remote = dkepath.remote(scheduler.remnum);
0013
0014 job = matstandardjob_jd('runmat');
0015 [err,job,shotdate] = matremote_jd('tsdate',{shot},remote,job);
0016 else
0017 disp('WARNING: direct connexion to the CEA network is necessary');
0018 [shotdate] = tsdate(shot);
0019 end
0020
0021 hxrspec = bremTSconvert_dke_yp(str2num(shotdate(1:2)),str2num(shotdate(4:5)),str2num(shotdate(7:10)));
0022
0023
0024
0025 hxrspec.alpha_hxr(hxrspec.beta_hxr > pi) = hxrspec.alpha_hxr(hxrspec.beta_hxr > pi) + pi;
0026 hxrspec.beta_hxr(hxrspec.beta_hxr > pi) = 2*pi - hxrspec.beta_hxr(hxrspec.beta_hxr > pi);
0027
0028 hxrspec.alpha_hxr(hxrspec.beta_hxr < 0) = hxrspec.alpha_hxr(hxrspec.beta_hxr < 0) + pi;
0029 hxrspec.beta_hxr(hxrspec.beta_hxr < 0) = - hxrspec.beta_hxr(hxrspec.beta_hxr < 0);
0030
0031 hxrspec.alpha_hxr(hxrspec.alpha_hxr < 0) = hxrspec.alpha_hxr(hxrspec.alpha_hxr < 0) + 2*pi;
0032 hxrspec.alpha_hxr(hxrspec.alpha_hxr > 2*pi) = hxrspec.alpha_hxr(hxrspec.alpha_hxr > 2*pi) - 2*pi;
0033
0034 hxrparam.mfactor = 1;
0035 hxrparam.method = 'spline';
0036 hxrparam.ns = 3000;
0037 hxrparam.n_gauleg = 35;
0038 hxrparam.epsi_gauleg = 1e-14;
0039
0040 hxrparam.kphot = hxrspec.kphot;
0041 hxrparam.kmin = hxrspec.kmin;
0042 hxrparam.kmax = hxrspec.kmax;
0043
0044 if nargout == 0,
0045
0046 if nargin < 3,
0047 data_path = './';
0048 end
0049
0050 data_file = ['HXR_',basestr,'_',num2str(shot),'.mat'];
0051
0052 save([data_path,data_file],'hxrspec','hxrparam');
0053
0054 end