0001 function longTermTimeSeries(timeStart,timeEnd,scanLength,plotFile,timeStyle)
0002
0003
0004
0005
0006
0007
0008
0009
0010 opengl software
0011
0012
0013 dateStart = datenum(timeStart,'dd-mmm-yyyy:HH:MM:SS')
0014 dateEnd = datenum(timeEnd,'dd-mmm-yyyy:HH:MM:SS')
0015
0016 currentTimeStart = dateStart;
0017 a=figure('visible','off')
0018 b=figure('visible','off')
0019 set(a,'renderer','zbuffer')
0020 set(b,'renderer','zbuffer')
0021 while(currentTimeStart <=dateEnd)
0022
0023 currentTimeEnd = currentTimeStart+scanLength/24;
0024
0025 currentTimeStartString = datestr(currentTimeStart,'dd-mmm-yyyy:HH:MM:SS')
0026 currentTimeEndString = datestr(currentTimeEnd,'dd-mmm-yyyy:HH:MM:SS')
0027
0028
0029 try
0030 d=read_arcSouth(currentTimeStartString,currentTimeEndString)
0031
0032 timeRoach1=d.antenna0.roach1.utc;
0033 timeRoach2=d.antenna0.roach2.utc;
0034 timeTemps=d.antenna0.thermal.utcFast;
0035 timeServo=d.antenna0.servo.utcFast;
0036 [year, month, day, hour, minute, second] = mjd2date(timeRoach1);
0037 dateRoach1=[year, month, day, hour, minute, second];
0038 [year, month, day, hour, minute, second] = mjd2date(timeRoach2);
0039 dateRoach2=[year, month, day, hour, minute, second];
0040 [year, month, day, hour, minute, second] = mjd2date(timeTemps);
0041 dateTemps=[year, month, day, hour, minute, second];
0042 [year, month, day, hour, minute, second] = mjd2date(timeServo);
0043 dateServo=[year, month, day, hour, minute, second];
0044
0045 Roachtime1=datenum(dateRoach1);
0046 Roachtime2=datenum(dateRoach2);
0047 TempTime=datenum(dateTemps);
0048
0049 ServoTime=datenum(dateServo);
0050
0051
0052
0053 t1=Roachtime1;
0054 t2=Roachtime2 ;
0055
0056 figure(a)
0057 ax(1)=subplot(311)
0058 plot(t1,mean(d.antenna0.roach1.LL(:,7:55),2),'r')
0059 hold on
0060 plot(t1,mean(d.antenna0.roach1.load2(:,7:55),2),'b')
0061 plot(t1,mean(d.antenna0.roach1.RR(:,7:55),2),'c')
0062 plot(t1,mean(d.antenna0.roach1.load1(:,7:55),2),'g')
0063 title('Roach 1 Intensity','Fontsize',16);
0064 xlabel('Time','Fontsize',14)
0065 ylabel('Backend Units','Fontsize',14)
0066 datetick('x','yyyy-mm-dd HH:MM:SS','keeplimits')
0067 xlim([dateStart,currentTimeEnd])
0068 h=legend('LCP1','loadL','RCP','LoadR')
0069 ylim('auto')
0070 grid on
0071
0072 ax(2)=subplot(312)
0073 plot(t2,mean(d.antenna0.roach2.LL(:,7:55),2),'r')
0074 hold on
0075 plot(t2,mean(d.antenna0.roach2.load2(:,7:55),2),'b')
0076 plot(t2,mean(d.antenna0.roach2.RR(:,7:55),2),'c')
0077 plot(t2,mean(d.antenna0.roach2.load1(:,7:55),2),'g')
0078 title('Roach 2 Intensity','Fontsize',16);
0079 xlabel('Time','Fontsize',14)
0080 ylabel('Backend Units','Fontsize',14)
0081 datetick('x','yyyy-mm-dd HH:MM:SS','keeplimits')
0082 xlim([dateStart,currentTimeEnd])
0083 h=legend('LCP1','loadL','RCP','LoadR')
0084 grid on
0085 ylim('auto')
0086
0087 ax(3)=subplot(313)
0088
0089 plot(t1,mean(d.antenna0.roach1.Q(:,7:55),2),'r')
0090 hold on
0091 plot(t1,mean(d.antenna0.roach1.U(:,7:55),2),'b')
0092 plot(t2,mean(d.antenna0.roach2.Q(:,7:55),2),'c')
0093 plot(t2,mean(d.antenna0.roach2.U(:,7:55),2),'g')
0094 title('Polarization','Fontsize',16);
0095 xlabel('Time','Fontsize',14)
0096 ylabel('Backend Units','Fontsize',14)
0097 datetick('x','yyyy-mm-dd HH:MM:SS','keeplimits')
0098 h=legend('Q1','U1','Q2','U2')
0099 xlim([dateStart,currentTimeEnd])
0100 grid on
0101 ylim('auto')
0102
0103
0104 figure(b)
0105 subplot(311)
0106 plot(TempTime,d.antenna0.thermal.ccTemperatureLoadFast,'.r')
0107 hold on
0108 title('Cold Load','Fontsize',16);
0109 xlabel('Time','Fontsize',14)
0110 ylabel('Temperature [K]','Fontsize',14)
0111 datetick('x','yyyy-mm-dd HH:MM:SS','keeplimits')
0112 xlim([dateStart,currentTimeEnd])
0113 grid on
0114
0115 subplot(312)
0116 plot(ServoTime,d.antenna0.servo.az,'.r')
0117 hold on
0118 title('Azimuth Position','Fontsize',16);
0119 xlabel('Time','Fontsize',14)
0120 ylabel('degrees','Fontsize',14)
0121 datetick('x','yyyy-mm-dd HH:MM:SS','keeplimits')
0122 xlim([dateStart,currentTimeEnd])
0123 grid on
0124
0125 subplot(313)
0126 plot(ServoTime,d.antenna0.servo.el,'.r')
0127 hold on
0128 title('Elevation Position','Fontsize',16);
0129 xlabel('Time','Fontsize',14)
0130 ylabel('degrees','Fontsize',14)
0131 datetick('x','yyyy-mm-dd HH:MM:SS','keeplimits')
0132 xlim([dateStart,currentTimeEnd])
0133 grid on
0134
0135
0136
0137
0138 currentTimeStart = currentTimeStart+scanLength/24;
0139 figure(a)
0140
0141 catch
0142 disp('Error reading data\n')
0143 currentTimeStart = currentTimeStart+scanLength/24;
0144 end
0145
0146 end
0147
0148 filename1=strcat(plotFile,'_data.ps')
0149 filename2=strcat(plotFile,'_hous.ps')
0150 print(figure(b),'-dpsc',filename2)
0151 print(figure(a),'-dpsc',filename1)
0152
0153 close(figure(a))
0154 close(figure(b))
0155
0156
0157
0158
0159
0160