0001 function launch = imake_launch_TS_jd(data,l_opt)
0002
0003
0004
0005
0006 if nargin < 2,
0007 l_opt = NaN;
0008 end
0009
0010 if isnan(l_opt),
0011 l_opt = input('Select the launcher number? (1) top mirror - (2) central mirror : ');
0012 end
0013
0014 if isempty(l_opt) || ~isnumeric(l_opt) || ~any(l_opt == 1:2),
0015 disp('-----> Invalid launcher selection.');
0016 return
0017 end
0018
0019 freq = [118]*1e9;
0020
0021 if ~isempty(data),
0022
0023 if l_opt == 1,
0024
0025 yR_L = data.EC.RA1;
0026 yZ_L = data.EC.ZA1;
0027 yphi_L = 0;
0028
0029 if data.EC.phiA1 > 0,
0030 yalpha_L = data.EC.phiA1*pi/180 - pi;
0031 else
0032 yalpha_L = data.EC.phiA1*pi/180 + pi;
0033 end
0034
0035 ybeta_L = pi/2 - data.EC.thetaA1*pi/180;
0036
0037 yP_L = data.EC.PA1;
0038
0039 else
0040
0041 yR_L = data.EC.RA2;
0042 yZ_L = data.EC.ZA2;
0043 yphi_L = 0;
0044
0045 if data.EC.phiA2 > 0,
0046 yalpha_L = data.EC.phiA2*pi/180 - pi;
0047 else
0048 yalpha_L = data.EC.phiA2*pi/180 + pi;
0049 end
0050 ybeta_L = pi/2 - data.EC.thetaA2*pi/180;
0051
0052 yP_L = data.EC.PA2;
0053
0054 end
0055
0056 else
0057
0058
0059
0060
0061
0062 yR_L = 3.5300;
0063
0064 if l_opt == 1,
0065
0066 yZ_L = 0.2000;
0067
0068 else
0069
0070 yZ_L = 0;
0071
0072 end
0073
0074 yphi_L = 0;
0075
0076 yalpha_L = input('provide the angle alpha (with R) [deg] (0 < alpha < 360) [180] : ');
0077
0078 if isempty(yalpha_L),
0079 yalpha_L = 180;
0080 end
0081
0082 if ~isnumeric(yalpha_L) || (yalpha_L < 0) || (yalpha_L > 360),
0083 disp('-----> Invalid angle alpha.');
0084 return
0085 end
0086
0087 if yalpha_L > 180,
0088 yalpha_L = yalpha_L - 360;
0089 end
0090
0091 yalpha_L = yalpha_L*pi/180;
0092
0093 ybeta_L = input('provide the angle beta (with Z) [deg] (0 < alpha < 180) [90] : ');
0094
0095 if isempty(ybeta_L),
0096 ybeta_L = 90;
0097 end
0098
0099 if ~isnumeric(ybeta_L) || (ybeta_L < 0) || (ybeta_L > 180),
0100 disp('-----> Invalid angle beta.');
0101 return
0102 end
0103
0104 ybeta_L = ybeta_L*pi/180;
0105
0106 yP_L = input('provide the beam power [MW] : ');
0107
0108 if isempty(yP_L) || ~isnumeric(yP_L),
0109 disp('-----> Invalid power.');
0110 return
0111 end
0112
0113 yP_L = yP_L*1e6;
0114
0115 end
0116
0117 id = ['EC_L',num2str(l_opt)];
0118
0119 launch.id = id;
0120 launch.yR_L = yR_L;
0121 launch.yZ_L = yZ_L;
0122 launch.yphi_L = yphi_L;
0123 launch.yalpha_L = yalpha_L;
0124 launch.ybeta_L = ybeta_L;
0125
0126 launch.omega_rf = freq*2*pi;
0127
0128 launch.yP_L = yP_L;
0129
0130
0131