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

added new 'total_data_failure_tolerance' to let you set a bound on the sum of...

added new 'total_data_failure_tolerance' to let you set a bound on the sum of epsilon and finitness-mismatch failures (ie. all points that were bad because of the data itself)

git-svn-id: https://svn.ssec.wisc.edu/repos/glance/trunk@123 8a9318a1-56ba-4d59-b755-99d26321be01
parent 913fc96e
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,7 @@ glance_analysis_defaults = {'epsilon': 0.0, ...@@ -53,6 +53,7 @@ glance_analysis_defaults = {'epsilon': 0.0,
'missing_value': None, 'missing_value': None,
'epsilon_failure_tolerance': 0.0, 'epsilon_failure_tolerance': 0.0,
'nonfinite_data_tolerance': 0.0, 'nonfinite_data_tolerance': 0.0,
'total_data_failure_tolerance': None,
'minimum_acceptable_squared_correlation_coefficient': None 'minimum_acceptable_squared_correlation_coefficient': None
} }
...@@ -119,6 +120,7 @@ def _setup_file(fileNameAndPath, prefexText='', allowWrite=False) : ...@@ -119,6 +120,7 @@ def _setup_file(fileNameAndPath, prefexText='', allowWrite=False) :
return fileObject, fileInfo return fileObject, fileInfo
# TODO, make this generic for any number of file objects
def _check_file_names(fileAObject, fileBObject) : def _check_file_names(fileAObject, fileBObject) :
""" """
get information about the names in the two files and how they compare to each other get information about the names in the two files and how they compare to each other
...@@ -735,6 +737,19 @@ def _check_pass_or_fail(varRunInfo, variableStats, defaultValues) : ...@@ -735,6 +737,19 @@ def _check_pass_or_fail(varRunInfo, variableStats, defaultValues) :
passed_nonfinite = non_finite_diff_fraction <= nonfiniteTolerance passed_nonfinite = non_finite_diff_fraction <= nonfiniteTolerance
passValues.append(passed_nonfinite) passValues.append(passed_nonfinite)
# test if the total failed percentage is acceptable
# get the total percentage of failed data that is acceptable
totalFailTolerance = None
if ('total_data_failure_tolerance' in varRunInfo) :
totalFailTolerance = varRunInfo['total_data_failure_tolerance']
# did we fail based on all data failures?
passed_all_percentage = None
if totalFailTolerance is not None :
passed_all_percentage = (non_finite_diff_fraction + failed_fraction) <= totalFailTolerance
passValues.append(passed_all_percentage)
# test the r-squared correlation coefficent # test the r-squared correlation coefficent
# get the minimum acceptable r-squared correlation coefficient # get the minimum acceptable r-squared correlation coefficient
...@@ -1502,6 +1517,7 @@ python -m glance ...@@ -1502,6 +1517,7 @@ python -m glance
except KeyError : except KeyError :
LOG.warn('Unable to open / process file selection: ' + fn) LOG.warn('Unable to open / process file selection: ' + fn)
# TODO, remove this method?
def sdr_cris(*args): def sdr_cris(*args):
"""compare sdr_cris output """compare sdr_cris output
parameters are variable name followed by detector number parameters are variable name followed by detector number
......
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