calc_dens function

Calculate 1D density of age data