Added nbdensityfunction.py