Newer
Older
(no author)
committed
<%doc>
This Mako template builds the skeleton of html reports for glance.
Created by Eva Schiffer Nov 2011.
Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
</%doc>
<%!
(no author)
committed
import glance.report as report
import glance.constants as constants
(no author)
committed
%>
<%block name="htmlContent">
<html>
<head>
<title>${self.title()}</title>
tr th { background-color: white; }
tr:nth-child(even) { background-color: #EEE; }
table { border-collapse: collapse; }
td, th { padding-left: 0.5em; padding-right: 0.5em; }
(no author)
committed
</head>
<body>
<h1><%block name="title"/></h1>
(no author)
committed
<%block name="runIdentification">
## display information on the version, user, and machine that ran the report
<p>
(no author)
committed
% if constants.GLANCE_VERSION_INFO_KEY in runInfo :
report produced with ${runInfo[constants.GLANCE_VERSION_INFO_KEY]} <br>
(no author)
committed
% endif
(no author)
committed
analysis generated ${runInfo[constants.TIME_INFO_KEY]} by user ${runInfo[constants.USER_INFO_KEY]} on ${runInfo[constants.MACHINE_INFO_KEY]}
(no author)
committed
</p>
</%block>
<%block name="fileIdentification">
## show information on each of the files we're comparing (should only be two)
% for fileKey in sorted(list(files)) :
<% tempFileInfo = files[fileKey] %>
<p>
${fileKey}:
(no author)
committed
% if constants.DISPLAY_NAME_KEY in tempFileInfo :
${tempFileInfo[constants.DISPLAY_NAME_KEY]}
(no author)
committed
% endif
<blockquote>
(no author)
committed
path: ${tempFileInfo[constants.PATH_KEY]} <br>
md5sum for ${fileKey}: ${tempFileInfo[constants.MD5SUM_KEY]} <br>
last modified: ${tempFileInfo[constants.LAST_MODIFIED_KEY]}
(no author)
committed
</blockquote>
</p>
% endfor
</%block>
<%block name="configInfo">
## display info on the config file that was used, if one was
(no author)
committed
% if (constants.CONFIG_FILE_PATH_KEY in runInfo) and (runInfo[constants.CONFIG_FILE_PATH_KEY] is not None) :
(no author)
committed
<p>
A configuration file was used to control the production of this report.<br>
(no author)
committed
<%block name="configFileLink">
(no author)
committed
Please see <a href="./${runInfo[constants.CONFIG_FILE_NAME_KEY]}">this copy of the configuration file</a>
(no author)
committed
</%block>
for details.
</p>
<p>
<% wasFiltered = False %>
<%block name="additionalFilterInfo"></%block>
## display information about any data filtering on the lons/lats
(no author)
committed
% if (constants.LAT_FILTER_FUNCTION_A_KEY in runInfo) and (not (runInfo[constants.LAT_FILTER_FUNCTION_A_KEY] is None)) :
(no author)
committed
Note: The latitude in file A was filtered.<br>
<% wasFiltered = True %>
% endif
(no author)
committed
% if (constants.LAT_FILTER_FUNCTION_B_KEY in runInfo) and (not (runInfo[constants.LAT_FILTER_FUNCTION_B_KEY] is None)) :
(no author)
committed
Note: The latitude in file B was filtered.<br>
<% wasFiltered = True %>
% endif
(no author)
committed
% if (constants.LON_FILTER_FUNCTION_A_KEY in runInfo) and (not (runInfo[constants.LON_FILTER_FUNCTION_A_KEY] is None)) :
(no author)
committed
Note: The longitude in file A was filtered.<br>
<% wasFiltered = True %>
% endif
(no author)
committed
% if (constants.LON_FILTER_FUNCTION_B_KEY in runInfo) and (not (runInfo[constants.LON_FILTER_FUNCTION_B_KEY] is None)) :
(no author)
committed
Note: The longitude in file B was filtered.<br>
<% wasFiltered = True %>
% endif
## show an additional message if there was any filtering
% if wasFiltered :
Please see the original configuration file to view any data filtering functions.
% endif
</p>
% endif
</%block>
<%block name="lonlatInfo">
## if the lon/lat variables exist, display info on them
(no author)
committed
%if (constants.LATITUDE_NAME_KEY in runInfo) and (constants.LONGITUDE_NAME_KEY in runInfo) :
(no author)
committed
## display the latitude and longitude variable names
<p>
(no author)
committed
% if (constants.LAT_ALT_NAME_IN_B_KEY in runInfo) :
latitude in A: ${runInfo[constants.LATITUDE_NAME_KEY]}<br>
latitude in B: ${runInfo[constants.LAT_ALT_NAME_IN_B_KEY]}<br>
(no author)
committed
% else :
(no author)
committed
latitude: ${runInfo[constants.LATITUDE_NAME_KEY]} <br>
(no author)
committed
% endif
(no author)
committed
% if (constants.LON_ALT_NAME_IN_B_KEY in runInfo) :
longitude in A: ${runInfo[constants.LONGITUDE_NAME_KEY]}<br>
longitude in B: ${runInfo[constants.LON_ALT_NAME_IN_B_KEY]}<br>
(no author)
committed
% else :
(no author)
committed
longitude: ${runInfo[constants.LONGITUDE_NAME_KEY]}<br>
(no author)
committed
% endif
(no author)
committed
% if (constants.LON_LAT_EPSILON_KEY in runInfo) and (runInfo[constants.LON_LAT_EPSILON_KEY] >= 0.0) :
longitude/latitude comparison epsilon: ${runInfo[constants.LON_LAT_EPSILON_KEY]}<br>
(no author)
committed
% endif
</p>
## if there is a problem with the longitude/latitude correlation between the two files,
## make a nice big warning for the user
(no author)
committed
% if spatial.has_key(constants.LONLAT_NOT_EQUAL_COUNT_KEY) and (spatial[constants.LONLAT_NOT_EQUAL_COUNT_KEY] > 0) :
(no author)
committed
<p>
(no author)
committed
WARNING: ${spatial[constants.LONLAT_NOT_EQUAL_COUNT_KEY]} data points
(${report.make_formatted_display_string(spatial[constants.LONLAT_NOT_EQ_PERCENT_KEY])}% of all data)
(no author)
committed
show possible mismatch in values stored in file a
and file b longitude and latitude values. Depending on the degree of mismatch, some data value comparisons
in this report may be distorted or spatially nonsensical. Please consider re-running this report and including an
examination of your longitude and latitude variables with appropriate epsilons in order to analyze the significance
of the difference.<br>
## if we're showing images, link to graphs showing the problem
(no author)
committed
% if runInfo[constants.DO_MAKE_IMAGES_KEY] :
(no author)
committed
<%block name="lonlatInvalidImages">
<a href="./LonLatMismatch.A.png">
View mismatching points in A's lon/lat system
</a><br>
<a href="./LonLatMismatch.B.png">
View mismatching points in B's lon/lat system
</a>
</%block>
% endif
</p>
% endif
<%block name="spatialInvalidity"></%block>
## end of the if to display lon/lat info
% endif
</%block>
<%block name="comparedData"></%block>
<%block name="attrsInfo">
% if attributesInfo is not None and len(attributesInfo.keys()) > 0 :
## make a list of all the attributes we need to display
<%
allAttrKeys = set()
for fileKey in attributesInfo.keys() :
for attrKey in attributesInfo[fileKey].keys() :
allAttrKeys.add(attrKey)
%>
<%block name="attrsTitle">
<h3>Attributes</h3>
</%block>
<tr>
<th>Attribute Name</th>
## loop to add headers for all files
% for fileKey in sorted(attributesInfo.keys()) :
Eva Schiffer
committed
<th>${fileKey} Value</th>
% endfor
</tr>
## loop to put a line in the table for each attribute
% for attrKey in sorted(allAttrKeys) :
<tr>
<td>${attrKey}</td>
## loop to add values for each of the files
% for fileKey in sorted(attributesInfo.keys()) :
% if attrKey in attributesInfo[fileKey] :
<td>${attributesInfo[fileKey][attrKey]}</td>
% else :
<td></td>
% endif
% endfor
</tr>
% endfor
</table>
% endif
</%block>
(no author)
committed
</body>
</html>