Home > reduc > noiseStatsInDateRange.m

noiseStatsInDateRange

PURPOSE ^

SYNOPSIS ^

function [alphas fknees whites] = noiseStatsInDateRange(start_date,end_date,chunk_hours)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [alphas fknees whites] = noiseStatsInDateRange(start_date,end_date,chunk_hours)
0002 
0003 start_mjd=tstr2mjd(start_date);
0004 end_mjd=tstr2mjd(end_date);
0005 
0006 total_hours = (end_mjd-start_mjd)*24;
0007 
0008 %Do this in two hour chunks
0009 chunk_size = chunk_hours/24;
0010 nChunk = ceil(total_hours/2);
0011 
0012 whites=[];
0013 alphas=[];
0014 fknees=[];
0015 
0016 current_start=start_mjd;
0017 for i=1:nChunk,
0018     chunk_start = mjd2string(current_start);
0019     chunk_end = mjd2string(min(current_start+chunk_size,end_mjd));
0020     display(['noiseStatsInDateRange::' chunk_start '  to  ' chunk_end]);
0021 
0022     [d stages]=pipelinedData(pipe_read(chunk_start,chunk_end));
0023     [alpha fknee white errorFlags]=analyzeStareEvents(d);
0024     alpha(errorFlags<1)=nan;
0025     fknee(errorFlags<1)=nan;
0026     white(errorFlags<1)=nan;
0027     if (stages<4)
0028         alpha(:)=nan;
0029         fknee(:)=nan;
0030         white(:)=nan;        
0031     end
0032     alphas = [alphas alpha];
0033     fknees = [fknees fknee];
0034     whites = [whites white];
0035     
0036     current_start=current_start+chunk_size;
0037 
0038 end
0039     
0040 
0041 end

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