get_hxrspec_forLUKE_jd

PURPOSE ^

SYNOPSIS ^

function [hxrspec,hxrparam] = get_hxrspec_forLUKE_jd(basestr,shot,data_path)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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     %remote.link_mode=1;%ssh bridge otherwise 0 (direct ssh)
0014     job = matstandardjob_jd('runmat');
0015     [err,job,shotdate] = matremote_jd('tsdate',{shot},remote,job);%find remotely the shot date
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 % according to the correct definitions of alpha (-pi -> pi) and beta (0 -> pi)
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;%For the magnetic equilibrium
0035 hxrparam.method = 'spline';%For the magnetic equilibrium in the HXR calculations
0036 hxrparam.ns = 3000;%for chord integration
0037 hxrparam.n_gauleg = 35;%Number of Legendre polynomials for projections of cross-section and electron velocity distribution
0038 hxrparam.epsi_gauleg = 1e-14;%Accuracy of the Legendre projection
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

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