Home > cbassSouthFunctions > CJCThesisFunctions > powerSpectraL2CTerminated.m

powerSpectraL2CTerminated

PURPOSE ^

this is a script to plot out data over a long period of time from the

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 this is a script to plot out data over a long period of time from the
 Southern System
CJC 10 January 2013

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % this is a script to plot out data over a long period of time from the
0002 % Southern System
0003 %CJC 10 January 2013
0004 
0005 logfile = ([home, '/cbass_analysisSa/log/obs_logSa.html']);
0006 max_time=4%maximum length of each data section in hours
0007 start_scan=1; %which scan to start from in case it stops half way through
0008 %offsetStart = 2.2/24; %time from start of scan to begin reading data
0009 %offsetEnd =2.5/24; % time from start of scan to end reading data
0010 %t1=extract_obslog(logfile,'flipNoiseDiodeLong.sch','20-Nov-2012:01:00:00','9-Jan-2013:12:00:00')
0011 
0012 %d = read_arcSouth('13-Dec-2012:13:55:10','13-Dec-2012:14:40:00');%L2C terminated with cold 50 ohm loads
0013 %d = read_arcSouth('13-Dec-2012:20:55:10','13-Dec-2012:23:55:00');%L2C terminated with cold 50 ohm loads
0014 %d = read_arcSouth('14-Dec-2012:16:00:10','14-Dec-2012:16:55:00');%L2C terminated with cold 50 ohm loads
0015 
0016 
0017 scheduleString='noiseDiodeOffStare'
0018 offsetStart = 0.0/24; %time from start of scan to begin reading data
0019 offsetEnd =0.6/24; % time from start of scan to end reading data
0020 t1=extract_obslog(logfile,scheduleString,'08-Dec-2012:12:00:00','14-Dec-2012:12:00:00')
0021 
0022 clear tt,t1,tsplit
0023 t1{1,1} = '13-Dec-2012:13:55:10'
0024 t1{1,2}= '13-Dec-2012:14:40:00'
0025 
0026 t=t1;%[t1;t2;t3];
0027 numVals = size(t)
0028 %t=[t1;t2;t3];
0029 for i=1:numVals(1)
0030     tstring=strtrim(t{i,1});
0031     tstring2=strtrim(t{i,2});
0032     tt(i,1) = datenum(tstring,'dd-mmm-yyyy:HH:MM:ss');
0033     tt(i,2) = datenum(tstring2,'dd-mmm-yyyy:HH:MM:ss');
0034     
0035 end
0036 
0037 %split the data into manageable sections
0038 aa=[];
0039 tsplit=[];
0040 % for i=1:length(t)
0041 %     startt=tt(i,1);
0042 %     endt=tt(i,2);
0043 %     scan_time=endt-startt;
0044 %     while (scan_time > max_time/24)
0045 %       aa=[aa;[startt startt+max_time/24]];
0046 %       startt=startt+(max_time+0.00001)/24;
0047 %       scan_time=endt-startt;
0048 %     end
0049 %     aa=[aa;[startt endt]];
0050 %
0051 % end
0052 
0053 for i=1:numVals(1)
0054     startt=tt(i,1);
0055     endt=tt(i,2);
0056     scan_time=endt-startt;
0057     if(24*scan_time>0.2)
0058         aa=[aa;[startt+offsetStart startt+offsetEnd]];
0059     end
0060 end
0061 
0062 %make new time data section to avoid huge data sections
0063 for i=1:length(aa)
0064     tsplit{i,1}=datestr(aa(i,1),'dd-mmm-yyyy:HH:MM:ss');
0065     tsplit{i,2}=datestr(aa(i,2),'dd-mmm-yyyy:HH:MM:ss');
0066 end
0067 
0068 %numscans=size(tsplit);
0069 i=0;
0070 n=0;
0071 time1=[];
0072 time2=[];
0073 for i=start_scan:numVals(1)
0074     try
0075             time1{i}=tsplit{i,1};
0076             time2{i}=tsplit{i,2};
0077             disp(['\n\n\n Starting New Scan'])
0078     catch
0079             print 'hello'
0080     end
0081 end
0082 
0083 i=3;
0084 %%%%%%%
0085 ylimTemp=[9.995 12.005];
0086 ylimPow = [1e-5 1e2]
0087 ylimTimePow=[-200 200]
0088 for i=1:numVals(1)
0089     %i=2
0090     d=read_arcSouth(tsplit{i,1},tsplit{i,2});
0091     [dataFreqRoach,dataTimeRoach,dataTimeTempLs,dataTimeTempCryo]=generatePowerSpectra(d);
0092     timetemps=d.antenna0.thermal.utc-d.antenna0.thermal.utc(1);
0093     timelsTemps= timetemps([1:5:length(timetemps)]).*24;
0094     templs=d.antenna0.thermal.lsTemperatureSensors(:,2);
0095     string=[tsplit{i,1},'->',tsplit{i,2}]
0096     figure
0097     subplot(414)
0098     loglog(dataFreqRoach(:,1),dataFreqRoach(:,4))
0099     hold all
0100     loglog(dataFreqRoach(:,1),dataFreqRoach(:,5))
0101     grid on
0102     title('Polarisation')
0103     subplot(413)
0104     plot(dataTimeRoach(:,1),dataTimeRoach(:,2))
0105     hold all
0106     plot(dataTimeRoach(:,1),dataTimeRoach(:,3))
0107     %legend('RCP','LCP')
0108     xlabel('Time [Hr]')
0109     ylabel('BU')
0110     titlestring=['Time Series: ',scheduleString]
0111     title(titlestring)
0112     ylim(ylimTimePow)
0113     grid on
0114     subplot(412)
0115     %plot(dataTimeTempCryo(:,1),dataTimeTempCryo(:,2))
0116     ylimTemp=[mean(templs)-0.2 mean(templs)+0.2];
0117     plot(timelsTemps,templs)
0118     xlabel('Time [Hr]')
0119     ylabel('Temperature [K]')
0120     title('Load/Sky Temperature')
0121     grid on
0122     ylim(ylimTemp)
0123     subplot(411)
0124     loglog(dataFreqRoach(:,1),dataFreqRoach(:,2))
0125     hold all
0126     loglog(dataFreqRoach(:,1),dataFreqRoach(:,3))
0127     grid on
0128     legend('RCP','LCP','Location','SouthWest')
0129     xlabel('Time [Hr]')
0130     ylabel('BU')
0131     titlestring=['Noise Power Spec: ',tsplit{i,1},'->',tsplit{i,2},' : ',scheduleString]
0132     title(titlestring)
0133     ylim(ylimPow)
0134     filename=[tsplit{i,1},scheduleString];
0135     print('-depsc',filename)
0136     close all
0137 end

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