LogDensity Computation Script