Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AMPS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant David Meadors
AMPS
Commits
6fc124e0
Commit
6fc124e0
authored
12 years ago
by
Grant David Meadors
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
postProcessing.m
+64
-27
64 additions, 27 deletions
postProcessing.m
with
64 additions
and
27 deletions
postProcessing.m
+
64
−
27
View file @
6fc124e0
...
...
@@ -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
9
3
3e6
])
xlim
([
931e6
9
7
3e6
])
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
9
3
3e6
])
xlim
([
931e6
9
7
3e6
])
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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment