Skip to content
Snippets Groups Projects
Commit 6fc124e0 authored by Grant David Meadors's avatar Grant David Meadors
Browse files

Made modifications to the postProcessing script to scale to a full science run

parent b37e546e
No related branches found
No related tags found
No related merge requests found
......@@ -4,41 +4,49 @@
% g m e a d o r s @ u m i c h . e d u
% Clear any existing 'Whole log' entries
system('rm eleutheriaLogs/whole_log.txt');
system('rm eleutheriaLogs/whole_out.txt');
system('rm eleutheriaLogs/whole_err.txt');
%system('rm eleutheriaLogs/whole_log.txt');
%system('rm eleutheriaLogs/whole_out.txt');
%system('rm eleutheriaLogs/whole_err.txt');
% Make sure that i in the bash script ranges to N-1, where N is the number of jobs
system('cat eleutheriaLogs/eleutheria.dag.log >> eleutheriaLogs/whole_log.txt');
system('for i in {1..200}; do cat eleutheriaLogs/eleutheria.out.eleutheria_$i >> eleutheriaLogs/whole_out.txt; done');
system('for i in {1..200}; do cat eleutheriaLogs/eleutheria.err.eleutheria_$i >> eleutheriaLogs/whole_err.txt; done');
%system('cat eleutheriaLogs/eleutheria.dag.log >> eleutheriaLogs/whole_log.txt');
%system('for i in {1..200}; do cat eleutheriaLogs/eleutheria.out.eleutheria_$i >> eleutheriaLogs/whole_out.txt; done');
%system('for i in {1..200}; do cat eleutheriaLogs/eleutheria.err.eleutheria_$i >> eleutheriaLogs/whole_err.txt; done');
% Read image sizes to make sure that none of the jobs is using too much memory
system('cat eleutheriaLogs/whole_log.txt | grep -n "Image size of job updated" > eleutheriaLogs/whole_imagesize.txt');
[status_image, result_image] = system('wc -l eleutheriaLogs/whole_imagesize.txt');
result_image_number = str2num(result_image(1:end-35));
%system('cat eleutheriaLogs/whole_log.txt | grep -n "Image size of job updated" > eleutheriaLogs/whole_imagesize.txt');
%[status_image, result_image] = system('wc -l eleutheriaLogs/whole_imagesize.txt');
%result_image_number = str2num(result_image(1:end-35));
imagesizelines = textread('eleutheriaLogs/whole_imagesize.txt', '%s');
imagesize = cell(size(imagesizelines));
%imagesizelines = textread('eleutheriaLogs/whole_imagesize.txt', '%s');
%imagesize = cell(size(imagesizelines));
% Only one out of ten elements is the actual image size
for ii = 10:10:(result_image_number*10)
imagesize{ii} = imagesizelines{ii};
end
%for ii = 10:10:(result_image_number*10)
% imagesize{ii} = imagesizelines{ii};
%end
% Remove empty cells, the remnants of text
imagesize = imagesize(~cellfun('isempty',imagesize));
%imagesize = imagesize(~cellfun('isempty',imagesize));
% Convert from strings to numbers
imagesize = cellfun(@str2num, imagesize);
%imagesize = cellfun(@str2num, imagesize);
% Find maximum
disp('Largest image size (in kilobytes)')
maximum_imagesize = max(imagesize);
disp(maximum_imagesize)
%disp('Largest image size (in kilobytes)')
%maximum_imagesize = max(imagesize);
%disp(maximum_imagesize)
for ii = 3:7
% Make file of range estimates files
system('ls /home/pulsar/public_html/feedforward/diagnostics/LHO/*/*Range* > eleutheriaLogs/whole_rangelist_LHO.txt');
systemCommandRangelist = ...
horzcat('ls /home/pulsar/public_html/feedforward/diagnostics/LHO/*L2-9', num2str(ii),...
'*/*Range* >> eleutheriaLogs/whole_rangelist_LHO.txt');
% Make file of range estimates
system('tail -q -n 1 /home/pulsar/public_html/feedforward/diagnostics/LHO/*/*Range* > eleutheriaLogs/whole_range_LHO.txt');
systemCommandRange = ...
horzcat('tail -q -n 1 /home/pulsar/public_html/feedforward/diagnostics/LHO/*L2-9', num2str(ii),...
'*/*Range* >> eleutheriaLogs/whole_range_LHO.txt');
system(systemCommandRangelist);
system(systemCommandRange);
end
% Load into Matlab
rangematrix = load('eleutheriaLogs/whole_range_LHO.txt');
......@@ -46,12 +54,12 @@ rangematrix = load('eleutheriaLogs/whole_range_LHO.txt');
figure(4000)
plot(rangematrix(:,1), rangematrix(:,2)/1e3, rangematrix(:,1), rangematrix(:,3)/1e3)
grid on
xlim([931e6 933e6])
xlim([931e6 973e6])
xlabel('GPS time (seconds)')
ylabel('Inspiral range (Megaparsecs)')
title('Inspiral range improvement versus time')
legend('Before feedforward','After feedforward')
inspiralGraphName = '/home/pulsar/public_html/feedforward/diagnostics/LHO/inspiralRange';
inspiralGraphName = '/home/gmeadors/public_html/feedforward/diagnostics/LHO/inspiralRange';
print('-dpdf', strcat(inspiralGraphName, '.pdf'));
print('-dpng', strcat(inspiralGraphName, '.png'));
close(4000)
......@@ -60,7 +68,7 @@ close(4000)
figure(5000)
plot(rangematrix(:,1), rangematrix(:, 4))
grid on
xlim([931e6 933e6])
xlim([931e6 973e6])
xlabel('GPS time (seconds)')
ylabel('After/Before feedforward inspiral range')
......@@ -75,6 +83,35 @@ legend(gainLegend)
inspiralGainGraphName = strcat(inspiralGraphName, 'Gain');
print('-dpdf', strcat(inspiralGainGraphName, '.pdf'));
print('-dpng', strcat(inspiralGainGraphName, '.png'));
% Close figure
close(5000)
% Try making smoothed plots
inspiralSmoothName = 'inspiralRangeSmooth';
figure(6000)
plot(rangematrix(:,1), smooth(rangematrix(:,2)/1e3,20), rangematrix(:,1), smooth(rangematrix(:,3)/1e3))
grid on
xlim([931e6 973e6])
xlabel('GPS time (seconds)')
ylabel('Inspiral range (Megaparsecs)')
title('Smoothed inspiral range improvement versus time')
beforeAvg = mean(rangematrix(:,2)/1e3);
afterAvg = mean(rangematrix(:,3)/1e3);
beforeNameSmooth = horzcat('Before feedforward: ', num2str(beforeAvg), ' Mpc arithmetric mean');
afterNameSmooth = horzcat('After feedforward: ', num2str(afterAvg), ' Mpc arithmetric mean');
legend(beforeNameSmooth, afterNameSmooth)
print('-dpdf', strcat(inspiralSmoothName, '.pdf'));
print('-dpng', strcat(inspiralSmoothName, '.png'));
close(6000)
figure(7000)
plot(rangematrix(:, 1), smooth(rangematrix(:, 4), 20))
grid on
xlim([931e6 973e6])
ylabel('Smoothed after/before feedforward inspiral range')
legend(gainLegend)
inspiralSmoothGainGraphName = strcat(inspiralSmoothName , 'Gain');
print('-dpdf', strcat(inspiralSmoothGainGraphName, '.pdf'));
print('-dpng', strcat(inspiralSmoothGainGraphName, '.png'));
close(7000)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment