Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • evas/UW-Glance
  • adesmet/UW-Glance
2 results
Show changes
Commits on Source (199)
Showing
with 786 additions and 11 deletions
include README.md
recursive-include source/glance *.txt *.py *.png
......@@ -6,4 +6,4 @@ Glance provides powerful analysis tools for data sets that can be mapped to the
Glance also handles automatic validation testing through configurable pass/fail criteria and summary reports that can be generated for compared files.
Documentation for Glance is currently being migrated to the Wiki associated with this GitLab repository. Documentation that has not yet been migrated is visible in the [SSEC Groups Page](https://groups.ssec.wisc.edu/groups/goes-r/algorithm-working-group/resources-and-recipes/glance-large-dataset-comparison-tools-1).
Documentation for Glance is available in [the Wiki associated with this GitLab repository](https://gitlab.ssec.wisc.edu/evas/UW-Glance/-/wikis/home).
#!/usr/bin/env python
# encoding: utf-8
"""
An example config file using bin / tuple functionality to generate a
report on CrIS SDR spectra.
Created by Eva Schiffer Jun 2010.
Copyright (c) 2010 University of Wisconsin SSEC. All rights reserved.
"""
# you will need to import the glance.constants to get the standard names
import glance.constants as constants
# various general settings to control how reports are created
settings = {}
settings[constants.DO_MAKE_IMAGES_KEY] = True
# no latitude and longitude variables that will be used
lat_lon_info = {}
# there is rogue "missing" data in some of the files I've seen that goes
# below -999.0; this function will standardize the missing data values
def temp_set_missing_fn (data, lowBound, missingValue) :
"""
call this function with:
data - the data to clean up
lowBound - the lowest value that does not need to be cleaned up
missingValue - the value that should be used for "fill" data
"""
data[data < lowBound] = missingValue
return data
# per variable defaults
defaultValues = {
constants.BIN_INDEX_KEY: 2,
constants.BIN_NAME_KEY: 'detector',
constants.TUPLE_INDEX_KEY: 3,
constants.TUPLE_NAME_KEY: 'wave number',
constants.FILL_VALUE_KEY: -999.3,
# you can optionally use these filters if you're seeing weird below range data
# constants.FILTER_FUNCTION_A_KEY: (lambda data: temp_set_missing_fn(data, -990.0, -999.0)),
# constants.FILTER_FUNCTION_B_KEY: (lambda data: temp_set_missing_fn(data, -990.0, -999.0))
}
# a list of all the variables to analyze
setOfVariables = {}
setOfVariables['Imaginary Long Wave'] = {
constants.VARIABLE_TECH_NAME_KEY: 'All_Data/CrIS-SDR_All/ESImaginaryLW'
}
setOfVariables['Imaginary Medium Wave'] = {
constants.VARIABLE_TECH_NAME_KEY: 'All_Data/CrIS-SDR_All/ESImaginaryMW'
}
setOfVariables['Imaginary Short Wave'] = {
constants.VARIABLE_TECH_NAME_KEY: 'All_Data/CrIS-SDR_All/ESImaginarySW'
}
setOfVariables['Real Long Wave'] = {
constants.VARIABLE_TECH_NAME_KEY: 'All_Data/CrIS-SDR_All/ESRealLW'
}
setOfVariables['Real Medium Wave'] = {
constants.VARIABLE_TECH_NAME_KEY: 'All_Data/CrIS-SDR_All/ESRealMW'
}
setOfVariables['Real Short Wave'] = {
constants.VARIABLE_TECH_NAME_KEY: 'All_Data/CrIS-SDR_All/ESRealSW'
}
\ No newline at end of file
#!/usr/bin/env python
# encoding: utf-8
"""
An example config file that is as close as I can get to "default" glance behavior,
i.e. running reportGen with no config file. Use this file as a starting point when
creating a new config file.
Created by Graeme Martin July 2015.
Copyright (c) 2015 University of Wisconsin SSEC. All rights reserved.
"""
# you will need to import the glance.constants to get the standard names
import glance.constants as constants
# general settings to control how reports are created
settings = {}
# info on the latitude and longitude variables that will be used
lat_lon_info = {}
# per variable defaults
defaultValues = {}
# 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 = {}
#!/usr/bin/env python
# encoding: utf-8
"""
An example config file that shows how to compare files where the variables
have different names in each file.
This specific config file to compares sfc emissivity output from Geocat to
output from the AIT Framework.
Created by Graeme Martin 2010-11-19.
Copyright (c) 2010 University of Wisconsin SSEC. All rights reserved.
"""
# you will need to import the glance.constants to get the standard names
import glance.constants as constants
# general settings to control how reports are created
settings = {}
settings[constants.DO_CLEAR_MEM_THREADED_KEY] = True
settings[constants.DO_MAKE_IMAGES_KEY] = True
settings[constants.USE_SHARED_ORIG_RANGE_KEY] = True
settings[constants.DO_MAKE_FORKS_KEY] = False
# info on the latitude and longitude variables that will be used
lat_lon_info = {}
lat_lon_info[constants.LONGITUDE_NAME_KEY] = 'sounding_land_emiss_Lon_reduced'
lat_lon_info[constants.LATITUDE_NAME_KEY ] = 'sounding_land_emiss_Lat_reduced'
lat_lon_info[constants.LON_ALT_NAME_IN_B_KEY] = 'Longitude'
lat_lon_info[constants.LAT_ALT_NAME_IN_B_KEY] = 'Latitude'
lat_lon_info[constants.LON_LAT_EPSILON_KEY] = 0.0001
# per variable defaults
defaultValues = {
constants.EPSILON_KEY: None,
constants.EPSILON_FAIL_TOLERANCE_KEY: None,
constants.NONFINITE_TOLERANCE_KEY: None,
constants.FILL_VALUE_ALT_IN_B_KEY: -999.0
}
# a list of all the variables to analyze
#
setOfVariables = {}
setOfVariables['channel 11 emissivity'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'sounding_land_emiss_Emiss_ch11',
constants.VARIABLE_B_TECH_NAME_KEY: 'Emiss_Ch11'
}
setOfVariables['channel 14 emissivity'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'sounding_land_emiss_Emiss_ch14',
constants.VARIABLE_B_TECH_NAME_KEY: 'Emiss_Ch14'
}
setOfVariables['channel 15 emissivity'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'sounding_land_emiss_Emiss_ch15',
constants.VARIABLE_B_TECH_NAME_KEY: 'Emiss_Ch15'
}
setOfVariables['land surface temperature'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'sounding_land_emiss_Lst_time3',
constants.VARIABLE_B_TECH_NAME_KEY: 'LST'
}
setOfVariables['reduced resolution longitude'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'sounding_land_emiss_Lon_reduced',
constants.VARIABLE_B_TECH_NAME_KEY: 'Longitude'
}
setOfVariables['reduced resolution latitude'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'sounding_land_emiss_Lat_reduced',
constants.VARIABLE_B_TECH_NAME_KEY: 'Latitude'
}
......@@ -11,6 +11,7 @@ Created by Eva Schiffer Jun 2009.
Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved.
"""
# you will need to import the glance.constants to get the standard names
import glance.constants as constants
# various general settings to control how reports are created
......@@ -20,7 +21,7 @@ settings[constants.DO_MAKE_IMAGES_KEY] = True
# whether or not separate threads should be spawned to create each image
# for the purpose of controlling python's memory usage.
# this feature should not be used in Mac OSX owing to a bug in multithreading
# but at appears to work well in other Unix systems
# but at appears to work in other Unix systems
settings[constants.DO_CLEAR_MEM_THREADED_KEY] = False
# should we create multiple processes to make more than one image at a time?
# turning on this option can cause glance to use a very large amount of system
......@@ -32,11 +33,25 @@ settings[constants.DO_MAKE_FORKS_KEY] = False
# by default each data set will be plotted in it's own range, if you set this
# value to True, then the maximum of the two ranges will be used to plot both
settings[constants.USE_SHARED_ORIG_RANGE_KEY] = False
# should we test for pass/fail when comparing data sets?
# by default pass/fail testing will be turned on
settings[constants.DO_TEST_PASSFAIL_KEY] = False
# should the user be warned about variables they requested that could not be compared?
# by default this is turned off, if you turn it on missing variables will be reported in
# warnings on the command line and when doing pass/fail testing they will be considered
# failing variables and will be reported on any report pages that you generate
settings[constants.WARN_MISSING_KEY] = True
# should we avoid trying to match lon/lat to our data?
# when you set this to True, it WILL NOT attempt to load or match lon/lat data
# when you set this to False, it WILL attempt to load or match lon/lat data
# by default Glance will try to load lon/lat data if you do not include this entry
# in the settings dictionary
settings[constants.USE_NO_LON_OR_LAT_VARS_KEY] = False
# the names of the latitude and longitude variables that will be used
lat_lon_info = {}
lat_lon_info[constants.LONGITUDE_NAME_KEY] = 'imager_prof_retr_abi_r4_generic1' # 'pixel_longitude'# the name of the longitude variable
lat_lon_info [constants.LATITUDE_NAME_KEY] = 'imager_prof_retr_abi_r4_generic2' # 'pixel_latitude' # the name of the latitude variable
lat_lon_info[constants.LONGITUDE_NAME_KEY] = 'longitude'# the name of the longitude variable
lat_lon_info [constants.LATITUDE_NAME_KEY] = 'latitude' # the name of the latitude variable
"""
# the following two functions can be defined in order to filter the longitude and latitude data, for example, these could be used to compensate
......@@ -47,17 +62,15 @@ lat_lon_info[constants.LAT_FILTER_FUNCTION_A_KEY] = (insert lambda function here
# the following two values are optional and only need to be set if the the latitude and longitude have
# different names in file A and file B
lat_lon_info[constants.LON_ALT_NAME_IN_B_KEY] = 'resampled_longitude' # the alternate name of the longitude in file B
lat_lon_info[constants.LAT_ALT_NAME_IN_B_KEY] = 'resampled_latitude' # the alternate name of the latitude in file A
lat_lon_info[constants.LON_ALT_NAME_IN_B_KEY] = 'pixel_longitude' # the alternate name of the longitude in file B
lat_lon_info[constants.LAT_ALT_NAME_IN_B_KEY] = 'pixel_latitude' # the alternate name of the latitude in file A
# the following two functions can be defined in order to filter the longitude and latitude data, for example, these could be used to compensate
# for differening data types (like ints/floats or float32/float64) or to handle slicing out only a subset of the data for analysis
# note: these two filters will only be applied to the longitude and latitude data in file B
lat_lon_info[constants.LON_FILTER_FUNCTION_B_KEY] = (insert lambda function here)
lat_lon_info[constants.LAT_FILTER_FUNCTION_B_KEY] = (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.
......@@ -68,7 +81,7 @@ lat_lon_info[constants.LONLAT_ALT_FILE_B_KEY] = '/path/to/alternate/file/for/lon
# 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
# the various comparison plots may contain misleading data
# the resulting comparison plots may contain misleading data
lat_lon_info[constants.LON_LAT_EPSILON_KEY] = 0.0001
# per variable defaults
......@@ -83,7 +96,7 @@ lat_lon_info[constants.LON_LAT_EPSILON_KEY] = 0.0001
# on it's internal defaults.
defaultValues = {constants.EPSILON_KEY: 0.0, # the acceptable difference between file A and file B
constants.FILL_VALUE_KEY: -999, # the value to be interpreted as fill data
constants.FILL_VALUE_KEY: -999.0, # the value to be interpreted as fill data
constants.EPSILON_FAIL_TOLERANCE_KEY: None,
# the allowed fraction of epsilon comparison failure
......@@ -105,7 +118,7 @@ defaultValues = {constants.EPSILON_KEY: 0.0, # the acceptable differe
# the following two functions can be defined in order to filter the variable data,
# for example, these could be used to compensate
# for differening data types (like ints/floats or float32/float64)
# for differing data types (like ints/floats or float32/float64)
# or to handle slicing out only a subset of the data for analysis
# constants.FILTER_FUNCTION_A_KEY: (insert lambda function here), # note: will only be applied to file A data
# constants.FILTER_FUNCTION_B_KEY: (insert lambda function here) # note: will only be applied to file B data
......
#!/usr/bin/env python
# encoding: utf-8
"""
An example config file that generates reports with no pass / fail information.
Created by G Martin August 2010.
Copyright (c) 2010 University of Wisconsin SSEC. All rights reserved.
"""
# you will need to import the glance.constants to get the standard names
import glance.constants as constants
# general settings to control how reports are created
settings = {}
settings[constants.DO_TEST_PASSFAIL_KEY] = False
settings[constants.DO_MAKE_IMAGES_KEY] = True
settings[constants.USE_SHARED_ORIG_RANGE_KEY] = True
# info on the latitude and longitude variables that will be used
lat_lon_info = {}
# per variable defaults
defaultValues = {
# note: as of Glance 0.6 these defaults are not strictly nessicary to turn off pass/fail
# as long as you set the settings[constants.DO_TEST_PASSFAIL_KEY] to False pass/fail will be disabled
constants.EPSILON_KEY: None,
constants.EPSILON_FAIL_TOLERANCE_KEY: None,
constants.NONFINITE_TOLERANCE_KEY: 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['Geocat ch 7 (MSG ch 4) clear sky brightness temperature'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_7_brightness_temperature_clear',
}
setOfVariables['Geocat ch 8 (MSG ch 5) clear sky brightness temperature'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_8_brightness_temperature_clear',
}
setOfVariables['Geocat ch 10 (MSG ch 6) clear sky brightness temperature'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_10_brightness_temperature_clear',
}
setOfVariables['Geocat ch 11 (MSG ch 7) clear sky brightness temperature'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_11_brightness_temperature_clear',
}
setOfVariables['Geocat ch 12 (MSG ch 8) clear sky brightness temperature'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_12_brightness_temperature_clear',
}
setOfVariables['Geocat ch 14 (MSG ch 9) clear sky brightness temperature'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_14_brightness_temperature_clear',
}
setOfVariables['Geocat ch 15 (MSG ch 10) clear sky brightness temperature'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_15_brightness_temperature_clear',
}
setOfVariables['Geocat ch 16 (MSG ch 11) clear sky brightness temperature'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_16_brightness_temperature_clear',
}
#!/usr/bin/env python
# encoding: utf-8
"""
A Glance config file to compare two Geocat output files at different resolutions, where
File A is exactly twice the res of File B. Created to compare L1 files generated from HSD
and HimawariCast data.
Created by Graeme Martin 2016-03-13.
Copyright (c) 2016 University of Wisconsin SSEC. All rights reserved.
"""
# you will need to import the glance.constants to get the standard names
import glance.constants as constants
# general settings to control how reports are created
settings = {}
settings[constants.DO_CLEAR_MEM_THREADED_KEY] = True
settings[constants.DO_MAKE_IMAGES_KEY] = True
settings[constants.USE_SHARED_ORIG_RANGE_KEY] = False
settings[constants.DO_MAKE_FORKS_KEY] = False
# info on the latitude and longitude variables that will be used
lat_lon_info = {}
lat_lon_info[constants.LON_LAT_EPSILON_KEY] = 0.0001
# the striding filter
stride2Filter1d = (lambda data:data[::2])
stride2Filter2d = (lambda data:data[::2,::2])
# per variable defaults
defaultValues = {}
# 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['ch 2 refl'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_2_reflectance',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 3 refl'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_3_reflectance',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 5 refl'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_5_reflectance',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 6 refl'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_6_reflectance',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 7 refl'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_7_reflectance',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 7 emiss'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_7_emissivity',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 7 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_7_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 8 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_8_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 9 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_9_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 10 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_10_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 11 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_11_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 12 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_12_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 13 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_13_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 14 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_14_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 15 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_15_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['ch 16 bt'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_16_brightness_temperature',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['eco type'] = {
constants.VARIABLE_TECH_NAME_KEY: 'pixel_ecosystem_type',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['latitude'] = {
constants.VARIABLE_TECH_NAME_KEY: 'pixel_latitude',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['longitude'] = {
constants.VARIABLE_TECH_NAME_KEY: 'pixel_longitude',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['relaz'] = {
constants.VARIABLE_TECH_NAME_KEY: 'pixel_relative_azimuth_angle',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['satzen'] = {
constants.VARIABLE_TECH_NAME_KEY: 'pixel_satellite_zenith_angle',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['solzen'] = {
constants.VARIABLE_TECH_NAME_KEY: 'pixel_solar_zenith_angle',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['sfc type'] = {
constants.VARIABLE_TECH_NAME_KEY: 'pixel_surface_type',
constants.FILTER_FUNCTION_A_KEY: stride2Filter2d
}
setOfVariables['bc1 planck'] = {
constants.VARIABLE_TECH_NAME_KEY: 'bc1_planck'
}
setOfVariables['bc2 planck'] = {
constants.VARIABLE_TECH_NAME_KEY: 'bc2_planck'
}
setOfVariables['cal offset'] = {
constants.VARIABLE_TECH_NAME_KEY: 'calibration_offset'
}
setOfVariables['cal slope'] = {
constants.VARIABLE_TECH_NAME_KEY: 'calibration_slope'
}
setOfVariables['cal slope degrade'] = {
constants.VARIABLE_TECH_NAME_KEY: 'calibration_slope_degrade'
}
setOfVariables['cal solar const'] = {
constants.VARIABLE_TECH_NAME_KEY: 'calibration_solar_constant'
}
setOfVariables['channel wavenumber'] = {
constants.VARIABLE_TECH_NAME_KEY: 'channel_wavenumber'
}
setOfVariables['fk1 planck'] = {
constants.VARIABLE_TECH_NAME_KEY: 'fk1_planck'
}
setOfVariables['fk2 planck'] = {
constants.VARIABLE_TECH_NAME_KEY: 'fk2_planck'
}
setOfVariables['scan line time'] = {
constants.VARIABLE_TECH_NAME_KEY: 'scan_line_time',
constants.FILTER_FUNCTION_A_KEY: stride2Filter1d
}
\ No newline at end of file
#!/usr/bin/env python
# encoding: utf-8
"""
An example config file for Geocat Level 1 files, filtered by
satellite zenith angle <= 70
The satellite zenith angle filter is applied to pixel resolution variables,
and not applied to other variables.
Created by Graeme Martin 2010-02-16.
Copyright (c) 2010 University of Wisconsin SSEC. All rights reserved.
"""
# you will need to import the glance.constants to get the standard names
import glance.constants as constants
import glance.filters as filters
# this is the filter that will handle checking our satellite zenith angles
satzenFilter = (lambda data, filterData:
filters.filter_based_on_additional_data_set_min_max_bounds(data,
filterData, missingValue=-32768, minOkFilterValue=-100,
maxOkFilterValue=70))
# general settings to control how reports are created
settings = {}
settings[constants.DO_CLEAR_MEM_THREADED_KEY] = True
settings[constants.DO_MAKE_IMAGES_KEY] = True
settings[constants.DO_MAKE_FORKS_KEY] = False
# info on the latitude and longitude variables that will be used
lat_lon_info = {}
lat_lon_info[constants.LON_LAT_EPSILON_KEY] = 0.0001
# per variable defaults
defaultValues = {}
# 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['ch 16 bt'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_16_brightness_temperature',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['fk2 planck'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'fk2_planck'
}
setOfVariables['relaz'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'pixel_relative_azimuth_angle',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['ch 5 refl'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_5_reflectance',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['fk1 planck'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'fk1_planck'
}
setOfVariables['ch 10 bt'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_10_brightness_temperature',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['ch 7 bt'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_7_brightness_temperature',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['lon'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'pixel_longitude',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['surface type'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'pixel_surface_type',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['eco type'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'pixel_ecosystem_type',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['cal slope'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'calibration_slope'
}
setOfVariables['cal slope degrade'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'calibration_slope_degrade'
}
setOfVariables['ch 12 bt'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_12_brightness_temperature',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['ch 2 refl'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_2_reflectance',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['ch 7 refl'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_7_reflectance',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['ch 15 bt'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_15_brightness_temperature',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['ch 8 bt'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_8_brightness_temperature',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['cal offset'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'calibration_offset'
}
setOfVariables['bc1 planck'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'bc1_planck'
}
setOfVariables['ch 11 bt'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_11_brightness_temperature',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['ch 14 bt'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_14_brightness_temperature',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['solzen'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'pixel_solar_zenith_angle',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['lat'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'pixel_latitude',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['bc2 planck'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'bc2_planck'
}
setOfVariables['cal solar const'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'calibration_solar_constant'
}
setOfVariables['ch 7 emiss'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_7_emissivity',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['channel wavenumber'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_wavenumber'
}
setOfVariables['ch 3 refl'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'channel_3_reflectance',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
setOfVariables['satzen'] = {
# this entry should correspond to the name in the data file
constants.VARIABLE_TECH_NAME_KEY: 'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_A_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_NAME_B_KEY:'pixel_satellite_zenith_angle',
constants.VAR_FILTER_FUNCTION_A_KEY: satzenFilter,
constants.VAR_FILTER_FUNCTION_B_KEY: satzenFilter
}
#!/usr/bin/env python
# encoding: utf-8
"""
An example config file for plotting winds vectors using vector plots.
Created by Eva Schiffer July 2021.
Copyright (c) 2021 University of Wisconsin SSEC. All rights reserved.
"""
# you will need to import the glance.constants to get the standard names
import glance.constants as constants
# various general settings to control how reports are created
settings = {}
# whether or not images should be generated and shown in the report
settings[constants.DO_MAKE_IMAGES_KEY] = True
settings[constants.USE_SHARED_ORIG_RANGE_KEY] = True
# the names of the latitude and longitude variables that will be used
lat_lon_info = {}
lat_lon_info[constants.LONGITUDE_NAME_KEY] = 'lon'# the name of the longitude variable
lat_lon_info [constants.LATITUDE_NAME_KEY] = 'lat' # the name of the latitude variable
# how similar the longitude and latitude must be to be considered matching
lat_lon_info[constants.LON_LAT_EPSILON_KEY] = 0.0001
# per variable defaults
# note: if all your plots are vector plots you can define your magnitude and direction here instead
defaultValues = { }
# a list of all the variables to analyze
setOfVariables = { }
setOfVariables['Wind Vectors, colored by Air Pressure'] = {
# when making vector plots, the arrows will be colored using the data you're nominally comparing
constants.VARIABLE_TECH_NAME_KEY: 'pressure',
constants.MAGNITUDE_VAR_NAME_KEY: 'wind_speed',
constants.DIRECTION_VAR_NAME_KEY: 'wind_direction',
# if the magnitude and direction have a different name in the second file, use these
# Note: if you are using Glance 0.5.0 or earlier you must define all four of these for
# a comparison report, even if the B File has the same variable names as the A file.
#constants.MAGNITUDE_B_VAR_NAME_KEY: 'speed',
#constants.DIRECTION_B_VAR_NAME_KEY: 'direction',
}
examples/plots/Latitude/A.png

38.4 KiB

examples/plots/Latitude/AbsDiff.png

36.5 KiB

examples/plots/Latitude/B.png

38.3 KiB

examples/plots/Latitude/DensityScatter.png

47.8 KiB

examples/plots/Latitude/Diff.png

37 KiB

examples/plots/Latitude/Hex.png

59.6 KiB

examples/plots/Latitude/Hist.png

60.8 KiB

examples/plots/Latitude/Mismatch.png

45.9 KiB

examples/plots/Latitude/Scatter.png

45.9 KiB

examples/plots/Longitude/A.png

69.7 KiB