Skip to content
Snippets Groups Projects
Commit fe3728b0 authored by (no author)'s avatar (no author)
Browse files

added features to plot figures individual; to control threading for memory...

added features to plot figures individual; to control threading for memory clean up; new filter to allow limit data to bounds; > 1,000,000 trouble pts now plot as a contour; new glance library functions

git-svn-id: https://svn.ssec.wisc.edu/repos/glance/trunk@83 8a9318a1-56ba-4d59-b755-99d26321be01
parent 9afe26be
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
...@@ -15,6 +15,11 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved. ...@@ -15,6 +15,11 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved.
settings = {} settings = {}
# whether or not images should be generated and shown in the report # whether or not images should be generated and shown in the report
settings['shouldIncludeImages'] = True settings['shouldIncludeImages'] = True
# whether or not separate threads should be spawned to create each image
# for the purpose of controlling python's memory usage.
# this feature should not be used in Mac OSX owing to a bug in multithreading
# but at appears to work well in other Unix systems
settings['useThreadsToControlMemory'] = False
# should we create multiple processes to make more than one image at a time? # should we create multiple processes to make more than one image at a time?
# turning on this option can cause glance to use a very large amount of system # turning on this option can cause glance to use a very large amount of system
# resources (if your data set is particularly large, your machine may not have # resources (if your data set is particularly large, your machine may not have
......
...@@ -144,12 +144,22 @@ def rotate_indexes_right (data) : ...@@ -144,12 +144,22 @@ def rotate_indexes_right (data) :
data_new = data_new.reshape(new_shape) data_new = data_new.reshape(new_shape)
# move the old data into the new data shape # move the old data into the new data shape
for index1 in arange(old_shape[0]) : for index1 in range(old_shape[0]) :
for index2 in arange(old_shape[1]) : for index2 in range(old_shape[1]) :
for index3 in arange(old_shape[2]) : for index3 in range(old_shape[2]) :
data_new[index3, index1, index2] = data[index1, index2, index3] data_new[index3, index1, index2] = data[index1, index2, index3]
return data_new return data_new
def set_to_value_between_bounds(data, value_to_set_to, bottom_bound_exclusive, top_bound_exclusive) :
"""
Wherever the data is non-finite or outside the given bounds, set it to the given value.
"""
mask = (data < bottom_bound_exclusive) | (data > top_bound_exclusive) | (~ np.isfinite(data))
data[mask] = value_to_set_to
return data
if __name__=='__main__': if __name__=='__main__':
sys.exit(main()) sys.exit(main())
\ No newline at end of file
This diff is collapsed.
...@@ -114,8 +114,13 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved. ...@@ -114,8 +114,13 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved.
</p> </p>
% endif % endif
<% shouldIncludeImages = runInfo['shouldIncludeImages'] %> <%
% if shouldIncludeImages : shouldIncludeImages = runInfo['shouldIncludeImages']
plot_original = True
if 'do_plot_originals' in runInfo :
plot_original = runInfo['do_plot_originals']
%>
% if shouldIncludeImages and plot_original :
<h3>Original Data</h3> <h3>Original Data</h3>
<p> <p>
<a href="./${variableName}.A.png"><img src="./${variableName}.A.small.png"></a> <a href="./${variableName}.A.png"><img src="./${variableName}.A.small.png"></a>
...@@ -180,11 +185,25 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved. ...@@ -180,11 +185,25 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved.
% if shouldIncludeImages and (not hideComparisonImages) : % if shouldIncludeImages and (not hideComparisonImages) :
<p> <p>
<a href="./${variableName}.AbsDiff.png"><img src="./${variableName}.AbsDiff.small.png"></a> % if (not ('do_plot_abs_diff' in runInfo)) or (runInfo['do_plot_abs_diff']) :
<a href="./${variableName}.Diff.png"><img src="./${variableName}.Diff.small.png"></a> <a href="./${variableName}.AbsDiff.png"><img src="./${variableName}.AbsDiff.small.png"></a>
<a href="./${variableName}.Trouble.png"><img src="./${variableName}.Trouble.small.png"></a> % endif
<a href="./${variableName}.Hist.png"><img src="./${variableName}.Hist.small.png"></a>
<a href="./${variableName}.Scatter.png"><img src="./${variableName}.Scatter.small.png"></a> % if (not ('do_plot_sub_diff' in runInfo)) or (runInfo['do_plot_sub_diff']) :
<a href="./${variableName}.Diff.png"><img src="./${variableName}.Diff.small.png"></a>
% endif
% if (not ('do_plot_trouble' in runInfo)) or (runInfo['do_plot_trouble']) :
<a href="./${variableName}.Trouble.png"><img src="./${variableName}.Trouble.small.png"></a>
% endif
% if (not ('do_plot_histogram' in runInfo)) or (runInfo['do_plot_histogram']) :
<a href="./${variableName}.Hist.png"><img src="./${variableName}.Hist.small.png"></a>
% endif
% if (not ('do_plot_scatter' in runInfo)) or (runInfo['do_plot_scatter']) :
<a href="./${variableName}.Scatter.png"><img src="./${variableName}.Scatter.small.png"></a>
% endif
</p> </p>
% endif % endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment