0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 startDate = '06-Jan-2015:16:42:39'
0032 endDate = '06-Jan-2015:20:53:49'
0033
0034
0035 startDate = '12-Nov-2014:11:17:14'
0036 endDate = '12-Nov-2014:12:46:24'
0037
0038
0039 startDate = '21-Jun-2013:08:32:15'
0040 endDate = '21-Jun-2013:10:21:55'
0041
0042
0043 startDate = '21-Jun-2013:13:40:40'
0044 endDate = '21-Jun-2013:14:51:10'
0045
0046
0047 startDate = '27-Jun-2013:19:53:04'
0048 endDate = '27-Jun-2013:22:15:44'
0049
0050
0051 startDate = '28-Jun-2013:02:46:53'
0052 endDate = '28-Jun-2013:05:09:33'
0053
0054
0055 d = read_arc( startDate,endDate )
0056 d = assembleAlphaStreams(d,'CLASSIC')
0057
0058
0059 I1_s1 = d.antenna0.receiver.switchData(:,1);
0060 I1_l1 = d.antenna0.receiver.switchData(:,2);
0061 I1_l2 = d.antenna0.receiver.switchData(:,3);
0062 I1_s2 = d.antenna0.receiver.switchData(:,4);
0063
0064 I2_s1 = d.antenna0.receiver.switchData(:,21);
0065 I2_l1 = d.antenna0.receiver.switchData(:,22);
0066 I2_l2 = d.antenna0.receiver.switchData(:,23);
0067 I2_s2 = d.antenna0.receiver.switchData(:,24);
0068
0069 loadTemp = d.antenna0.thermal.ccTemperatureLoad;
0070
0071
0072 I1_diff1 = I1_s1-I1_l1;
0073 I1_diff2 = I1_s2-I1_l2;
0074 I2_diff1 = I2_s1-I2_l1;
0075 I2_diff2 = I2_s2-I2_l2;
0076
0077 interp_ratio = length(I1_diff1)/length(loadTemp);
0078 diff_11 = I1_diff1( 1:interp_ratio:length(I1_diff1) );
0079 diff_12 = I1_diff1( 1:interp_ratio:length(I1_diff2) );
0080 diff_21 = I2_diff1( 1:interp_ratio:length(I2_diff1) );
0081 diff_22 = I2_diff2( 1:interp_ratio:length(I2_diff2) );
0082
0083 x = [ 1:1:length(diff_11) ]';
0084 p11 = polyfit( x,diff_11,1 );
0085 p12 = polyfit( x,diff_12,1 );
0086 p21 = polyfit( x,diff_21,1 );
0087 p22 = polyfit( x,diff_22,1 );
0088
0089
0090 ind11 = round( -p11(2)/p11(1) );
0091 ind12 = round( -p12(2)/p12(1) );
0092 ind21 = round( -p21(2)/p21(1) );
0093 ind22 = round( -p22(2)/p22(1) );
0094
0095 if ind11>length(loadTemp)
0096 temp11 = NaN
0097 else
0098 temp11 = loadTemp( ind11 );
0099 end
0100
0101 if ind12>length(loadTemp)
0102 temp12 = NaN
0103 else
0104 temp12 = loadTemp( ind12 );
0105 end
0106
0107 if ind21>length( loadTemp )
0108 temp21 = NaN
0109 else
0110 temp21 = loadTemp( ind21 );
0111 end
0112
0113 if ind22>length( loadTemp )
0114 temp22 = NaN
0115 else
0116 temp22 = loadTemp( ind22 );
0117 end
0118
0119
0120
0121 figure()
0122
0123 subplot( 321 )
0124 plot( diff_11 )
0125 hold()
0126 plot( x, polyval(p11,x) , 'color','k' )
0127 line( [min(x),max(x)], [0,0], 'color','k' )
0128 line( [ind11,ind11], [min(diff_11),max(diff_11)],'color','g' )
0129 title( 'I1 L1 1' )
0130
0131 subplot( 322 )
0132 plot( diff_12 )
0133 hold()
0134 plot( x, polyval(p12,x) , 'color','k' )
0135 line( [min(x),max(x)], [0,0], 'color','k' )
0136 line( [ind12,ind12], [min(diff_12),max(diff_12)],'color','g' )
0137 title( 'I1 L1 2' )
0138
0139 subplot( 323 )
0140 plot( diff_21 )
0141 hold()
0142 plot( x, polyval(p21,x) , 'color','k' )
0143 line( [min(x),max(x)], [0,0], 'color','k' )
0144 line( [ind21,ind21], [min(diff_21),max(diff_21)],'color','r' )
0145 title( 'I2 L2 1' )
0146
0147 subplot( 324 )
0148 plot( diff_22 )
0149 hold()
0150 plot( x, polyval(p22,x) , 'color','k' )
0151 line( [min(x),max(x)], [0,0], 'color','k' )
0152 line( [ind22,ind22], [min(diff_22),max(diff_22)],'color','r' )
0153 title( 'I2 L2 2' )
0154
0155 subplot( 325 )
0156 plot( loadTemp )
0157 line( [ind11,ind11], [min(loadTemp),max(loadTemp)],'color','g' )
0158 line( [min(x),max(x)], [temp11,temp11],'color','g' )
0159 line( [ind21,ind21], [min(loadTemp),max(loadTemp)],'color','r' )
0160 line( [min(x),max(x)], [temp21,temp21],'color','r' )
0161 ylabel( 'Kelvin' )
0162 ylim( [min(loadTemp), max(loadTemp)] )
0163 grid()
0164
0165 subplot( 326 )
0166 plot( loadTemp )
0167 line( [ind12,ind12], [min(loadTemp),max(loadTemp)],'color','g' )
0168 line( [min(x),max(x)], [temp12,temp12],'color','g' )
0169 line( [ind22,ind22], [min(loadTemp),max(loadTemp)],'color','r' )
0170 line( [min(x),max(x)], [temp22,temp22],'color','r' )
0171 ylim( [min(loadTemp), max(loadTemp)] )
0172 grid()
0173
0174 suptitle( startDate )
0175
0176
0177