I was hoping to run a calculation on all of the pixels within my DEM. How can I apply a formula to be calculated on each pixel within a certain neighbourhood?

I was thinking focal statistics, but you can only calculate statistics, not a different formula.

Thank you!

I was thinking focal statistics, but you can only calculate statistics, not a different formula.

Thank you!

Well, I was hoping to calculate Simpson's diversity index:

I = 1 - �??P2i ("P squared subscript i")

Where I would need to calculate the observed proportions (Pi) of the different types (i) within a specific neighbourhood.

So if I'm following you correctly, should I break this formula up with focal statistics by calculating the observed proportions and the different types first?