Commit c8742875 authored by Eva Schiffer's avatar Eva Schiffer
Browse files

properly display variables that could not be compared in reports when the user...

properly display variables that could not be compared in reports when the user asks us to warn them about missing variables
parent e5438677
......@@ -61,6 +61,24 @@ def _get_all_commands_help_string (commands_dict, ) :
return to_return
def _make_error_var_entry(error_message, do_pass_fail=False,):
"""
Given an error message, make an appropriate entry for the variable info to be sent to the reports
"""
to_return = {
PASSED_EPSILON_PERCENT_KEY: None,
FINITE_SIMILAR_PERCENT_KEY: None,
R_SQUARED_COEFF_VALUE_KEY: None,
VARIABLE_RUN_INFO_KEY: None,
VAR_SHAPE_KEY: None,
VAR_SINGLE_VAL_KEY: None,
DID_VARIABLE_PASS_KEY: False if do_pass_fail else None,
VAR_ERROR_MSG_KEY: error_message,
}
return to_return
def _get_possible_files_from_dir (dir_path) :
"""given a path to a directory, return all the paths to files we think we can open in that directory
......@@ -207,12 +225,12 @@ def collocate_to_file_library_call(a_path, b_path, var_list=None,
sys.exit(1)
# get information about the names the user requested
finalNames, nameStats = config_organizer.resolve_names(aFile.file_object,
bFile.file_object,
defaultValues,
requestedNames,
usedConfigFile,
warnIfRequestedVarsUnavailable=runInfo[OPTIONS_WARN_MISSING_KEY],)
finalNames, nameStats, _ = config_organizer.resolve_names(aFile.file_object,
bFile.file_object,
defaultValues,
requestedNames,
usedConfigFile,
warnIfRequestedVarsUnavailable=runInfo[OPTIONS_WARN_MISSING_KEY],)
# return for lon_lat_data variables will be in the form
#{LON_KEY: longitude_data, LAT_KEY: latitude_data, INVALID_MASK_KEY: spaciallyInvalidMaskData}
......@@ -547,11 +565,11 @@ def report_one_input_library_call (a_path, var_list=None,
# get information about the names the user requested
nameStats = {}
finalNames, nameStats[POSSIBLE_NAMES_KEY] = config_organizer.resolve_names_one_file(aFile.file_object,
defaultValues, # TODO, might need a different default set
requestedNames,
usedConfigFile,
warnIfRequestedVarsUnavailable=runInfo[OPTIONS_WARN_MISSING_KEY],)
finalNames, nameStats[POSSIBLE_NAMES_KEY], missingNames = config_organizer.resolve_names_one_file(aFile.file_object,
defaultValues, # TODO, might need a different default set
requestedNames,
usedConfigFile,
warnIfRequestedVarsUnavailable=runInfo[OPTIONS_WARN_MISSING_KEY],)
# get info on the global attributes
globalAttrInfo = {}
......@@ -575,10 +593,16 @@ def report_one_input_library_call (a_path, var_list=None,
good_shape_from_lon_lat = None
if len(lon_lat_data) > 0:
good_shape_from_lon_lat = lon_lat_data[LON_KEY].shape
# store info about our variables for our main report page
variableInspections = {}
# if we're warning about missing variables, add those into our list now
if runInfo[OPTIONS_WARN_MISSING_KEY]:
for varNameTemp in missingNames:
variableInspections[varNameTemp] = _make_error_var_entry(missingNames[varNameTemp])
# go through each of the possible variables in our files
# and make a report section with images for whichever ones we can
variableInspections = { }
for displayName in finalNames:
# pull out the information for this variable analysis run
......@@ -586,11 +610,14 @@ def report_one_input_library_call (a_path, var_list=None,
# get the various names
technical_name, _, explanationName = _get_name_info_for_variable(displayName, varRunInfo)
# make sure that it's possible to load this variable
if not(aFile.file_object.is_loadable_type(technical_name)) :
LOG.warning(displayName + " is of a type that cannot be loaded using current file handling libraries included with Glance." +
" Skipping " + displayName + ".")
tmpMsg = displayName + " is of a type that cannot be loaded using current file handling libraries " \
"included with Glance. Skipping " + displayName + "."
LOG.warning(tmpMsg)
if runInfo[OPTIONS_WARN_MISSING_KEY]:
variableInspections[explanationName] = _make_error_var_entry(tmpMsg)
continue
LOG.info('analyzing: ' + explanationName)
......@@ -604,8 +631,11 @@ def report_one_input_library_call (a_path, var_list=None,
altVariableFileObject = dataobj.FileInfo(varRunInfo[VAR_FILTER_ALT_FILE_A_KEY]).file_object if VAR_FILTER_ALT_FILE_A_KEY in varRunInfo else None,
fileDescriptionForDisplay = "file A")
except Exception as ex :
LOG.warning(displayName + " data could not be loaded. This variable will not be included in the output report. " +
"The following error was encountered while trying to load this variable:\n" + str(ex))
tmpMsg = displayName + " data could not be loaded. This variable will not be included in the output report. " + \
"The following error was encountered while trying to load this variable:\n" + str(ex)
LOG.warning(tmpMsg)
if runInfo[OPTIONS_WARN_MISSING_KEY]:
variableInspections[explanationName] = _make_error_var_entry(tmpMsg)
continue
# get variable attribute information for this variable
......@@ -727,6 +757,7 @@ def report_one_input_library_call (a_path, var_list=None,
VARIABLE_RUN_INFO_KEY: varRunInfo,
VAR_SHAPE_KEY: tempShape,
VAR_SINGLE_VAL_KEY: tempValue,
VAR_ERROR_MSG_KEY: None,
}
LOG.info ('\tgenerating report for: ' + explanationName)
......@@ -744,6 +775,8 @@ def report_one_input_library_call (a_path, var_list=None,
+ 'longitude ' + str(good_shape_from_lon_lat) + ' and '
+ 'latitude ' + str(good_shape_from_lon_lat) + ' variables.')
LOG.warning(message)
if runInfo[OPTIONS_WARN_MISSING_KEY]:
variableInspections[explanationName] = _make_error_var_entry(message)
# the end of the loop to examine all the variables
......@@ -841,13 +874,13 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
sys.exit(1)
# get information about the names the user requested
finalNames, nameStats = config_organizer.resolve_names(aFile.file_object,
bFile.file_object,
defaultValues,
requestedNames,
usedConfigFile,
warnIfRequestedVarsUnavailable=
runInfo[OPTIONS_WARN_MISSING_KEY],)
finalNames, nameStats, missingNames = config_organizer.resolve_names(aFile.file_object,
bFile.file_object,
defaultValues,
requestedNames,
usedConfigFile,
warnIfRequestedVarsUnavailable=
runInfo[OPTIONS_WARN_MISSING_KEY],)
# get info on the global attributes
globalAttrInfo = {}
......@@ -886,14 +919,23 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
# FINITE_SIMILAR_PERCENT_KEY: percent with the same finiteness,
# R_SQUARED_COEFF_VALUE_KEY: the r squared correlation coefficient,
# VARIABLE_RUN_INFO_KEY: the detailed variable run information
# VAR_SHAPE_KEY: the shape of the variable data
# VAR_SINGLE_VAL_KEY: for single value data, the value (otherwise None)
# VAR_ERROR_MSG_KEY: if there was an error that stopped us from comparing this variable, the error message
# }
variableComparisons = { }
# we will also be hanging on to some variable stats for the concise reports
variableStatsCollection = { }
# if we are warning about missing variables, right away add those to our list of variable comparisons
if runInfo[OPTIONS_WARN_MISSING_KEY] :
for varNameTemp in missingNames :
variableComparisons[varNameTemp] = _make_error_var_entry(missingNames[varNameTemp], do_pass_fail=do_pass_fail,)
# go through each of the possible variables in our files
# and make a report section with images for whichever ones we can
for displayName in finalNames:
for displayName in finalNames :
try:
# pull out the information for this variable analysis run
varRunInfo = finalNames[displayName].copy()
......@@ -904,8 +946,11 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
# make sure that it's possible to load this variable
if not(aFile.file_object.is_loadable_type(technical_name)) or not(bFile.file_object.is_loadable_type(b_variable_technical_name)) :
LOG.warning(displayName + " is of a type that cannot be loaded using current file handling libraries included with Glance." +
" Skipping " + displayName + ".")
tmpMsg = displayName + " is of a type that cannot be loaded using current file handling libraries " \
"included with Glance. Skipping " + displayName + "."
LOG.warning(tmpMsg)
if runInfo[OPTIONS_WARN_MISSING_KEY] :
variableComparisons[explanationName] = _make_error_var_entry(tmpMsg, do_pass_fail=do_pass_fail,)
continue
LOG.info('analyzing: ' + explanationName)
......@@ -925,9 +970,11 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
altVariableFileObject = dataobj.FileInfo(varRunInfo[VAR_FILTER_ALT_FILE_B_KEY]).file_object if VAR_FILTER_ALT_FILE_B_KEY in varRunInfo else None,
fileDescriptionForDisplay = "file B")
except Exception as ex:
LOG.warning(
displayName + " data could not be loaded. This variable will not be included in the output report. " +
"The following error was encountered while trying to load this variable:\n" + str(ex))
tmpMsg = displayName + " data could not be loaded. This variable will not be included in the output report. " + \
"The following error was encountered while trying to load this variable:\n" + str(ex)
LOG.warning(tmpMsg)
if runInfo[OPTIONS_WARN_MISSING_KEY] :
variableComparisons[explanationName] = _make_error_var_entry(tmpMsg, do_pass_fail=do_pass_fail,)
continue
# get variable attribute information for this variable
......@@ -1097,6 +1144,7 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
tempVarStats = variable_stats.dictionary_form()
epsilonPassedPercent = (1.0 - epsilon_failed_fraction) * 100.0
finitePassedPercent = (1.0 - non_finite_fail_fraction) * 100.0
tmpDidPass = varRunInfo[DID_VARIABLE_PASS_KEY] # TODO, need to reevaluate this: if do_pass_fail else None
tempShape = tempVarStats["General Statistics"]["shape"]
tempValue = None if SINGLE_VAL_MSG not in tempShape else tempVarStats["General Statistics"]["max_a"] # since it's the only value, it's also the max!
variableComparisons[displayName] = {
......@@ -1106,6 +1154,8 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
VARIABLE_RUN_INFO_KEY: varRunInfo,
VAR_SHAPE_KEY: tempShape,
VAR_SINGLE_VAL_KEY: tempValue,
VAR_ERROR_MSG_KEY: None,
DID_VARIABLE_PASS_KEY: tmpDidPass,
}
variableStatsCollection[displayName] = tempVarStats
......@@ -1133,8 +1183,13 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
+ 'longitude ' + str(good_shape_from_lon_lat) + ' and '
+ 'latitude ' + str(good_shape_from_lon_lat) + ' variables.')
LOG.warning(message)
if runInfo[OPTIONS_WARN_MISSING_KEY] :
variableComparisons[explanationName] = _make_error_var_entry(message, do_pass_fail=do_pass_fail,)
except ValueErrorStringToFloat as ex:
LOG.warning("Unable to compare "+displayName+": "+str(ex))
tmpMsg = "Unable to compare "+displayName+": "+str(ex)
LOG.warning(tmpMsg)
if runInfo[OPTIONS_WARN_MISSING_KEY]:
variableComparisons[displayName] = _make_error_var_entry(tmpMsg, do_pass_fail=do_pass_fail,)
# the end of the loop to examine all the variables
......@@ -1154,7 +1209,7 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
nameStats,
globalAttrs=globalAttrInfo,)
# TODO save some info we need for the concise summary report
# save some info we need for the concise summary report
concise_info = {
"files": files,
"runInfo": runInfo,
......@@ -1240,7 +1295,7 @@ def stats_two_inputs_library_call(afn, bfn, var_list=None,
# if we have command line input, we still need to parse the variable names
if not usedConfigFile:
temp_names = config_organizer.parse_varnames(common_variable_names, requestedNames,
temp_names, _ = config_organizer.parse_varnames(common_variable_names, requestedNames,
epsilon=default_epsilon, missing=default_fillval,
warn_unfound=warn_missing, )
requestedNames = { }
......@@ -1429,7 +1484,7 @@ def stats_one_input_library_call (afn, var_list=None, options_set=None, do_docum
# if we have command line input, we still need to parse the variable names
if not usedConfigFile :
temp_names = config_organizer.parse_varnames(available_variable_names, requestedNames,
temp_names, _ = config_organizer.parse_varnames(available_variable_names, requestedNames,
epsilon=None, missing=default_missing_val,
warn_unfound=warn_missing, )
requestedNames = { }
......
......@@ -83,6 +83,7 @@ def parse_varnames(names, terms, epsilon=0.0, missing=None, warn_unfound=False,)
# pick out the names that match what the user asked for
selected_names = set()
missing_names = { }
for t in range(len(terms_compiled)):
(re_term, details) = terms_compiled[t]
matched_term = False
......@@ -92,9 +93,11 @@ def parse_varnames(names, terms, epsilon=0.0, missing=None, warn_unfound=False,)
selected_names.add((name, temp_epsilon, temp_missing))
matched_term = True
if not matched_term and warn_unfound :
LOG.warning("No matching variables found for user requested variable: " + terms[t])
tmpMsg = "No matching variables found for user requested variable: " + terms[t]
LOG.warning(tmpMsg)
missing_names[terms[t]] = tmpMsg
return selected_names
return selected_names, missing_names
def _check_shared_names (nameSetA, nameSetB) :
"""
......@@ -132,13 +135,14 @@ def resolve_names(fileAObject, fileBObject, defaultValues,
# figure out which set should be selected based on the user requested names
fileCommonNames = nameComparison[SHARED_VARIABLE_NAMES_KEY]
finalNames = {}
missingNames = { } # a place to put info on names we couldn't find if the user set warnIfRequestedVarsUnavailable to True
# if the user gave us a config file to pull info from
if usingConfigFileFormat :
# if the user didn't ask for any specific variables, try everything
if len(requestedNames) == 0 :
finalFromCommandLine = parse_varnames(fileCommonNames, ['.*'],
defaultValues[EPSILON_KEY], defaultValues[FILL_VALUE_KEY])
finalFromCommandLine, _ = parse_varnames(fileCommonNames, ['.*'],
defaultValues[EPSILON_KEY], defaultValues[FILL_VALUE_KEY])
for name, epsilon, missing in finalFromCommandLine :
# we'll use the variable's name as the display name for the time being
finalNames[name] = {}
......@@ -197,7 +201,7 @@ def resolve_names(fileAObject, fileBObject, defaultValues,
else : # in this case, the user asked for a variable and it was not available
if warnIfRequestedVarsUnavailable :
tempVarName = name if name_b == name else "A: " + name + "; B: " + name_b
tempVarName = dispName + "(" + name + ")" if name_b == name else dispName + "(" + name + "/" + name_b + ")"
aStatus = name in nameComparison[VAR_NAMES_UNIQUE_TO_A_KEY] or name in fileCommonNames
bStatus = name_b in nameComparison[VAR_NAMES_UNIQUE_TO_B_KEY] or name_b in fileCommonNames
tempReason = "of an unknown reason."
......@@ -207,7 +211,9 @@ def resolve_names(fileAObject, fileBObject, defaultValues,
tempReason = "the variable was available in the A file but was not present in the B file."
if bStatus and not aStatus :
tempReason = "the variable was available in the B file but was not present in the A file."
LOG.warning("Unable to compare requested variable (" + tempVarName + ") because " + tempReason)
tempFullReason = "Unable to compare requested variable (" + tempVarName + ") because " + tempReason
missingNames[tempVarName] = tempFullReason
LOG.warning(tempFullReason)
else :
LOG.warning('No technical variable name was given for the entry described as "' + dispName + '". ' +
......@@ -217,9 +223,10 @@ def resolve_names(fileAObject, fileBObject, defaultValues,
else:
# format command line input similarly to the stuff from the config file
finalFromCommandLine = parse_varnames(fileCommonNames, requestedNames,
defaultValues[EPSILON_KEY], defaultValues[FILL_VALUE_KEY],
warnIfRequestedVarsUnavailable,)
finalFromCommandLine, missingNames = parse_varnames(fileCommonNames, requestedNames,
defaultValues[EPSILON_KEY],
defaultValues[FILL_VALUE_KEY],
warnIfRequestedVarsUnavailable,)
for name, epsilon, missing in finalFromCommandLine :
## we'll use the variable's name as the display name for the time being
......@@ -243,7 +250,7 @@ def resolve_names(fileAObject, fileBObject, defaultValues,
LOG.debug("Final selected set of variables to analyze:")
LOG.debug(str(finalNames))
return finalNames, nameComparison
return finalNames, nameComparison, missingNames
def resolve_names_one_file(fileObject, defaultValues,
requestedNames, usingConfigFileFormat=False,
......@@ -258,11 +265,12 @@ def resolve_names_one_file(fileObject, defaultValues,
# figure out which names should be selected based on the user requested names
finalNames = {}
missingNames = {}
if usingConfigFileFormat :
# if the user didn't ask for any, try everything
if len(requestedNames) == 0 :
finalFromCommandLine = parse_varnames(possibleNames, ['.*'],
finalFromCommandLine, _ = parse_varnames(possibleNames, ['.*'],
None, defaultValues[FILL_VALUE_KEY])
for name, _, missing in finalFromCommandLine :
# we'll use the variable's name as the display name for the time being
......@@ -308,9 +316,11 @@ def resolve_names_one_file(fileObject, defaultValues,
# they asked for a variable name we don't have
else :
if warnIfRequestedVarsUnavailable:
LOG.warning("Unable to compare requested variable (" + name +
") because the variable was not present in the input file.")
if warnIfRequestedVarsUnavailable :
tmpMsg = "Unable to compare requested variable (" + name + \
") because the variable was not present in the input file."
missingNames[dispName + "(" + name + ")"] = tmpMsg
LOG.warning(tmpMsg)
else :
LOG.warning('No technical variable name was given for the entry described as "' + dispName + '". ' +
......@@ -318,9 +328,9 @@ def resolve_names_one_file(fileObject, defaultValues,
else:
# format command line input similarly to the stuff from the config file
#print (requestedNames)
finalFromCommandLine = parse_varnames(possibleNames, requestedNames,
None, defaultValues[FILL_VALUE_KEY],
warnIfRequestedVarsUnavailable,)
finalFromCommandLine, missingNames = parse_varnames(possibleNames, requestedNames,
None, defaultValues[FILL_VALUE_KEY],
warnIfRequestedVarsUnavailable,)
for name, _, missing in finalFromCommandLine :
## we'll use the variable's name as the display name for the time being
finalNames[name] = {}
......@@ -340,7 +350,7 @@ def resolve_names_one_file(fileObject, defaultValues,
LOG.debug("Final selected set of variables to inspect:")
LOG.debug(str(finalNames))
return finalNames, possibleNames
return finalNames, possibleNames, missingNames
def _get_missing_values_if_needed(fileA, fileB,
var_name, alt_var_name=None,
......
......@@ -199,6 +199,7 @@ R_SQUARED_COEFF_VALUE_KEY = 'r_squared_correlation'
VAR_SHAPE_KEY = 'variable_data_shape'
VAR_SINGLE_VAL_KEY = 'single_value'
VAR_ERROR_MSG_KEY = 'why_variable_could_not_be_compared'
# image types
......
......@@ -63,7 +63,7 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
</p>
</%block>
<%block name="fileIdentification">
## show information on each of the files we're comparing (should only be two)
......
......@@ -40,19 +40,24 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
<%
# get some information about the variable, for convenience
tempVariableInfo = variables[variableKey]
tempVarRunInfo = tempVariableInfo[constants.VARIABLE_RUN_INFO_KEY]
tempVarRunInfo = tempVariableInfo[constants.VARIABLE_RUN_INFO_KEY] if constants.VARIABLE_RUN_INFO_KEY in tempVariableInfo else None
technicalName = tempVarRunInfo[constants.VARIABLE_TECH_NAME_KEY]
technicalName = tempVarRunInfo[constants.VARIABLE_TECH_NAME_KEY] if tempVarRunInfo is not None else variableKey
varDisplayName = technicalName
if constants.DISPLAY_NAME_KEY in tempVarRunInfo :
if tempVarRunInfo is not None and constants.DISPLAY_NAME_KEY in tempVarRunInfo :
varDisplayName = tempVarRunInfo[constants.DISPLAY_NAME_KEY]
varDataShape = str(tempVariableInfo[constants.VAR_SHAPE_KEY])
varDataShape = tempVariableInfo[constants.VAR_SHAPE_KEY]
tempSingleVal = tempVariableInfo[constants.VAR_SINGLE_VAL_KEY]
varErrorMsg = tempVariableInfo[constants.VAR_ERROR_MSG_KEY]
%>
<tr>
<td>
<a href="${tempVarRunInfo[constants.VAR_REPORT_PATH_KEY]}">${varDisplayName}</a> <br>
% if tempVarRunInfo is not None :
<a href="${tempVarRunInfo[constants.VAR_REPORT_PATH_KEY]}">${varDisplayName}</a> <br>
% else :
${varDisplayName} <abbr title="${varErrorMsg}"><sup><small>?</small></sup></a></abbr>
% endif
</td>
<td>
% if varDataShape is not None and len(varDataShape) > 0 :
......
......@@ -79,14 +79,16 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
numEpPercent = 0
numSingleVal = 0
for varKey in variables :
tmpDidPass = variables[varKey][constants.VARIABLE_RUN_INFO_KEY][constants.DID_VARIABLE_PASS_KEY]
tmpVarRunInfo = variables[varKey][constants.VARIABLE_RUN_INFO_KEY] if constants.VARIABLE_RUN_INFO_KEY in variables[varKey] else None
tmpDidPass = variables[varKey][constants.DID_VARIABLE_PASS_KEY]
numPass += 1 if tmpDidPass is not None and tmpDidPass else 0
numFail += 1 if tmpDidPass is not None and not tmpDidPass else 0
allDidPass = allDidPass and tmpDidPass if tmpDidPass is not None else allDidPass
allNone = None if allNone is None and tmpDidPass is None else False
tempEpsilon = variables[varKey][constants.VARIABLE_RUN_INFO_KEY][constants.EPSILON_KEY]
tempEpsilonPer = variables[varKey][constants.VARIABLE_RUN_INFO_KEY][constants.EPSILON_PERCENT_KEY]
tempEpsilon = tmpVarRunInfo[constants.EPSILON_KEY] if tmpVarRunInfo is not None else None
tempEpsilonPer = tmpVarRunInfo[constants.EPSILON_PERCENT_KEY] if tmpVarRunInfo is not None else None
tempSingleVal = variables[varKey][constants.VAR_SINGLE_VAL_KEY]
numEpsilon += 1 if tempEpsilon is not None else 0
numEpPercent += 1 if tempEpsilonPer is not None else 0
......@@ -142,22 +144,32 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
<%
# get some information about the variable, for convenience
tempVariableInfo = variables[variableKey]
tempVarRunInfo = tempVariableInfo[constants.VARIABLE_RUN_INFO_KEY]
tempVarRunInfo = tempVariableInfo[constants.VARIABLE_RUN_INFO_KEY] if constants.VARIABLE_RUN_INFO_KEY in tempVariableInfo else None
technicalName = tempVarRunInfo[constants.VARIABLE_TECH_NAME_KEY]
technicalName = tempVarRunInfo[constants.VARIABLE_TECH_NAME_KEY] if tempVarRunInfo is not None else variableKey
varDisplayName = technicalName
if constants.DISPLAY_NAME_KEY in tempVarRunInfo :
if tempVarRunInfo is not None and constants.DISPLAY_NAME_KEY in tempVarRunInfo :
varDisplayName = tempVarRunInfo[constants.DISPLAY_NAME_KEY]
rSquaredCorr = tempVariableInfo[constants.R_SQUARED_COEFF_VALUE_KEY]
passPercent = tempVariableInfo[constants.PASSED_EPSILON_PERCENT_KEY]
finiteSimilarPercent = tempVariableInfo[constants.FINITE_SIMILAR_PERCENT_KEY]
didPass = tempVarRunInfo [constants.DID_VARIABLE_PASS_KEY]
varDataShape = str(tempVariableInfo[constants.VAR_SHAPE_KEY])
didPass = tempVariableInfo[constants.DID_VARIABLE_PASS_KEY]
varDataShape = tempVariableInfo[constants.VAR_SHAPE_KEY]
tempSingleVal = tempVariableInfo[constants.VAR_SINGLE_VAL_KEY]
varErrorMsg = tempVariableInfo[constants.VAR_ERROR_MSG_KEY]
epsilonVal = tempVarRunInfo[constants.EPSILON_KEY] if tempVarRunInfo is not None else None
epsilonPerVal = tempVarRunInfo[constants.EPSILON_PERCENT_KEY] if tempVarRunInfo is not None else None
%>
<tr>
<td><a href="${tempVarRunInfo[constants.VAR_REPORT_PATH_KEY]}">${varDisplayName}</a></td>
<td>
% if tempVarRunInfo is not None :
<a href="${tempVarRunInfo[constants.VAR_REPORT_PATH_KEY]}">${varDisplayName}</a>
% else :
${varDisplayName} <abbr title="${varErrorMsg}"><sup><small>?</small></sup></a></abbr>
% endif
</td>
<td>
% if varDataShape is not None and len(varDataShape) > 0 :
% if tempSingleVal is not None :
......@@ -171,8 +183,8 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
</td>
% if numEpsilon >= 1 :
<td class="n">
% if tempVarRunInfo[constants.EPSILON_KEY] is not None :
${tempVarRunInfo[constants.EPSILON_KEY]}
% if epsilonVal is not None :
${epsilonVal}
% else :
--
% endif
......@@ -180,8 +192,8 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
% endif
% if numEpPercent >= 1 :
<td class="n">
% if tempVarRunInfo[constants.EPSILON_PERCENT_KEY] is not None :
${tempVarRunInfo[constants.EPSILON_PERCENT_KEY]}
% if epsilonPerVal is not None :
${epsilonPerVal}
%else :
--
% endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment