Updated densities to log scale and grad analytic calc