fiished pds.cpp however gives incorrect output due to error in one of the gamma files