[G]radient-based [REC]ognition of Spatial Patterns in Environmental Data
Provides algorithms for detection of spatial patterns from oceanographic data using image processing methods based on Gradient Recognition.
Get the development version from github:
# install.packages("devtools")
devtools::install_github("LuisLauM/grec")
Or install the CRAN version
install.packages("grec")
Next, we show an example of the use of getGradients
function:
require(grec)
data(sst)
exampleSSTData <- list(x = sst$longitude,
y = sst$latitude,
z = sst$sst[,,1])
data(chl)
exampleChlData <- list(x = chl$longitude,
y = chl$latitude,
z = chl$chlorophyll[,,1])
# Simple application (over a XYZ list)
out_sst <- getGradients(x = exampleSSTData)
out_chl <- getGradients(x = exampleChlData)
# External transformation for chl data
out_chl$z <- log10(out_chl$z)
par(mfrow = c(2, 2), mar = rep(0, 4), oma = rep(0, 4))
image(exampleSSTData, col = colPalette, axes = FALSE)
mtext(text = "Original SST", side = 3, line = -2, adj = 0.99, cex = 1.2)
image(out_sst, col = colPalette, axes = FALSE)
mtext(text = "SST gradient", side = 3, line = -2, adj = 0.99, cex = 1.2)
image(exampleChlData, col = colPalette, axes = FALSE)
mtext(text = "Original Chlorophyll", side = 3, line = -2, adj = 0.99, cex = 1.2)
image(out_chl, col = colPalette, axes = FALSE)
mtext(text = "Chlorophyll gradient\n(log scale)", side = 3, line = -4, adj = 0.99,
cex = 1.2)
- We are changing the name of the
detectFronts
function togetGradients
. However, for backwards compatibility,detectFronts
will still be available until v2.0.0. - Adding new methods for
getGradients
: Agenbag-1 and Agenbag-2. - Some minor improvements in documentation and code.
- Compatibility with imagine >= 2.0.0.
- New method for SpatRast objects (from terra package).
- Improvements on all methods.
ConvolNormalization = FALSE
by default now indetectFronts
function.
- Corrections in Belkin and O'Reilly method (GX and GY kernel orientation).
- Adding methods for
SpatRast
(from terra package) objects. - Support for Raster- objects will be retired since next versions of grec.
- Improving methods for
array
objects. ConvolNormalization
argument is now set asFALSE
by default indetectFronts
function.- Minor corrections and improvements in efficiency.
- Improvements on the way to work with matrix, arrays, list and RasterLayer objects.
- Correcting some bugs regarded with methods.
- Include
ConvolNormalization
argument and enable normalization of convolutions as default. - Add documentation of methods.
- Improvements on the way to extract matrix data from RasterLayer object.
- Correcting a bug when RasterLayer has not in-memory loaded data (e.g. RasterLayer gotten from read a tif file).
- Add documentation for NW_USA_SST data.
- Some corrections in demos.
- Include a new example data set for SST: NW_USA_SST
- Testing normalization inside B&O method.
- Several changes and improvments on package structure.
finalSmooth
andcontrol
argumentsdetectFronts
were deleted.extraParams
function were deleted. Now, available advanced arguments will be showed in help.- Help document for
detectFronts
were updated. - Another little corrections and improvements.
- Now,
detectFronts
function has themethod
argument, using by default the Belkin & O'Reilly (2009) algorithm. - Some little corrections.
- Modifications on the title of package.
- New set of exampling data (
grecExData
). - Changes how the
detectFronts
algorithm works internally.
- Change function name: from
fromDetection
todetectFronts
. - Change several argument names on
detectFronts
function. thresholds
argument has been replaced byqLimits
. Check help ofdetectFronts
function for details.- On
detectFronts
function, the final smooth application is optional now, controling byfinalSmooth
argument. - Now
detectFronts
is a method for classes:matrix
,array
andRasterLayer
. - Bugs and corrections.
- First Public Release