Testing a grid density function for merged datasets