diff --git a/pyglance/glance/gui_constants.py b/pyglance/glance/gui_constants.py index e106516bf84a65293fe8458ab548f91f2ce950a8..ce553fc0b3d509fd37fdd46ab69a5545f6193162 100644 --- a/pyglance/glance/gui_constants.py +++ b/pyglance/glance/gui_constants.py @@ -69,8 +69,8 @@ DATA_FORMS = [SIMPLE_2D, ONLY_1D] # the default names that the model will try to select for the latitude and longitude -DEFAULT_LONGITUDE = 'pixel_longitude' -DEFAULT_LATITUDE = 'pixel_latitude' +DEFAULT_LONGITUDES = ['pixel_longitude', 'longitude', 'Longitude',] +DEFAULT_LATITUDES = ['pixel_latitude', 'latitude', 'Latitude',] # the number of bins to use for histograms DEFAULT_NUM_BINS = 50 diff --git a/pyglance/glance/gui_model.py b/pyglance/glance/gui_model.py index 8146e606aa6e6c327ebdccb0d135e8f577f9bd6e..925d46d76edacea07a6a184fa91ed2ddd85bb9c8 100644 --- a/pyglance/glance/gui_model.py +++ b/pyglance/glance/gui_model.py @@ -242,10 +242,12 @@ class GlanceGUIModel (object) : # set the longitude and latitude names, using the defaults if they exist self.fileData[filePrefix].latitude = tempVariable self.fileData[filePrefix].longitude = tempVariable - if DEFAULT_LATITUDE in variableList : - self.fileData[filePrefix].latitude = DEFAULT_LATITUDE - if DEFAULT_LONGITUDE in variableList : - self.fileData[filePrefix].longitude = DEFAULT_LONGITUDE + for temp_lat_name in DEFAULT_LATITUDES : + if temp_lat_name in variableList : + self.fileData[filePrefix].latitude = temp_lat_name + for temp_lon_name in DEFAULT_LONGITUDES : + if temp_lon_name in variableList : + self.fileData[filePrefix].longitude = temp_lon_name # make sure the longitude and latitude are loaded into our local cache # TODO, it would be good to background this task at some point