Changeset 955
- Timestamp:
- 04/05/12 17:49:51 (14 months ago)
- Location:
- MGET/Branches/Jason/PythonPackage/src/GeoEco
- Files:
-
- 5 modified
-
DataProducts/HYCOM.py (modified) (4 diffs)
-
DataProducts/NASA/PODAAC.py (modified) (9 diffs)
-
DataProducts/NOAA/CoastWatchAVHRR.py (modified) (14 diffs)
-
DataProducts/NOAA/NODC.py (modified) (5 diffs)
-
OceanographicAnalysis/Fronts.py (modified) (42 diffs)
Legend:
- Unmodified
- Added
- Removed
-
MGET/Branches/Jason/PythonPackage/src/GeoEco/DataProducts/HYCOM.py
r953 r955 3414 3414 3415 3415 This tool efficiently downloads 2D time/depth slices of a specified 4D 3416 HYCOM variable, executes the Cayula -Cornillon SIED algorithm to3416 HYCOM variable, executes the Cayula and Cornillon SIED algorithm to 3417 3417 identify fronts in each 2D slice, and creates rasters showing the 3418 3418 locations of the fronts. … … 3481 3481 * temperature - Sea water potential temperature, in degrees C. 3482 3482 3483 The Cayula -Cornillon SIED algorithm has traditionally been applied to3483 The Cayula and Cornillon SIED algorithm has traditionally been applied to 3484 3484 surface temperature, but in principle, it can be applied to salinity 3485 3485 as well."""), … … 3526 3526 any histogram windows that had sufficiently large numbers of 3527 3527 non-masked pixels to proceed with the histogramming step of the 3528 Cayula -Cornillon algorithm.3528 Cayula and Cornillon algorithm. 3529 3529 3530 3530 * 0 - The pixel was a candidate for containing a front -- it was not … … 3670 3670 in a histogram window that had a sufficiently large number of 3671 3671 non-masked pixels to proceed with the histogramming step of the 3672 Cayula -Cornillon algorithm. If the histogram window stride is less3672 Cayula and Cornillon algorithm. If the histogram window stride is less 3673 3673 than the window size, successive histogram windows will overlap, and 3674 3674 many pixels will have candidate counts greater than 1. Masked pixels -
MGET/Branches/Jason/PythonPackage/src/GeoEco/DataProducts/NASA/PODAAC.py
r953 r955 20 20 21 21 import datetime 22 import os 22 23 23 24 from GeoEco.Datasets import Dataset, QueryableAttribute, Grid … … 526 527 'TCornerCoordType': 'min', 527 528 'CoordDependencies': (None, None, None), 528 'PhysicalDimensions': u'tyx', 529 'PhysicalDimensionsFlipped': (False, False, False)}) 529 'PhysicalDimensions': u'tyx'}) 530 530 531 531 def _GetLazyPropertyPhysicalValue(self, name): … … 537 537 self.ParentCollection._Open() 538 538 539 if name in ['CoordIncrements', 'CornerCoords' ]:539 if name in ['CoordIncrements', 'CornerCoords', 'PhysicalDimensionsFlipped']: 540 540 lon = self.ParentCollection._PydapDataset['lon'] 541 541 lat = self.ParentCollection._PydapDataset['lat'] 542 542 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 545 549 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)) 549 563 550 564 return self.GetLazyPropertyValue(name) … … 1943 1957 Given a satellite name, temporal resolution, spatial resolution, and 1944 1958 desired SST product, this tool efficiently downloads the corresponding 1945 time series of MODIS Level 3 SST images, executes the Cayula -Cornillon1959 time series of MODIS Level 3 SST images, executes the Cayula and Cornillon 1946 1960 SIED algorithm to identify fronts, and creates rasters showing the 1947 1961 locations of the fronts. … … 2001 2015 2002 2016 The choice of an appropriate temporal resolution is critical to the 2003 successful operation of the Cayula -Cornillon algorithm. The algorithm2017 successful operation of the Cayula and Cornillon algorithm. The algorithm 2004 2018 is designed to operate on instantaneous images of SST, not averages. 2005 2019 Therefore, for best results, choose daily temporal resolution. … … 2023 2037 u""" 2024 2038 2025 The default Cayula -Cornillon algorithm parameters are intended to be2039 The default Cayula and Cornillon algorithm parameters are intended to be 2026 2040 used with the 4km MODIS products. If you use the 9km products, you 2027 2041 might achieve better results by adjusting the parameter values, … … 2074 2088 any histogram windows that had sufficiently large numbers of 2075 2089 non-masked pixels to proceed with the histogramming step of the 2076 Cayula -Cornillon algorithm.2090 Cayula and Cornillon algorithm. 2077 2091 2078 2092 * 0 - The pixel was a candidate for containing a front -- it was not … … 2212 2226 in a histogram window that had a sufficiently large number of 2213 2227 non-masked pixels to proceed with the histogramming step of the 2214 Cayula -Cornillon algorithm. If the histogram window stride is less2228 Cayula and Cornillon algorithm. If the histogram window stride is less 2215 2229 than the window size, successive histogram windows will overlap, and 2216 2230 many pixels will have candidate counts greater than 1. Masked pixels … … 2853 2867 AddMethodMetadata(GHRSSTLevel4.CreateCayulaCornillonFrontsAsArcGISRasters, 2854 2868 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 + _( 2856 2870 u""" 2857 2871 2858 2872 Given a desired GHRSST L4 product, this tool efficiently downloads the 2859 a time series of SST images, executes the Cayula -Cornillon SIED2873 a time series of SST images, executes the Cayula and Cornillon SIED 2860 2874 algorithm to identify fronts, and creates rasters showing the 2861 2875 locations of the fronts. -
MGET/Branches/Jason/PythonPackage/src/GeoEco/DataProducts/NOAA/CoastWatchAVHRR.py
r953 r955 3085 3085 # integers that are multiplied by 0.01 to obtain the 3086 3086 # actual SST value as a 32-bit float. The 3087 # Cayula -Cornillon algorithm operates on integers,3087 # Cayula and Cornillon algorithm operates on integers, 3088 3088 # however, so when we export the variable to a binary 3089 3089 # file, we must do it as integers, not floats. … … 3100 3100 3101 3101 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']})) 3103 3103 3104 3104 # Execute cwexport to create a binary file. … … 6528 6528 6529 6529 AddMethodMetadata(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.'), 6531 6531 isExposedToPythonCallers=True, 6532 6532 isExposedByCOM=True, … … 6648 6648 6649 6649 AddMethodMetadata(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.'), 6651 6651 isExposedToPythonCallers=True, 6652 6652 isExposedByCOM=True, … … 6673 6673 any histogram windows that had sufficiently large numbers of 6674 6674 non-masked pixels to proceed with the histogramming step of the 6675 Cayula -Cornillon algorithm.6675 Cayula and Cornillon algorithm. 6676 6676 6677 6677 * 0 - The pixel was a candidate for containing a front -- it was not … … 6723 6723 description=_( 6724 6724 u"""Output raster that shows the pixels of the input image that were 6725 masked prior to executing the Cayula -Cornillon algorithm.6725 masked prior to executing the Cayula and Cornillon algorithm. 6726 6726 6727 6727 The raster will contain 8-bit integers and have the same dimensions as … … 6753 6753 the number of times it appeared in a histogram window that had a 6754 6754 sufficiently large number of non-masked pixels to proceed with the 6755 histogramming step of the Cayula -Cornillon algorithm.6755 histogramming step of the Cayula and Cornillon algorithm. 6756 6756 6757 6757 The raster will contain 16-bit signed integers and have the same … … 7424 7424 any histogram windows that had sufficiently large numbers of 7425 7425 non-masked pixels to proceed with the histogramming step of the 7426 Cayula -Cornillon algorithm.7426 Cayula and Cornillon algorithm. 7427 7427 7428 7428 * 0 - The pixel was a candidate for containing a front -- it was not … … 7438 7438 7439 7439 _(u"""%s output rasters to create that show the pixels of the input 7440 images that were masked prior to executing the Cayula -Cornillon7440 images that were masked prior to executing the Cayula and Cornillon 7441 7441 algorithm. 7442 7442 … … 7459 7459 containing fronts, i.e. the number of times the pixels appeared in 7460 7460 histogram windows that had a sufficiently large number of non-masked 7461 pixels to proceed with the histogramming step of the Cayula -Cornillon7461 pixels to proceed with the histogramming step of the Cayula and Cornillon 7462 7462 algorithm. 7463 7463 … … 7509 7509 any histogram windows that had sufficiently large numbers of 7510 7510 non-masked pixels to proceed with the histogramming step of the 7511 Cayula -Cornillon algorithm.7511 Cayula and Cornillon algorithm. 7512 7512 7513 7513 * 0 - The pixel was a candidate for containing a front -- it was not … … 7556 7556 _(u"""Python expression used to calculate the absolute path of the 7557 7557 output raster that shows the pixels of the input image that were 7558 masked prior to executing the Cayula -Cornillon algorithm. If an7558 masked prior to executing the Cayula and Cornillon algorithm. If an 7559 7559 expression is not provided, this raster will not be created. 7560 7560 … … 7592 7592 number of times the pixels appeared in histogram windows that had a 7593 7593 sufficiently large number of non-masked pixels to proceed with the 7594 histogramming step of the Cayula -Cornillon algorithm. If an expression7594 histogramming step of the Cayula and Cornillon algorithm. If an expression 7595 7595 is not provided, this raster will not be created. 7596 7596 … … 7654 7654 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'], 7655 7655 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.'), 7657 7657 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.'), 7659 7659 processArcGISTableMethodName=u'FindFrontsAsArcGISRastersArcGISTable', 7660 7660 processArcGISTableMethodArcGISDisplayName=_(u'Cayula-Cornillon Fronts in CoastWatch Images Listed in Table as ArcGIS Rasters'), 7661 7661 findAndProcessMethodName=u'FindCoastWatchFilesAndFindFrontsAsArcGISRasters', 7662 7662 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.'), 7664 7664 findMethod=CoastWatchAVHRR.FindImagesInFilesAndCreateTable, 7665 7665 findOutputFieldParams=[u'fileField', u'variableField'], -
MGET/Branches/Jason/PythonPackage/src/GeoEco/DataProducts/NOAA/NODC.py
r953 r955 1025 1025 definiteClouds[reclaimedClouds] = False 1026 1026 1027 # The Cayula -Cornillon algorithm median-filters the SST1027 # The Cayula and Cornillon algorithm median-filters the SST 1028 1028 # image before running the edge detection step. Because of 1029 1029 # that, we can ignore clouds that would just get filled in … … 2982 2982 Given a temporal resolution and observation time, this tool 2983 2983 efficiently downloads a time series of Pathfinder SST images, executes 2984 the Cayula -Cornillon SIED algorithm to identify fronts, and creates2984 the Cayula and Cornillon SIED algorithm to identify fronts, and creates 2985 2985 rasters showing the locations of the fronts. 2986 2986 … … 3054 3054 3055 3055 The choice of an appropriate temporal resolution is critical to the 3056 successful operation of the Cayula -Cornillon algorithm. The algorithm3056 successful operation of the Cayula and Cornillon algorithm. The algorithm 3057 3057 is designed to operate on instantaneous images of SST, not averages. 3058 3058 Therefore, for best results, choose daily temporal resolution. … … 3122 3122 any histogram windows that had sufficiently large numbers of 3123 3123 non-masked pixels to proceed with the histogramming step of the 3124 Cayula -Cornillon algorithm.3124 Cayula and Cornillon algorithm. 3125 3125 3126 3126 * 0 - The pixel was a candidate for containing a front -- it was not … … 3366 3366 in a histogram window that had a sufficiently large number of 3367 3367 non-masked pixels to proceed with the histogramming step of the 3368 Cayula -Cornillon algorithm. If the histogram window stride is less3368 Cayula and Cornillon algorithm. If the histogram window stride is less 3369 3369 than the window size, successive histogram windows will overlap, and 3370 3370 many pixels will have candidate counts greater than 1. Masked pixels -
MGET/Branches/Jason/PythonPackage/src/GeoEco/OceanographicAnalysis/Fronts.py
r953 r955 164 164 bufferedImage[bufferSize:bufferSize+image.shape[0], -bufferSize:] = bufferedImage[bufferSize:bufferSize+image.shape[0], bufferSize:bufferSize*2] 165 165 166 # Run the Cayula -Cornillon (1992) single-image edge detection166 # Run the Cayula and Cornillon (1992) single-image edge detection 167 167 # algorithm. This function performs the histogram and cohesion 168 168 # steps, but does not perform contour following, thinning or … … 607 607 pixelType = gp.Describe(inputRaster).PixelType 608 608 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.'))) 610 610 611 611 # Detect the fronts. … … 653 653 pixelType = gp.Describe(inputRasterToProcess).PixelType 654 654 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.'))) 656 656 657 657 # Read the raster into a numpy array. … … 751 751 752 752 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)')) 754 754 755 755 # Initialize our properties. … … 783 783 784 784 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} 786 786 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} 788 788 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))]) 792 792 793 793 def _EvaluateExpressionForSlice(self, parsedExpression, attrValues, t, z, tCoord, zCoord, progressReporter): … … 849 849 noDataValue = self._Grid.UnscaledNoDataValue 850 850 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 counts851 minPopMeanDifference = float(self._Grid.GetLazyPropertyValue('UnscalingFunction')(self._MinPopMeanDifference)) - float(self._Grid.GetLazyPropertyValue('UnscalingFunction')(0.)) # Convert self._MinPopMeanDifference from degrees C to unscaled integer counts 852 852 else: 853 853 minPopMeanDifference = self._MinPopMeanDifference 854 854 855 855 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}) 857 857 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}) 859 859 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}) 861 861 862 862 if noDataValue is not None: … … 897 897 898 898 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} 900 900 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} 902 902 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} 904 904 905 905 super(_CayulaCornillonFrontsImageForGridSlice, self).__init__(self._InstantiatingCollection._Grid, … … 1035 1035 1036 1036 In 2005, I obtained a Rational Fortran (Ratfor) version of the 1037 Cayula -Cornillon algorithm from Dave Ullman. Although it had been1037 Cayula and Cornillon algorithm from Dave Ullman. Although it had been 1038 1038 modified extensively from the 1992 version, mainly to incorporate the 1039 1039 multi-image edge detection (MIED) algorithm (Cayula and Cornillon … … 1118 1118 u"""The image in which edges should be detected. 1119 1119 1120 The image pixels must be integers. The Cayula -Cornillon algorithm is1120 The image pixels must be integers. The Cayula and Cornillon algorithm is 1121 1121 designed to operate on the original unscaled integer data provided by 1122 1122 the original data provider. For example, the NOAA NODC 4km AVHRR … … 1133 1133 description=_( 1134 1134 u"""If True, the input image is assumed to be a cylinder, with the 1135 east and west edges connected. The Cayula -Cornillon algorithm will1135 east and west edges connected. The Cayula and Cornillon algorithm will 1136 1136 "wrap around" to the other side of the image when needed. If False, 1137 1137 the east and west edges are assumed to not be connected, and the … … 1149 1149 u"""Minimum allowed value for pixels of the input image. If a value is 1150 1150 provided, pixels less than this value will be masked prior to running 1151 the Cayula -Cornillon algorithm."""),1151 the Cayula and Cornillon algorithm."""), 1152 1152 arcGISDisplayName=_(u'Minimum allowed image value'), 1153 1153 arcGISCategory=_(u'Mask options')) … … 1158 1158 u"""Maximum allowed value for pixels of the input image. If a value is 1159 1159 provided, pixels greater than this value will be masked prior to 1160 running the Cayula -Cornillon algorithm."""),1160 running the Cayula and Cornillon algorithm."""), 1161 1161 arcGISDisplayName=_(u'Maximum allowed image value'), 1162 1162 arcGISCategory=_(u'Mask options')) … … 1166 1166 description=_( 1167 1167 u"""List of masks to apply to the input image before running the 1168 Cayula -Cornillon algorithm on it. Each item in the list corresponds to1168 Cayula and Cornillon algorithm on it. Each item in the list corresponds to 1169 1169 parallel entries in the lists of mask tests and values. 1170 1170 … … 1231 1231 u"""Window size, in pixels, of the median filter to apply to the input 1232 1232 image prior to running the histogram analysis step of the 1233 Cayula -Cornillon algorithm. If not provided, median filtering will not1233 Cayula and Cornillon algorithm. If not provided, median filtering will not 1234 1234 be performed. 1235 1235 … … 1241 1241 1242 1242 Median filtering is a traditional first step for certain classes of 1243 edge detection algorithms. The original Cayula -Cornillon paper used a1243 edge detection algorithms. The original Cayula and Cornillon paper used a 1244 1244 window size of 3."""), 1245 1245 arcGISDisplayName=_(u'Median filter window size'), 1246 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1246 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1247 1247 1248 1248 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'histogramWindowSize', 1249 1249 typeMetadata=IntegerTypeMetadata(minValue=8, maxValue=128), 1250 1250 description=_( 1251 u"""Size of the histogram window to use for the Cayula -Cornillon1251 u"""Size of the histogram window to use for the Cayula and Cornillon 1252 1252 algorithm. 1253 1253 … … 1259 1259 sizes."""), 1260 1260 arcGISDisplayName=_(u'Histogram window size'), 1261 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1261 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1262 1262 1263 1263 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'histogramWindowStride', … … 1265 1265 description=_( 1266 1266 u"""Number of pixels to move the histogram window after each iteration 1267 of the Cayula -Cornillon algorithm.1267 of the Cayula and Cornillon algorithm. 1268 1268 1269 1269 The original paper used a 32x32 window and a stride of 16, to minimize … … 1280 1280 Options) to thin the fronts back to one pixel wide."""), 1281 1281 arcGISDisplayName=_(u'Histogram window stride'), 1282 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1282 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1283 1283 1284 1284 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPropNonMaskedCells', … … 1298 1298 0.65."""), 1299 1299 arcGISDisplayName=_(u'Minimum proportion of non-masked pixels'), 1300 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1300 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1301 1301 1302 1302 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPopProp', … … 1317 1317 understand the statistical analysis presented in the 1992 paper."""), 1318 1318 arcGISDisplayName=_(u'Minimum proportion of smaller population'), 1319 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1319 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1320 1320 1321 1321 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPopMeanDifference', … … 1353 1353 less than 1 degree, set this parameter to 1 / 0.075 = 13.333333."""), 1354 1354 arcGISDisplayName=_(u'Minimum population mean difference'), 1355 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1355 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1356 1356 1357 1357 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minTheta', … … 1378 1378 understand the statistics presented in the original paper."""), 1379 1379 arcGISDisplayName=_(u'Minimum value for criterion function'), 1380 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1380 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1381 1381 1382 1382 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minSinglePopCohesion', … … 1405 1405 For a 16x16 window, the equation evaluates to 0.8675."""), 1406 1406 arcGISDisplayName=_(u'Minimum single-population cohesion'), 1407 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1407 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1408 1408 1409 1409 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minGlobalPopCohesion', … … 1422 1422 For a 16x16 window, the equation evaluates to 0.8875."""), 1423 1423 arcGISDisplayName=_(u'Minimum global-population cohesion'), 1424 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1424 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1425 1425 1426 1426 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'threads', … … 1437 1437 reduce performance."""), 1438 1438 arcGISDisplayName=_(u'Processing threads'), 1439 arcGISCategory=_(u'Cayula -Cornillon algorithm parameters'))1439 arcGISCategory=_(u'Cayula and Cornillon algorithm parameters')) 1440 1440 1441 1441 AddArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'fillHoles', … … 1541 1541 it appeared in a histogram window that had a sufficiently large number 1542 1542 of non-masked pixels to proceed with the histogramming step of the 1543 Cayula -Cornillon algorithm. If the histogram window stride is less1543 Cayula and Cornillon algorithm. If the histogram window stride is less 1544 1544 than the window size, successive histogram windows will overlap, and 1545 1545 many pixels will have candidate counts greater than 1. Masked pixels … … 1572 1572 any histogram windows that had sufficiently large numbers of 1573 1573 non-masked pixels to proceed with the histogramming step of the 1574 Cayula -Cornillon algorithm.1574 Cayula and Cornillon algorithm. 1575 1575 1576 1576 * 0 - The pixel was a candidate for containing a front -- it was not … … 1741 1741 * uint16 - 16-bit unsigned integer, range 0 to 65535 1742 1742 1743 The Cayula -Cornillon algorithm is designed to operate on the original1743 The Cayula and Cornillon algorithm is designed to operate on the original 1744 1744 unscaled integer data provided by the original data provider. For 1745 1745 example, the NOAA NODC 4km AVHRR Pathfinder version 5.0 dataset … … 1814 1814 any histogram windows that had sufficiently large numbers of 1815 1815 non-masked pixels to proceed with the histogramming step of the 1816 Cayula -Cornillon algorithm.1816 Cayula and Cornillon algorithm. 1817 1817 1818 1818 * 0 - The pixel was a candidate for containing a front -- it was not … … 1855 1855 description=_( 1856 1856 u"""Binary rasters to apply as masks to the input image before running 1857 the Cayula -Cornillon algorithm on it. Each item in this list1857 the Cayula and Cornillon algorithm on it. Each item in this list 1858 1858 corresponds to parallel entries in the lists of mask data types, 1859 1859 tests, and values. … … 1958 1958 description=_( 1959 1959 u"""Output binary raster that shows the pixels of the input image that 1960 were masked prior to executing the Cayula -Cornillon algorithm.1960 were masked prior to executing the Cayula and Cornillon algorithm. 1961 1961 1962 1962 The file will have the same dimensions as the input image and contain … … 2091 2091 one of the acceptable ranges. 2092 2092 2093 The Cayula -Cornillon algorithm cannot operate on floating-point data.2093 The Cayula and Cornillon algorithm cannot operate on floating-point data. 2094 2094 If your input raster contains floating-point numbers, use the Map 2095 2095 Algebra Expression option to instruct this tool to convert the raster … … 2165 2165 it did not appear in any histogram windows that had sufficiently 2166 2166 large numbers of pixels that were not NoData in the input image to 2167 proceed with the histogramming step of the Cayula -Cornillon2167 proceed with the histogramming step of the Cayula and Cornillon 2168 2168 algorithm. 2169 2169 … … 2192 2192 description=_( 2193 2193 u"""Map algebra expression to execute on the input raster before 2194 running the Cayula -Cornillon algorithm.2194 running the Cayula and Cornillon algorithm. 2195 2195 2196 2196 **WARNING:** The ArcGIS Geoprocessing Model Builder may randomly and … … 2254 2254 u"""Window size, in pixels, of the median filter to apply to the input 2255 2255 image prior to running the histogram analysis step of the 2256 Cayula -Cornillon algorithm. If not provided, median filtering will not2256 Cayula and Cornillon algorithm. If not provided, median filtering will not 2257 2257 be performed. 2258 2258 … … 2334 2334 the number of times it appeared in a histogram window that had a 2335 2335 sufficiently large number of pixels to proceed with the histogramming 2336 step of the Cayula -Cornillon algorithm.2336 step of the Cayula and Cornillon algorithm. 2337 2337 2338 2338 The raster will contain 16-bit signed integers and have the same … … 2442 2442 2443 2443 Each raster must contain 8-bit or 16-bit integers (signed or 2444 unsigned). The Cayula -Cornillon algorithm cannot operate on2444 unsigned). The Cayula and Cornillon algorithm cannot operate on 2445 2445 floating-point data. If your input rasters contain floating-point 2446 2446 numbers, use the Map Algebra Expression option to instruct this tool … … 2465 2465 it did not appear in any histogram windows that had sufficiently 2466 2466 large numbers of pixels that were not NoData in the input image to 2467 proceed with the histogramming step of the Cayula -Cornillon2467 proceed with the histogramming step of the Cayula and Cornillon 2468 2468 algorithm. 2469 2469 … … 2493 2493 containing fronts, i.e. the number of times the pixels appeared in 2494 2494 histogram windows that had a sufficiently large number of non-masked 2495 pixels to proceed with the histogramming step of the Cayula -Cornillon2495 pixels to proceed with the histogramming step of the Cayula and Cornillon 2496 2496 algorithm. 2497 2497 … … 2544 2544 it did not appear in any histogram windows that had sufficiently 2545 2545 large numbers of pixels that were not NoData in the input image to 2546 proceed with the histogramming step of the Cayula -Cornillon2546 proceed with the histogramming step of the Cayula and Cornillon 2547 2547 algorithm. 2548 2548 … … 2602 2602 number of times the pixels appeared in histogram windows that had a 2603 2603 sufficiently large number of pixels to proceed with the histogramming 2604 step of the Cayula -Cornillon algorithm. If an expression is not2604 step of the Cayula and Cornillon algorithm. If an expression is not 2605 2605 provided, this raster will not be created. 2606 2606 … … 2664 2664 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'], 2665 2665 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.'), 2667 2667 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.'), 2669 2669 processArcGISTableMethodName=u'DetectEdgesInArcGISRastersArcGISTable', 2670 2670 processArcGISTableMethodArcGISDisplayName=_(u'Cayula-Cornillon Fronts in ArcGIS Rasters Listed in Table'), 2671 2671 findAndProcessMethodName=u'FindArcGISRastersAndDetectEdges', 2672 2672 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.'), 2674 2674 findMethod=ArcGISRaster.FindAndCreateTable, 2675 2675 findOutputFieldParams=[u'rasterField'],
