python code updated to reflect additional data reduction