raster.deviation function

Raster local deviation from the global trend