Home > cbassSouthFunctions > CJCThesisFunctions > hartrao > longTermPowerSpectra.m

longTermPowerSpectra

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 
0013 scheduleString='noiseDiodeOffStare'
0014 offsetStart = 2.0/24; %time from start of scan to begin reading data
0015 offsetEnd =3/24; % time from start of scan to end reading data
0016 t1=extract_obslog(logfile,scheduleString,'08-Dec-2012:12:00:00','15-Feb-2013:12:00:00')
0017 
0018 
0019 t=t1;%[t1;t2;t3];
0020 %t=[t1;t2;t3];
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 %split the data into manageable sections
0030 aa=[];
0031 tsplit=[];
0032 % for i=1:length(t)
0033 %     startt=tt(i,1);
0034 %     endt=tt(i,2);
0035 %     scan_time=endt-startt;
0036 %     while (scan_time > max_time/24)
0037 %       aa=[aa;[startt startt+max_time/24]];
0038 %       startt=startt+(max_time+0.00001)/24;
0039 %       scan_time=endt-startt;
0040 %     end
0041 %     aa=[aa;[startt endt]];
0042 %
0043 % end
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 %make new time data section to avoid huge data sections
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 for i=1:numscans
0081     %i=2
0082     d=read_arcSouth(tsplit{i,1},tsplit{i,2});
0083     [dataFreqRoach,dataTimeRoach,dataTimeTempLs,dataTimeTempCryo]=generatePowerSpectra(d,0);
0084     string=[tsplit{i,1},'->',tsplit{i,2}]
0085     figure
0086     subplot(414)
0087     loglog(dataFreqRoach(:,1),dataFreqRoach(:,4))
0088     hold all
0089     loglog(dataFreqRoach(:,1),dataFreqRoach(:,5))
0090     grid on
0091     title('Polarisation')
0092     subplot(413)
0093     plot(dataTimeRoach(:,1),dataTimeRoach(:,2))
0094     hold all
0095     plot(dataTimeRoach(:,1),dataTimeRoach(:,3))
0096     %legend('RCP','LCP')
0097     xlabel('Time [Hr]')
0098     ylabel('BU')
0099     titlestring=['Time Series: ',scheduleString]
0100     title(titlestring)
0101     ylim(ylimTimePow)
0102     grid on
0103     subplot(412)
0104     plot(dataTimeTempCryo(:,1),dataTimeTempCryo(:,2))
0105     xlabel('Time [Hr]')
0106     ylabel('Temperature [K]')
0107     title('Load/Sky Temperature')
0108     grid on
0109     ylim(ylimTemp)
0110     subplot(411)
0111     loglog(dataFreqRoach(:,1),dataFreqRoach(:,2))
0112     hold all
0113     loglog(dataFreqRoach(:,1),dataFreqRoach(:,3))
0114     grid on
0115     legend('RCP','LCP','Location','SouthWest')
0116     xlabel('Time [Hr]')
0117     ylabel('BU')
0118     titlestring=['Noise Power Spec: ',tsplit{i,1},'->',tsplit{i,2},' : ',scheduleString]
0119     title(titlestring)
0120     ylim(ylimPow)
0121     filename=[tsplit{i,1},scheduleString];
0122     print('-depsc',filename)
0123     close all
0124 end

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