0001
0002
0003
0004
0005 logfile = ([home, '/cbass_analysisSa/log/obs_logSa.html']);
0006 max_time=4
0007 start_scan=1;
0008
0009
0010
0011
0012
0013 scheduleString='noiseDiodeOffStare'
0014 offsetStart = 2.0/24;
0015 offsetEnd =3/24;
0016 t1=extract_obslog(logfile,scheduleString,'08-Dec-2012:12:00:00','15-Feb-2013:12:00:00')
0017
0018
0019 t=t1;
0020
0021 for i=1:length(t)
0022 tstring=strtrim(t{i,1});
0023 tstring2=strtrim(t{i,2});
0024 tt(i,1) = datenum(tstring,'dd-mmm-yyyy:HH:MM:ss');
0025 tt(i,2) = datenum(tstring2,'dd-mmm-yyyy:HH:MM:ss');
0026
0027 end
0028
0029
0030 aa=[];
0031 tsplit=[];
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 for i=1:length(t)
0046 startt=tt(i,1);
0047 endt=tt(i,2);
0048 scan_time=endt-startt;
0049 if(24*scan_time>4)
0050 aa=[aa;[startt+offsetStart startt+offsetEnd]];
0051 end
0052 end
0053
0054
0055 for i=1:length(aa)
0056 tsplit{i,1}=datestr(aa(i,1),'dd-mmm-yyyy:HH:MM:ss');
0057 tsplit{i,2}=datestr(aa(i,2),'dd-mmm-yyyy:HH:MM:ss');
0058 end
0059
0060 numscans=length(tsplit);
0061 i=0;
0062 n=0;
0063 time1=[];
0064 time2=[];
0065 for i=start_scan:numscans
0066 try
0067 time1{i}=tsplit{i,1};
0068 time2{i}=tsplit{i,2};
0069 disp(['\n\n\n Starting New Scan'])
0070 catch
0071 print 'hello'
0072 end
0073 end
0074
0075 i=3;
0076
0077 ylimTemp=[11.995 12.005];
0078 ylimPow = [1e-5 1e2]
0079 ylimTimePow=[-200 200]
0080 i=1
0081
0082 d=read_arcSouth(tsplit{i,1},tsplit{i,2});
0083 [dataFreqRoach,dataTimeRoach,dataTimeTempLs,dataTimeTempCryo]=generatePowerSpectra(d,0);
0084 save -v7.3 dataFreqRoach
0085 save -v7.3 dataTimeRoach
0086
0087 string=[tsplit{i,1},'->',tsplit{i,2}]
0088 figure
0089
0090 loglog(dataFreqRoach(:,1),dataFreqRoach(:,9))
0091 hold all
0092 h=loglog(dataFreqRoach(:,1),dataFreqRoach(:,8))
0093 set(h,'AlphaData',0.5);
0094 title('Intensity Stabilization','Fontsize',14)
0095 xlabel('Frequency [Hz]','Fontsize',12)
0096 ylabel('Backend Units','Fontsize',12)
0097 grid on
0098 legend('Unstabilized','Stabilized')
0099 print('-depsc','1_fIntensityPlot')
0100
0101 loglog(dataFreqRoach(:,1),dataFreqRoach(:,9))
0102
0103 title('Unstabilized Power Spectrum','Fontsize',18)
0104 xlabel('Frequency [Hz]','Fontsize',16)
0105 ylabel('Backend Units','Fontsize',16)
0106 grid on
0107 ylim([1e-4 1e2])
0108 print('-depsc','1_fIntensityPlot')
0109 close all
0110 loglog(dataFreqRoach(:,1),dataFreqRoach(:,8))
0111 title('Stabilized Power Spectrum','Fontsize',18)
0112 xlabel('Frequency [Hz]','Fontsize',16)
0113 ylabel('Backend Units','Fontsize',16)
0114 grid on
0115 ylim([1e-4 1e2])
0116 print('-depsc','StabilizedIntensityPlot')
0117
0118
0119
0120
0121 loglog(dataFreqRoach(:,1),dataFreqRoach(:,8))
0122 hold all
0123 loglog(dataFreqRoach(:,1),dataFreqRoach(:,4))
0124 title('Intensity vs Polarization','Fontsize',14)
0125 xlabel('Frequency [Hz]','Fontsize',12)
0126 ylabel('Backend Units','Fontsize',12)
0127 grid on
0128 legend('Intensity','Polarization')
0129 print('-depsc','1_fPowerPolPlot')
0130
0131 hold all
0132 loglog(dataFreqRoach(:,1),dataFreqRoach(:,7))
0133
0134 figure
0135 p(1) = patchline(dataFreqRoach(:,1),dataFreqRoach(:,2),'edgecolor','b','linewidth',2,'edgealpha',0.5);
0136
0137
0138 figure
0139 subplot(414)
0140 loglog(dataFreqRoach(:,1),dataFreqRoach(:,4))
0141 hold all
0142 loglog(dataFreqRoach(:,1),dataFreqRoach(:,5))
0143 grid on
0144 title('Polarisation')
0145 subplot(413)
0146 plot(dataTimeRoach(:,1),dataTimeRoach(:,2))
0147 hold all
0148 plot(dataTimeRoach(:,1),dataTimeRoach(:,3))
0149
0150 xlabel('Time [Hr]')
0151 ylabel('BU')
0152 titlestring=['Time Series: ',scheduleString]
0153 title(titlestring)
0154 ylim(ylimTimePow)
0155 grid on
0156 subplot(412)
0157 plot(dataTimeTempCryo(:,1),dataTimeTempCryo(:,2))
0158 xlabel('Time [Hr]')
0159 ylabel('Temperature [K]')
0160 title('Load/Sky Temperature')
0161 grid on
0162 ylim(ylimTemp)
0163 subplot(411)
0164 loglog(dataFreqRoach(:,1),dataFreqRoach(:,2))
0165 hold all
0166 loglog(dataFreqRoach(:,1),dataFreqRoach(:,3))
0167 grid on
0168 legend('RCP','LCP','Location','SouthWest')
0169 xlabel('Time [Hr]')
0170 ylabel('BU')
0171 titlestring=['Noise Power Spec: ',tsplit{i,1},'->',tsplit{i,2},' : ',scheduleString]
0172 title(titlestring)
0173 ylim(ylimPow)
0174 filename=[tsplit{i,1},scheduleString];
0175 print('-depsc',filename)
0176 close all
0177