diversity function

Estimate diversity from FIADB