This perl script calculates a spatial density grid based on a gaussian kernel function using a SAMSE bandwith calculated using R.