Hi,
I am trying to calculate a weighted mean statistic using a neighborhood defined by a kernel file:

My kernel file defines a 3x3 cell neighborhood, with the following weights:
For illustration purposes, I'll use the following 3x3 raster as an example. The point labels show the values of the raster cells. Grey cells indicate no data. My target cell for this example is the center green cell, with a value of 28.

When I run the tool, the weighted mean is calculated as:
weighted sum / # of data cells in neighborhood
For the green target cell: 201.5/4 = 50.375
Output shown below:

I want it to be calculated as:
weighted sum / sum of weights of data cells in neighborhood
For the green target cell this should would be 201.5/3.5 =57.57143
How do I calculate this weighted average??
Thank you!