Changeset 955

Show
Ignore:
Timestamp:
04/05/12 17:49:51 (14 months ago)
Author:
jjr8
Message:

* Finished implementation of #537: Add support for GHRSST Level 4 datasets
* Cleaned up some documentation of for the front detection tools.

Location:
MGET/Branches/Jason/PythonPackage/src/GeoEco
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • MGET/Branches/Jason/PythonPackage/src/GeoEco/DataProducts/HYCOM.py

    r953 r955  
    34143414 
    34153415This tool efficiently downloads 2D time/depth slices of a specified 4D 
    3416 HYCOM variable, executes the Cayula-Cornillon SIED algorithm to 
     3416HYCOM variable, executes the Cayula and Cornillon SIED algorithm to 
    34173417identify fronts in each 2D slice, and creates rasters showing the 
    34183418locations of the fronts. 
     
    34813481* temperature - Sea water potential temperature, in degrees C. 
    34823482 
    3483 The Cayula-Cornillon SIED algorithm has traditionally been applied to 
     3483The Cayula and Cornillon SIED algorithm has traditionally been applied to 
    34843484surface temperature, but in principle, it can be applied to salinity 
    34853485as well."""), 
     
    35263526  any histogram windows that had sufficiently large numbers of 
    35273527  non-masked pixels to proceed with the histogramming step of the 
    3528   Cayula-Cornillon algorithm. 
     3528  Cayula and Cornillon algorithm. 
    35293529 
    35303530* 0 - The pixel was a candidate for containing a front -- it was not 
     
    36703670in a histogram window that had a sufficiently large number of 
    36713671non-masked pixels to proceed with the histogramming step of the 
    3672 Cayula-Cornillon algorithm. If the histogram window stride is less 
     3672Cayula and Cornillon algorithm. If the histogram window stride is less 
    36733673than the window size, successive histogram windows will overlap, and 
    36743674many pixels will have candidate counts greater than 1. Masked pixels 
  • MGET/Branches/Jason/PythonPackage/src/GeoEco/DataProducts/NASA/PODAAC.py

    r953 r955  
    2020 
    2121import datetime 
     22import os 
    2223 
    2324from GeoEco.Datasets import Dataset, QueryableAttribute, Grid 
     
    526527                                                                           'TCornerCoordType': 'min', 
    527528                                                                           'CoordDependencies': (None, None, None), 
    528                                                                            'PhysicalDimensions': u'tyx', 
    529                                                                            'PhysicalDimensionsFlipped': (False, False, False)}) 
     529                                                                           'PhysicalDimensions': u'tyx'}) 
    530530 
    531531    def _GetLazyPropertyPhysicalValue(self, name): 
     
    537537        self.ParentCollection._Open() 
    538538 
    539         if name in ['CoordIncrements', 'CornerCoords']: 
     539        if name in ['CoordIncrements', 'CornerCoords', 'PhysicalDimensionsFlipped']: 
    540540            lon = self.ParentCollection._PydapDataset['lon'] 
    541541            lat = self.ParentCollection._PydapDataset['lat'] 
    542542 
    543             if lon[0] > lon[-1]: 
    544                 self.SetLazyPropertyValue('CoordIncrements', (1., (lat[-1] - lat[0]) / (lat.shape[0] - 1), (lon[-1] + 360. - lon[0]) / (lon.shape[0] - 1)))     # For datasets such as ABOM-L4HRfnd-AUS-RAMSSA_09km that cross the 180th meridian, use a 0-to-360 coordinate system 
     543            yIncrement = abs((lat[-1] - lat[0]) / (lat.shape[0] - 1)) 
     544 
     545            if os.path.basename(self.ParentCollection.URL).find('-GLOB-') >= 0:      # If it is a global dataset, assume 360 degrees longitude and calculate the x increment at full precision. 
     546                xIncrement = 360. / self.Shape[-1] 
     547            elif lon[0] > lon[-1]: 
     548                xIncrement = abs((lon[-1] + 360. - lon[0]) / (lon.shape[0] - 1))     # For datasets such as ABOM-L4HRfnd-AUS-RAMSSA_09km that cross the 180th meridian, use a 0-to-360 coordinate system 
    545549            else: 
    546                 self.SetLazyPropertyValue('CoordIncrements', (1., (lat[-1] - lat[0]) / (lat.shape[0] - 1), (lon[-1] - lon[0]) / (lon.shape[0] - 1))) 
    547  
    548             self.SetLazyPropertyValue('CornerCoords', (datetime.datetime(1980, 1, 1), lat[0], lon[0]))      # Use fake time coordinate; the true time coordinates are parsed from the file name.  
     550                xIncrement = abs((lon[-1] - lon[0]) / (lon.shape[0] - 1)) 
     551                     
     552            if abs(yIncrement - xIncrement) < 0.000001:     # If x and y increments are almost exactly the same, force them to be exactly the same so that the cells are perfectly square 
     553                yIncrement = xIncrement 
     554 
     555            self.SetLazyPropertyValue('CoordIncrements', (1., yIncrement, xIncrement)) 
     556 
     557            if lat[-1] > lat[0]: 
     558                self.SetLazyPropertyValue('CornerCoords', (datetime.datetime(1980, 1, 1), lat[0], lon[0]))      # Use fake time coordinate; the true time coordinates are parsed from the file name. 
     559                self.SetLazyPropertyValue('PhysicalDimensionsFlipped', (False, False, False)) 
     560            else: 
     561                self.SetLazyPropertyValue('CornerCoords', (datetime.datetime(1980, 1, 1), lat[-1], lon[0]))      # Use fake time coordinate; the true time coordinates are parsed from the file name. 
     562                self.SetLazyPropertyValue('PhysicalDimensionsFlipped', (False, True, False)) 
    549563 
    550564            return self.GetLazyPropertyValue(name) 
     
    19431957Given a satellite name, temporal resolution, spatial resolution, and 
    19441958desired SST product, this tool efficiently downloads the corresponding 
    1945 time series of MODIS Level 3 SST images, executes the Cayula-Cornillon 
     1959time series of MODIS Level 3 SST images, executes the Cayula and Cornillon 
    19461960SIED algorithm to identify fronts, and creates rasters showing the 
    19471961locations of the fronts. 
     
    20012015 
    20022016The choice of an appropriate temporal resolution is critical to the 
    2003 successful operation of the Cayula-Cornillon algorithm. The algorithm 
     2017successful operation of the Cayula and Cornillon algorithm. The algorithm 
    20042018is designed to operate on instantaneous images of SST, not averages. 
    20052019Therefore, for best results, choose daily temporal resolution. 
     
    20232037u""" 
    20242038 
    2025 The default Cayula-Cornillon algorithm parameters are intended to be 
     2039The default Cayula and Cornillon algorithm parameters are intended to be 
    20262040used with the 4km MODIS products. If you use the 9km products, you 
    20272041might achieve better results by adjusting the parameter values, 
     
    20742088  any histogram windows that had sufficiently large numbers of 
    20752089  non-masked pixels to proceed with the histogramming step of the 
    2076   Cayula-Cornillon algorithm. 
     2090  Cayula and Cornillon algorithm. 
    20772091 
    20782092* 0 - The pixel was a candidate for containing a front -- it was not 
     
    22122226in a histogram window that had a sufficiently large number of 
    22132227non-masked pixels to proceed with the histogramming step of the 
    2214 Cayula-Cornillon algorithm. If the histogram window stride is less 
     2228Cayula and Cornillon algorithm. If the histogram window stride is less 
    22152229than the window size, successive histogram windows will overlap, and 
    22162230many pixels will have candidate counts greater than 1. Masked pixels 
     
    28532867AddMethodMetadata(GHRSSTLevel4.CreateCayulaCornillonFrontsAsArcGISRasters, 
    28542868    shortDescription=_(u'Creates rasters indicating the positions of fronts in GHRSST L4 SST images hosted by NASA JPL PO.DAAC, using the Cayula and Cornillon (1992) single image edge detection (SIED) algorithm.'), 
    2855     longDescription=_MODISL3SSTTimeSeries_LongDescription + _( 
     2869    longDescription=_GHRSSTLevel4_LongDescription + _( 
    28562870u""" 
    28572871 
    28582872Given a desired GHRSST L4 product, this tool efficiently downloads the 
    2859 a time series of SST images, executes the Cayula-Cornillon SIED 
     2873a time series of SST images, executes the Cayula and Cornillon SIED 
    28602874algorithm to identify fronts, and creates rasters showing the 
    28612875locations of the fronts. 
  • MGET/Branches/Jason/PythonPackage/src/GeoEco/DataProducts/NOAA/CoastWatchAVHRR.py

    r953 r955  
    30853085        # integers that are multiplied by 0.01 to obtain the 
    30863086        # actual SST value as a 32-bit float. The 
    3087         # Cayula-Cornillon algorithm operates on integers, 
     3087        # Cayula and Cornillon algorithm operates on integers, 
    30883088        # however, so when we export the variable to a binary 
    30893089        # file, we must do it as integers, not floats. 
     
    31003100 
    31013101        else: 
    3102             Logger.RaiseException(ValueError(_(u'Cannot find fronts in the variable %(var)s of CoastWatch file %(file)s because the data type of the variable is %(type)s. The Cayula-Cornillon edge detection algorithm can only operate on integer data. In CoastWatch files, only variables with the data types "ubyte" or "short" may be used.') % {u'var': variable, u'file': imageFileTemp, u'type': metadata[u'Type']})) 
     3102            Logger.RaiseException(ValueError(_(u'Cannot find fronts in the variable %(var)s of CoastWatch file %(file)s because the data type of the variable is %(type)s. The Cayula and Cornillon edge detection algorithm can only operate on integer data. In CoastWatch files, only variables with the data types "ubyte" or "short" may be used.') % {u'var': variable, u'file': imageFileTemp, u'type': metadata[u'Type']})) 
    31033103 
    31043104        # Execute cwexport to create a binary file. 
     
    65286528 
    65296529AddMethodMetadata(CoastWatchAVHRR.FindFrontsAsBinaryRaster, 
    6530     shortDescription=_(u'Finds fronts in a CoastWatch POES AVHRR image using the Cayula-Cornillon (1992) single-image edge detection algorithm and outputs them to a binary raster.'), 
     6530    shortDescription=_(u'Finds fronts in a CoastWatch POES AVHRR image using the Cayula and Cornillon (1992) single-image edge detection algorithm and outputs them to a binary raster.'), 
    65316531    isExposedToPythonCallers=True, 
    65326532    isExposedByCOM=True, 
     
    66486648 
    66496649AddMethodMetadata(CoastWatchAVHRR.FindFrontsAsArcGISRaster, 
    6650     shortDescription=_(u'Finds fronts in a CoastWatch POES AVHRR image using the Cayula-Cornillon (1992) single-image edge detection algorithm and outputs them to an ArcGIS raster.'), 
     6650    shortDescription=_(u'Finds fronts in a CoastWatch POES AVHRR image using the Cayula and Cornillon (1992) single-image edge detection algorithm and outputs them to an ArcGIS raster.'), 
    66516651    isExposedToPythonCallers=True, 
    66526652    isExposedByCOM=True, 
     
    66736673  any histogram windows that had sufficiently large numbers of 
    66746674  non-masked pixels to proceed with the histogramming step of the 
    6675   Cayula-Cornillon algorithm. 
     6675  Cayula and Cornillon algorithm. 
    66766676 
    66776677* 0 - The pixel was a candidate for containing a front -- it was not 
     
    67236723    description=_( 
    67246724u"""Output raster that shows the pixels of the input image that were 
    6725 masked prior to executing the Cayula-Cornillon algorithm. 
     6725masked prior to executing the Cayula and Cornillon algorithm. 
    67266726 
    67276727The raster will contain 8-bit integers and have the same dimensions as 
     
    67536753the number of times it appeared in a histogram window that had a 
    67546754sufficiently large number of non-masked pixels to proceed with the 
    6755 histogramming step of the Cayula-Cornillon algorithm. 
     6755histogramming step of the Cayula and Cornillon algorithm. 
    67566756 
    67576757The raster will contain 16-bit signed integers and have the same 
     
    74247424  any histogram windows that had sufficiently large numbers of 
    74257425  non-masked pixels to proceed with the histogramming step of the 
    7426   Cayula-Cornillon algorithm. 
     7426  Cayula and Cornillon algorithm. 
    74277427 
    74287428* 0 - The pixel was a candidate for containing a front -- it was not 
     
    74387438 
    74397439_(u"""%s output rasters to create that show the pixels of the input 
    7440 images that were masked prior to executing the Cayula-Cornillon 
     7440images that were masked prior to executing the Cayula and Cornillon 
    74417441algorithm. 
    74427442 
     
    74597459containing fronts, i.e. the number of times the pixels appeared in 
    74607460histogram windows that had a sufficiently large number of non-masked 
    7461 pixels to proceed with the histogramming step of the Cayula-Cornillon 
     7461pixels to proceed with the histogramming step of the Cayula and Cornillon 
    74627462algorithm. 
    74637463 
     
    75097509  any histogram windows that had sufficiently large numbers of 
    75107510  non-masked pixels to proceed with the histogramming step of the 
    7511   Cayula-Cornillon algorithm. 
     7511  Cayula and Cornillon algorithm. 
    75127512 
    75137513* 0 - The pixel was a candidate for containing a front -- it was not 
     
    75567556_(u"""Python expression used to calculate the absolute path of the 
    75577557output raster that shows the pixels of the input image that were 
    7558 masked prior to executing the Cayula-Cornillon algorithm. If an 
     7558masked prior to executing the Cayula and Cornillon algorithm. If an 
    75597559expression is not provided, this raster will not be created. 
    75607560 
     
    75927592number of times the pixels appeared in histogram windows that had a 
    75937593sufficiently large number of non-masked pixels to proceed with the 
    7594 histogramming step of the Cayula-Cornillon algorithm. If an expression 
     7594histogramming step of the Cayula and Cornillon algorithm. If an expression 
    75957595is not provided, this raster will not be created. 
    75967596 
     
    76547654    constantParamNames=[u'minPopMeanDifference', u'cloudVariable', u'sunZenithVariable', u'useDayCloudTest1', u'useDayCloudTest2', u'useDayCloudTest3', u'useDayCloudTest4', u'useDayCloudTest5', u'useDayCloudTest6', u'useDayCloudTest7', u'maskWhenDayCloudMaskExceeds', u'useNightCloudTest1', u'useNightCloudTest2', u'useNightCloudTest3', u'useNightCloudTest4', u'useNightCloudTest5', u'useNightCloudTest6', u'useNightCloudTest7', u'maskWhenNightCloudMaskExceeds', u'minCloudyNeighbors', u'medianFilterWindowSize', u'histogramWindowSize', u'histogramWindowStride', u'minPropNonMaskedCells', u'minPopProp', u'minTheta', u'minSinglePopCohesion', u'minGlobalPopCohesion', u'threads', u'projectedCoordinateSystem', u'geographicTransformation', u'resamplingTechnique', u'projectedCellSize', u'registrationPoint', u'clippingRectangle', u'buildPyramids'], 
    76557655    processListMethodName=u'FindFrontsAsArcGISRastersList', 
    7656     processListMethodShortDescription=_(u'Finds fronts in a list of CoastWatch POES AVHRR images using the Cayula-Cornillon (1992) single-image edge detection algorithm and outputs them as ArcGIS rasters.'), 
     7656    processListMethodShortDescription=_(u'Finds fronts in a list of CoastWatch POES AVHRR images using the Cayula and Cornillon (1992) single-image edge detection algorithm and outputs them as ArcGIS rasters.'), 
    76577657    processTableMethodName=u'FindFrontsAsArcGISRastersTable', 
    7658     processTableMethodShortDescription=_(u'Finds fronts in CoastWatch POES AVHRR images listed in a table using the Cayula-Cornillon (1992) single-image edge detection algorithm and outputs them as ArcGIS rasters.'), 
     7658    processTableMethodShortDescription=_(u'Finds fronts in CoastWatch POES AVHRR images listed in a table using the Cayula and Cornillon (1992) single-image edge detection algorithm and outputs them as ArcGIS rasters.'), 
    76597659    processArcGISTableMethodName=u'FindFrontsAsArcGISRastersArcGISTable', 
    76607660    processArcGISTableMethodArcGISDisplayName=_(u'Cayula-Cornillon Fronts in CoastWatch Images Listed in Table as ArcGIS Rasters'), 
    76617661    findAndProcessMethodName=u'FindCoastWatchFilesAndFindFrontsAsArcGISRasters', 
    76627662    findAndProcessMethodArcGISDisplayName=u'Find CoastWatch Images and Find Cayula-Cornillon Fronts as ArcGIS Rasters', 
    7663     findAndProcessMethodShortDescription=_(u'Uses the Cayula-Cornillon (1992) single-image edge detection algorithm to find fronts in the CoastWatch POES AVHRR images found in a directory, and outputs the fronts as ArcGIS rasters.'), 
     7663    findAndProcessMethodShortDescription=_(u'Uses the Cayula and Cornillon (1992) single-image edge detection algorithm to find fronts in the CoastWatch POES AVHRR images found in a directory, and outputs the fronts as ArcGIS rasters.'), 
    76647664    findMethod=CoastWatchAVHRR.FindImagesInFilesAndCreateTable, 
    76657665    findOutputFieldParams=[u'fileField', u'variableField'], 
  • MGET/Branches/Jason/PythonPackage/src/GeoEco/DataProducts/NOAA/NODC.py

    r953 r955  
    10251025                    definiteClouds[reclaimedClouds] = False 
    10261026 
    1027             # The Cayula-Cornillon algorithm median-filters the SST 
     1027            # The Cayula and Cornillon algorithm median-filters the SST 
    10281028            # image before running the edge detection step. Because of 
    10291029            # that, we can ignore clouds that would just get filled in 
     
    29822982Given a temporal resolution and observation time, this tool 
    29832983efficiently downloads a time series of Pathfinder SST images, executes 
    2984 the Cayula-Cornillon SIED algorithm to identify fronts, and creates 
     2984the Cayula and Cornillon SIED algorithm to identify fronts, and creates 
    29852985rasters showing the locations of the fronts. 
    29862986 
     
    30543054 
    30553055The choice of an appropriate temporal resolution is critical to the 
    3056 successful operation of the Cayula-Cornillon algorithm. The algorithm 
     3056successful operation of the Cayula and Cornillon algorithm. The algorithm 
    30573057is designed to operate on instantaneous images of SST, not averages. 
    30583058Therefore, for best results, choose daily temporal resolution. 
     
    31223122  any histogram windows that had sufficiently large numbers of 
    31233123  non-masked pixels to proceed with the histogramming step of the 
    3124   Cayula-Cornillon algorithm. 
     3124  Cayula and Cornillon algorithm. 
    31253125 
    31263126* 0 - The pixel was a candidate for containing a front -- it was not 
     
    33663366in a histogram window that had a sufficiently large number of 
    33673367non-masked pixels to proceed with the histogramming step of the 
    3368 Cayula-Cornillon algorithm. If the histogram window stride is less 
     3368Cayula and Cornillon algorithm. If the histogram window stride is less 
    33693369than the window size, successive histogram windows will overlap, and 
    33703370many pixels will have candidate counts greater than 1. Masked pixels 
  • MGET/Branches/Jason/PythonPackage/src/GeoEco/OceanographicAnalysis/Fronts.py

    r953 r955  
    164164            bufferedImage[bufferSize:bufferSize+image.shape[0], -bufferSize:] = bufferedImage[bufferSize:bufferSize+image.shape[0], bufferSize:bufferSize*2] 
    165165 
    166         # Run the Cayula-Cornillon (1992) single-image edge detection 
     166        # Run the Cayula and Cornillon (1992) single-image edge detection 
    167167        # algorithm. This function performs the histogram and cohesion 
    168168        # steps, but does not perform contour following, thinning or 
     
    607607            pixelType = gp.Describe(inputRaster).PixelType 
    608608            if pixelType.lower() not in ['s1', 'u1', 's2', 'u2', 's4', 'u4', 's8', 'u8', 's16', 'u16', 's32', 'u32']: 
    609                 Logger.RaiseException(ValueError(_(u'The input raster must contain integers in order to be processed by the Cayula-Cornillon algorithm. Please provide a raster that meets this requirement. Alternatively, you can use the Map Algebra Expression parameter to convert your data.'))) 
     609                Logger.RaiseException(ValueError(_(u'The input raster must contain integers in order to be processed by the Cayula and Cornillon algorithm. Please provide a raster that meets this requirement. Alternatively, you can use the Map Algebra Expression parameter to convert your data.'))) 
    610610 
    611611        # Detect the fronts. 
     
    653653                    pixelType = gp.Describe(inputRasterToProcess).PixelType 
    654654                    if pixelType.lower() not in ['s1', 'u1', 's2', 'u2', 's4', 'u4', 's8', 'u8', 's16', 'u16', 's32', 'u32']: 
    655                         Logger.RaiseException(ValueError(_(u'The map algebra expression you provided did not yield a raster that contains integers. The Cayula-Cornillon algorithm can only process integers. Please provide a map algebra expression that yields integers.'))) 
     655                        Logger.RaiseException(ValueError(_(u'The map algebra expression you provided did not yield a raster that contains integers. The Cayula and Cornillon algorithm can only process integers. Please provide a map algebra expression that yields integers.'))) 
    656656 
    657657                # Read the raster into a numpy array. 
     
    751751 
    752752        if grid.UnscaledDataType.startswith('f') and unscalingFunction is None: 
    753             raise ValueError(_(u'The grid has a floating point data type but an unscaling function was not supplied. An unscaling function is required to convert the floating point numbers to integers so that the Cayula-Cornillon algorithm can be applied to them. If you do not know what unscaling function to use, try: lambda a: numpy.cast[\'int16\'](a * 10)')) 
     753            raise ValueError(_(u'The grid has a floating point data type but an unscaling function was not supplied. An unscaling function is required to convert the floating point numbers to integers so that the Cayula and Cornillon algorithm can be applied to them. If you do not know what unscaling function to use, try: lambda a: numpy.cast[\'int16\'](a * 10)')) 
    754754 
    755755        # Initialize our properties. 
     
    783783 
    784784        if tQAName is not None and zQAName is not None: 
    785             displayName = _(u'Cayula-Cornillon SIED fronts in the %(tdn)s and %(zdn)s slices of %(dn)s') % {u'tdn': tQADisplayName.lower(), u'zdn': zQADisplayName.lower(), u'dn': self._Grid.DisplayName} 
     785            displayName = _(u'Cayula and Cornillon SIED fronts in the %(tdn)s and %(zdn)s slices of %(dn)s') % {u'tdn': tQADisplayName.lower(), u'zdn': zQADisplayName.lower(), u'dn': self._Grid.DisplayName} 
    786786        elif tQAName is not None: 
    787             displayName = _(u'Cayula-Cornillon SIED fronts in the %(tdn)s slices of %(dn)s') % {u'tdn': tQADisplayName.lower(), u'dn': self._Grid.DisplayName} 
     787            displayName = _(u'Cayula and Cornillon SIED fronts in the %(tdn)s slices of %(dn)s') % {u'tdn': tQADisplayName.lower(), u'dn': self._Grid.DisplayName} 
    788788        else: 
    789             displayName = _(u'Cayula-Cornillon SIED fronts in the %(zdn)s slices of %(dn)s') % {u'zdn': zQADisplayName.lower(), u'dn': self._Grid.DisplayName} 
    790  
    791         super(CayulaCornillonFrontsInGrid, self).__init__(grid, tQAName, tQADisplayName, tQACoordType, zQAName, zQADisplayName, zQACoordType, displayName, [QueryableAttribute(u'ImageType', u'Cayula-Cornillon image type', UnicodeStringTypeMetadata(allowedValues=[u'ccnt', u'fcnt', u'floc', u'wsco', u'wsvl'], makeLowercase=True))]) 
     789            displayName = _(u'Cayula and Cornillon SIED fronts in the %(zdn)s slices of %(dn)s') % {u'zdn': zQADisplayName.lower(), u'dn': self._Grid.DisplayName} 
     790 
     791        super(CayulaCornillonFrontsInGrid, self).__init__(grid, tQAName, tQADisplayName, tQACoordType, zQAName, zQADisplayName, zQACoordType, displayName, [QueryableAttribute(u'ImageType', u'Cayula and Cornillon image type', UnicodeStringTypeMetadata(allowedValues=[u'ccnt', u'fcnt', u'floc', u'wsco', u'wsvl'], makeLowercase=True))]) 
    792792 
    793793    def _EvaluateExpressionForSlice(self, parsedExpression, attrValues, t, z, tCoord, zCoord, progressReporter): 
     
    849849                noDataValue = self._Grid.UnscaledNoDataValue 
    850850                if self._Grid.DataType != self._Grid.UnscaledDataType: 
    851                     minPopMeanDifference = float(self._Grid.GetLazyPropertyValue('UnscalingFunction')(self._MinPopMeanDifference))      # Convert self._MinPopMeanDifference from degrees C to unscaled integer counts 
     851                    minPopMeanDifference = float(self._Grid.GetLazyPropertyValue('UnscalingFunction')(self._MinPopMeanDifference)) - float(self._Grid.GetLazyPropertyValue('UnscalingFunction')(0.))      # Convert self._MinPopMeanDifference from degrees C to unscaled integer counts 
    852852                else: 
    853853                    minPopMeanDifference = self._MinPopMeanDifference 
    854854             
    855855            if self._TQAName is not None and self._ZQAName is not None: 
    856                 Logger.Debug(_(u'Finding Cayula-Cornillon SIED fronts in %(tdn)s, %(zdn)s slice %(t)i, %(z)i of %(dn)s') % {u'tdn': self._TQADisplayName.lower(), u'zdn': self._ZQADisplayName.lower(), u't': key[0], u'z': key[1], u'dn': self._Grid.DisplayName}) 
     856                Logger.Debug(_(u'Finding Cayula and Cornillon SIED fronts in %(tdn)s, %(zdn)s slice %(t)i, %(z)i of %(dn)s') % {u'tdn': self._TQADisplayName.lower(), u'zdn': self._ZQADisplayName.lower(), u't': key[0], u'z': key[1], u'dn': self._Grid.DisplayName}) 
    857857            elif self._TQAName is not None: 
    858                 Logger.Debug(_(u'Finding Cayula-Cornillon SIED fronts in %(tdn)s slice %(t)i of %(dn)s') % {u'tdn': self._TQADisplayName.lower(), u't': key[0], u'dn': self._Grid.DisplayName}) 
     858                Logger.Debug(_(u'Finding Cayula and Cornillon SIED fronts in %(tdn)s slice %(t)i of %(dn)s') % {u'tdn': self._TQADisplayName.lower(), u't': key[0], u'dn': self._Grid.DisplayName}) 
    859859            else: 
    860                 Logger.Debug(_(u'Finding Cayula-Cornillon SIED fronts in %(zdn)s slice %(z)i of %(dn)s') % {u'zdn': self._ZQADisplayName.lower(), u'z': key[0], u'dn': self._Grid.DisplayName}) 
     860                Logger.Debug(_(u'Finding Cayula and Cornillon SIED fronts in %(zdn)s slice %(z)i of %(dn)s') % {u'zdn': self._ZQADisplayName.lower(), u'z': key[0], u'dn': self._Grid.DisplayName}) 
    861861 
    862862            if noDataValue is not None: 
     
    897897 
    898898        if self._InstantiatingCollection._TQAName is not None and self._InstantiatingCollection._ZQAName is not None: 
    899             displayName = _(u'Cayula-Cornillon SIED fronts in the %(tdn)s and %(zdn)s slices of %(dn)s') % {u'tdn': self._InstantiatingCollection._TQADisplayName.lower(), u'zdn': self._InstantiatingCollection._ZQADisplayName.lower(), u'dn': self._InstantiatingCollection._Grid.DisplayName} 
     899            displayName = _(u'Cayula and Cornillon SIED fronts in the %(tdn)s and %(zdn)s slices of %(dn)s') % {u'tdn': self._InstantiatingCollection._TQADisplayName.lower(), u'zdn': self._InstantiatingCollection._ZQADisplayName.lower(), u'dn': self._InstantiatingCollection._Grid.DisplayName} 
    900900        elif self._InstantiatingCollection._TQAName is not None: 
    901             displayName = _(u'Cayula-Cornillon SIED fronts in the %(tdn)s slices of %(dn)s') % {u'tdn': self._InstantiatingCollection._TQADisplayName.lower(), u'dn': self._InstantiatingCollection._Grid.DisplayName} 
     901            displayName = _(u'Cayula and Cornillon SIED fronts in the %(tdn)s slices of %(dn)s') % {u'tdn': self._InstantiatingCollection._TQADisplayName.lower(), u'dn': self._InstantiatingCollection._Grid.DisplayName} 
    902902        else: 
    903             displayName = _(u'Cayula-Cornillon SIED fronts in the %(zdn)s slices of %(dn)s') % {u'zdn': self._InstantiatingCollection._ZQADisplayName.lower(), u'dn': self._InstantiatingCollection._Grid.DisplayName} 
     903            displayName = _(u'Cayula and Cornillon SIED fronts in the %(zdn)s slices of %(dn)s') % {u'zdn': self._InstantiatingCollection._ZQADisplayName.lower(), u'dn': self._InstantiatingCollection._Grid.DisplayName} 
    904904 
    905905        super(_CayulaCornillonFrontsImageForGridSlice, self).__init__(self._InstantiatingCollection._Grid, 
     
    10351035 
    10361036In 2005, I obtained a Rational Fortran (Ratfor) version of the 
    1037 Cayula-Cornillon algorithm from Dave Ullman. Although it had been 
     1037Cayula and Cornillon algorithm from Dave Ullman. Although it had been 
    10381038modified extensively from the 1992 version, mainly to incorporate the 
    10391039multi-image edge detection (MIED) algorithm (Cayula and Cornillon 
     
    11181118u"""The image in which edges should be detected. 
    11191119 
    1120 The image pixels must be integers. The Cayula-Cornillon algorithm is 
     1120The image pixels must be integers. The Cayula and Cornillon algorithm is 
    11211121designed to operate on the original unscaled integer data provided by 
    11221122the original data provider. For example, the NOAA NODC 4km AVHRR 
     
    11331133    description=_( 
    11341134u"""If True, the input image is assumed to be a cylinder, with the 
    1135 east and west edges connected. The Cayula-Cornillon algorithm will 
     1135east and west edges connected. The Cayula and Cornillon algorithm will 
    11361136"wrap around" to the other side of the image when needed. If False, 
    11371137the east and west edges are assumed to not be connected, and the 
     
    11491149u"""Minimum allowed value for pixels of the input image. If a value is 
    11501150provided, pixels less than this value will be masked prior to running 
    1151 the Cayula-Cornillon algorithm."""), 
     1151the Cayula and Cornillon algorithm."""), 
    11521152    arcGISDisplayName=_(u'Minimum allowed image value'), 
    11531153    arcGISCategory=_(u'Mask options')) 
     
    11581158u"""Maximum allowed value for pixels of the input image. If a value is 
    11591159provided, pixels greater than this value will be masked prior to 
    1160 running the Cayula-Cornillon algorithm."""), 
     1160running the Cayula and Cornillon algorithm."""), 
    11611161    arcGISDisplayName=_(u'Maximum allowed image value'), 
    11621162    arcGISCategory=_(u'Mask options')) 
     
    11661166    description=_( 
    11671167u"""List of masks to apply to the input image before running the 
    1168 Cayula-Cornillon algorithm on it. Each item in the list corresponds to 
     1168Cayula and Cornillon algorithm on it. Each item in the list corresponds to 
    11691169parallel entries in the lists of mask tests and values. 
    11701170 
     
    12311231u"""Window size, in pixels, of the median filter to apply to the input 
    12321232image prior to running the histogram analysis step of the 
    1233 Cayula-Cornillon algorithm. If not provided, median filtering will not 
     1233Cayula and Cornillon algorithm. If not provided, median filtering will not 
    12341234be performed. 
    12351235 
     
    12411241 
    12421242Median filtering is a traditional first step for certain classes of 
    1243 edge detection algorithms. The original Cayula-Cornillon paper used a 
     1243edge detection algorithms. The original Cayula and Cornillon paper used a 
    12441244window size of 3."""), 
    12451245    arcGISDisplayName=_(u'Median filter window size'), 
    1246     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1246    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    12471247 
    12481248AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'histogramWindowSize', 
    12491249    typeMetadata=IntegerTypeMetadata(minValue=8, maxValue=128), 
    12501250    description=_( 
    1251 u"""Size of the histogram window to use for the Cayula-Cornillon 
     1251u"""Size of the histogram window to use for the Cayula and Cornillon 
    12521252algorithm. 
    12531253 
     
    12591259sizes."""), 
    12601260    arcGISDisplayName=_(u'Histogram window size'), 
    1261     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1261    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    12621262 
    12631263AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'histogramWindowStride', 
     
    12651265    description=_( 
    12661266u"""Number of pixels to move the histogram window after each iteration 
    1267 of the Cayula-Cornillon algorithm. 
     1267of the Cayula and Cornillon algorithm. 
    12681268 
    12691269The original paper used a 32x32 window and a stride of 16, to minimize 
     
    12801280Options) to thin the fronts back to one pixel wide."""), 
    12811281    arcGISDisplayName=_(u'Histogram window stride'), 
    1282     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1282    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    12831283 
    12841284AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPropNonMaskedCells', 
     
    129812980.65."""), 
    12991299    arcGISDisplayName=_(u'Minimum proportion of non-masked pixels'), 
    1300     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1300    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    13011301 
    13021302AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPopProp', 
     
    13171317understand the statistical analysis presented in the 1992 paper."""), 
    13181318    arcGISDisplayName=_(u'Minimum proportion of smaller population'), 
    1319     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1319    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    13201320 
    13211321AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPopMeanDifference', 
     
    13531353less than 1 degree, set this parameter to 1 / 0.075 = 13.333333."""), 
    13541354    arcGISDisplayName=_(u'Minimum population mean difference'), 
    1355     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1355    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    13561356 
    13571357AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minTheta', 
     
    13781378understand the statistics presented in the original paper."""), 
    13791379    arcGISDisplayName=_(u'Minimum value for criterion function'), 
    1380     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1380    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    13811381 
    13821382AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minSinglePopCohesion', 
     
    14051405For a 16x16 window, the equation evaluates to 0.8675."""), 
    14061406    arcGISDisplayName=_(u'Minimum single-population cohesion'), 
    1407     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1407    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    14081408 
    14091409AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minGlobalPopCohesion', 
     
    14221422For a 16x16 window, the equation evaluates to 0.8875."""), 
    14231423    arcGISDisplayName=_(u'Minimum global-population cohesion'), 
    1424     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1424    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    14251425 
    14261426AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'threads', 
     
    14371437reduce performance."""), 
    14381438    arcGISDisplayName=_(u'Processing threads'), 
    1439     arcGISCategory=_(u'Cayula-Cornillon algorithm parameters')) 
     1439    arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 
    14401440 
    14411441AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'fillHoles', 
     
    15411541it appeared in a histogram window that had a sufficiently large number 
    15421542of non-masked pixels to proceed with the histogramming step of the 
    1543 Cayula-Cornillon algorithm. If the histogram window stride is less 
     1543Cayula and Cornillon algorithm. If the histogram window stride is less 
    15441544than the window size, successive histogram windows will overlap, and 
    15451545many pixels will have candidate counts greater than 1. Masked pixels 
     
    15721572  any histogram windows that had sufficiently large numbers of 
    15731573  non-masked pixels to proceed with the histogramming step of the 
    1574   Cayula-Cornillon algorithm. 
     1574  Cayula and Cornillon algorithm. 
    15751575 
    15761576* 0 - The pixel was a candidate for containing a front -- it was not 
     
    17411741* uint16 - 16-bit unsigned integer, range 0 to 65535 
    17421742 
    1743 The Cayula-Cornillon algorithm is designed to operate on the original 
     1743The Cayula and Cornillon algorithm is designed to operate on the original 
    17441744unscaled integer data provided by the original data provider. For 
    17451745example, the NOAA NODC 4km AVHRR Pathfinder version 5.0 dataset 
     
    18141814  any histogram windows that had sufficiently large numbers of 
    18151815  non-masked pixels to proceed with the histogramming step of the 
    1816   Cayula-Cornillon algorithm. 
     1816  Cayula and Cornillon algorithm. 
    18171817 
    18181818* 0 - The pixel was a candidate for containing a front -- it was not 
     
    18551855    description=_( 
    18561856u"""Binary rasters to apply as masks to the input image before running 
    1857 the Cayula-Cornillon algorithm on it. Each item in this list 
     1857the Cayula and Cornillon algorithm on it. Each item in this list 
    18581858corresponds to parallel entries in the lists of mask data types, 
    18591859tests, and values. 
     
    19581958    description=_( 
    19591959u"""Output binary raster that shows the pixels of the input image that 
    1960 were masked prior to executing the Cayula-Cornillon algorithm. 
     1960were masked prior to executing the Cayula and Cornillon algorithm. 
    19611961 
    19621962The file will have the same dimensions as the input image and contain 
     
    20912091one of the acceptable ranges. 
    20922092 
    2093 The Cayula-Cornillon algorithm cannot operate on floating-point data. 
     2093The Cayula and Cornillon algorithm cannot operate on floating-point data. 
    20942094If your input raster contains floating-point numbers, use the Map 
    20952095Algebra Expression option to instruct this tool to convert the raster 
     
    21652165  it did not appear in any histogram windows that had sufficiently 
    21662166  large numbers of pixels that were not NoData in the input image to 
    2167   proceed with the histogramming step of the Cayula-Cornillon 
     2167  proceed with the histogramming step of the Cayula and Cornillon 
    21682168  algorithm. 
    21692169 
     
    21922192    description=_( 
    21932193u"""Map algebra expression to execute on the input raster before 
    2194 running the Cayula-Cornillon algorithm. 
     2194running the Cayula and Cornillon algorithm. 
    21952195 
    21962196**WARNING:** The ArcGIS Geoprocessing Model Builder may randomly and 
     
    22542254u"""Window size, in pixels, of the median filter to apply to the input 
    22552255image prior to running the histogram analysis step of the 
    2256 Cayula-Cornillon algorithm. If not provided, median filtering will not 
     2256Cayula and Cornillon algorithm. If not provided, median filtering will not 
    22572257be performed. 
    22582258 
     
    23342334the number of times it appeared in a histogram window that had a 
    23352335sufficiently large number of pixels to proceed with the histogramming 
    2336 step of the Cayula-Cornillon algorithm. 
     2336step of the Cayula and Cornillon algorithm. 
    23372337 
    23382338The raster will contain 16-bit signed integers and have the same 
     
    24422442 
    24432443Each raster must contain 8-bit or 16-bit integers (signed or 
    2444 unsigned). The Cayula-Cornillon algorithm cannot operate on 
     2444unsigned). The Cayula and Cornillon algorithm cannot operate on 
    24452445floating-point data. If your input rasters contain floating-point 
    24462446numbers, use the Map Algebra Expression option to instruct this tool 
     
    24652465  it did not appear in any histogram windows that had sufficiently 
    24662466  large numbers of pixels that were not NoData in the input image to 
    2467   proceed with the histogramming step of the Cayula-Cornillon 
     2467  proceed with the histogramming step of the Cayula and Cornillon 
    24682468  algorithm. 
    24692469 
     
    24932493containing fronts, i.e. the number of times the pixels appeared in 
    24942494histogram windows that had a sufficiently large number of non-masked 
    2495 pixels to proceed with the histogramming step of the Cayula-Cornillon 
     2495pixels to proceed with the histogramming step of the Cayula and Cornillon 
    24962496algorithm. 
    24972497 
     
    25442544  it did not appear in any histogram windows that had sufficiently 
    25452545  large numbers of pixels that were not NoData in the input image to 
    2546   proceed with the histogramming step of the Cayula-Cornillon 
     2546  proceed with the histogramming step of the Cayula and Cornillon 
    25472547  algorithm. 
    25482548 
     
    26022602number of times the pixels appeared in histogram windows that had a 
    26032603sufficiently large number of pixels to proceed with the histogramming 
    2604 step of the Cayula-Cornillon algorithm. If an expression is not 
     2604step of the Cayula and Cornillon algorithm. If an expression is not 
    26052605provided, this raster will not be created. 
    26062606 
     
    26642664    constantParamNames=[u'minPopMeanDifference', u'wrapEdges', u'mapAlgebraExpression', u'medianFilterWindowSize', u'histogramWindowSize', u'histogramWindowStride', u'minPropNonMaskedCells', u'minPopProp', u'minTheta', u'minSinglePopCohesion', u'minGlobalPopCohesion', u'threads', u'fillHoles', u'thin', u'minSize'], 
    26652665    processListMethodName=u'DetectEdgesInArcGISRastersList', 
    2666     processListMethodShortDescription=_(u'Finds fronts in a list of ArcGIS rasters using the Cayula-Cornillon (1992) single-image edge detection algorithm.'), 
     2666    processListMethodShortDescription=_(u'Finds fronts in a list of ArcGIS rasters using the Cayula and Cornillon (1992) single-image edge detection algorithm.'), 
    26672667    processTableMethodName=u'DetectEdgesInArcGISRastersTable', 
    2668     processTableMethodShortDescription=_(u'Finds fronts in ArcGIS rasters listed in a table using the Cayula-Cornillon (1992) single-image edge detection algorithm.'), 
     2668    processTableMethodShortDescription=_(u'Finds fronts in ArcGIS rasters listed in a table using the Cayula and Cornillon (1992) single-image edge detection algorithm.'), 
    26692669    processArcGISTableMethodName=u'DetectEdgesInArcGISRastersArcGISTable', 
    26702670    processArcGISTableMethodArcGISDisplayName=_(u'Cayula-Cornillon Fronts in ArcGIS Rasters Listed in Table'), 
    26712671    findAndProcessMethodName=u'FindArcGISRastersAndDetectEdges', 
    26722672    findAndProcessMethodArcGISDisplayName=u'Find ArcGIS Rasters and Find Cayula-Cornillon Fronts', 
    2673     findAndProcessMethodShortDescription=_(u'Finds ArcGIS rasters in a workspace and finds fronts within them using the Cayula-Cornillon (1992) single-image edge detection algorithm.'), 
     2673    findAndProcessMethodShortDescription=_(u'Finds ArcGIS rasters in a workspace and finds fronts within them using the Cayula and Cornillon (1992) single-image edge detection algorithm.'), 
    26742674    findMethod=ArcGISRaster.FindAndCreateTable, 
    26752675    findOutputFieldParams=[u'rasterField'],