Home > cbassSouthFunctions > CJCThesisFunctions > compareContinuousComparison.m

compareContinuousComparison

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 i=1
0081     %i=2
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     %legend('RCP','LCP')
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

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