Fixed an error in script_lumdist function. Implemented positive and negative curvature calculations