#!/usr/bin/env python # encoding: utf-8 """ Created by Graeme Martin 20100216. Copyright (c) 2010 University of Wisconsin SSEC. All rights reserved. """ import glance.filters as filters import glance.constants as constants # general settings to control how reports are created settings = {} settings['useThreadsToControlMemory'] = False settings['shouldIncludeImages'] = True #settings['useSharedRangeForOriginal'] = True settings['doFork'] = False # info on the latitude and longitude variables that will be used lat_lon_info = {} # the name of the longitude variable lat_lon_info['longitude'] = 'Longitude' # the name of the latitude variable lat_lon_info ['latitude'] = 'Latitude' lat_lon_info['data_filter_function_lon_in_a'] = (lambda data: filters.trim_off_of_bottom( filters.trim_off_of_right(data, 424), 1824)) lat_lon_info['data_filter_function_lat_in_a'] = (lambda data: filters.trim_off_of_bottom( filters.trim_off_of_right(data, 424), 1824)) # the alternate name of the longitude in file B lat_lon_info['longitude_alt_name_in_b'] = 'pixel_longitude' # the alternate name of the latitude in file B lat_lon_info ['latitude_alt_name_in_b'] = 'pixel_latitude' # per variable defaults defaultValues = { # the acceptable difference between file A and file B 'epsilon': 0.001, # the value to be interpreted as "missing" data 'missing_value': -999., # the allowed fraction of epsilon comparison failure # None indicates that variables should not be tested # on nearness of epsilon comparison 'epsilon_failure_tolerance': None, # the allowed fraction of non-finite data that differs # None indicates that variables should not be tested # on non-finite data similarity 'nonfinite_data_tolerance': None } # a list of all the variables to analyze # # If you wish to analyze all possible variables, # do not place any entries in the setOfVariables (ie. just # leave it as an empty dictionary) setOfVariables = {} setOfVariables['volash_ash_emiss'] = { # this entry should correspond to the name in the data file 'variable_name': 'AshEmiss', 'alternate_name_in_B': 'goesr_ash_rtv_bridge_ash_emissivity', # the acceptable difference between file A and file B 'epsilon': .01, # the value to be interpreted as "missing" data for framework file 'missing_value': -999., # the value to be interprested as "missing" for geocat file 'missing_value_alt_in_b': -999., # filter out all pixels with AshTopHeight values less than zero or greater than 30,000 in framework file 'data_filter_function_a': (lambda data: filters.trim_off_of_bottom( filters.trim_off_of_right( filters.set_to_value_between_bounds(data, -999., 0., 1.05), 424), 1824)), # filter out all pixels with VAH values less than zero or greater than 30,000 in ground system file 'data_filter_function_b': (lambda data: filters.set_to_value_between_bounds(data, -999, 0, 1.05)), # the allowed fraction of epsilon comparison failure # None indicates that variables should not be tested # on nearness of epsilon comparison 'epsilon_failure_tolerance': None, # the allowed fraction of non-finite data that differs # None indicates that variables should not be tested # on non-finite data similarity 'nonfinite_data_tolerance': None }