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

added ability to load lon/lat from a different set of files

git-svn-id: https://svn.ssec.wisc.edu/repos/glance/trunk@86 8a9318a1-56ba-4d59-b755-99d26321be01
parent 6f9a20bf
No related branches found
No related tags found
No related merge requests found
......@@ -654,7 +654,7 @@ def reportGen_library_call (a_path, b_path, var_list=[ ],
defaultValues,
requestedNames, usedConfigFile)
# get and analyze our longitude and latitude data
# figure out the names to be used for the longitude and latitude variables
spatialInfo = {}
b_longitude = runInfo['longitude']
b_latitude = runInfo['latitude']
......@@ -662,11 +662,25 @@ def reportGen_library_call (a_path, b_path, var_list=[ ],
b_longitude = runInfo['longitude_alt_name_in_b']
if ( 'latitude_alt_name_in_b' in runInfo):
b_latitude = runInfo['latitude_alt_name_in_b']
# if we need to load our lon/lat from different files, open those files
file_for_a_lon_lat = aFile
file_for_b_lon_lat = bFile
if ('a_lon_lat_from_alt_file' in runInfo) :
temp_file_name = runInfo['a_lon_lat_from_alt_file']
LOG.info("Loading alternate file (" + temp_file_name + ") for file a longitude/latitude.")
file_for_a_lon_lat, _ = _setup_file(temp_file_name, "\t")
if ('b_lon_lat_from_alt_file' in runInfo) :
temp_file_name = runInfo['b_lon_lat_from_alt_file']
LOG.info("Loading alternate file (" + temp_file_name + ") for file b longitude/latitude.")
file_for_b_lon_lat, _ = _setup_file(temp_file_name, "\t")
# load our longitude and latitude and do some analysis on them
longitudeA, latitudeA, spaciallyInvalidMaskA, spatialInfo['file A'] = \
_get_and_analyze_lon_lat (aFile, runInfo['latitude'], runInfo['longitude'],
_get_and_analyze_lon_lat (file_for_a_lon_lat, runInfo['latitude'], runInfo['longitude'],
runInfo['data_filter_function_lat_in_a'], runInfo['data_filter_function_lon_in_a'])
longitudeB, latitudeB, spaciallyInvalidMaskB, spatialInfo['file B'] = \
_get_and_analyze_lon_lat (bFile, b_latitude, b_longitude,
_get_and_analyze_lon_lat (file_for_b_lon_lat, b_latitude, b_longitude,
runInfo['data_filter_function_lat_in_b'], runInfo['data_filter_function_lon_in_b'])
# test the "valid" values in our lon/lat
......
......@@ -50,6 +50,15 @@ lat_lon_info ['latitude_alt_name_in_b'] = 'resampled_latitude' # the alternate
lat_lon_info['data_filter_function_lon_in_b'] = (insert lambda function here)
lat_lon_info['data_filter_function_lat_in_b'] = (insert lambda function here)
"""
"""
# if you wish to load the longitude and latitude from a file, use these values to specify what file
# the other longitude and latitude values specifying formatting functions, variable names, etc. will be
# used on the specified file.
lat_lon_info['a_lon_lat_from_alt_file'] = '/path/to/alternate/file/for/lonlat/to/use/in/a'
lat_lon_info['b_lon_lat_from_alt_file'] = '/path/to/alternate/file/for/lonlat/to/use/in/b'
"""
# this value can be used to control how similar the longitude and latitude must be to be considered matching
# Note: this value is only intended to allow you to avoid very small floating point errors that would make glance
# think that your data is disparate, when really it is very close together. If you put a large epsilon in here
......
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