Home > lukes_code > southColdLoad > northColdLoad.m

northColdLoad

PURPOSE ^

startDate = '03-Dec-2014:20:47:53'

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

startDate = '03-Dec-2014:20:47:53'
endDate = '04-Dec-2014:00:59:03'

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %startDate = '03-Dec-2014:20:47:53'
0002 %endDate = '04-Dec-2014:00:59:03'
0003 
0004 %startDate = '12-Nov-2014:11:17:14'
0005 %endDate = '12-Nov-2014:12:46:24 '
0006 
0007 %startDate = '27-Nov-2014:14:21:13'
0008 %endDate = '27-Nov-2014:17:37:23'
0009 
0010 %startDate = '18-Aug-2014:11:31:32'
0011 %endDate = '18-Aug-2014:13:00:42'
0012 
0013 %startDate = '24-Oct-2013:19:14:05'
0014 %endDate = '24-Oct-2013:20:25:25'
0015 
0016 %startDate = '28-Jun-2013:02:46:53'
0017 %endDate = '28-Jun-2013:05:09:33'
0018 
0019 %startDate = '27-Jun-2013:19:53:04'
0020 %endDate = '27-Jun-2013:22:15:44'
0021 
0022 %Didn't work
0023 %startDate = '21-Jun-2013:17:12:10'
0024 %endDate = '21-Jun-2013:18:18:55'
0025 
0026 %Didn't Work
0027 %startDate = '21-Jun-2013:07:45:20'
0028 %endDate = '21-Jun-2013:08:15:45'
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 %d = reduceData( d )
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 %Difference, interpolate and fit line
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 % Where does line cross the x axis
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 % Plot a figure
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

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005