new analysis functiions in util/pdi....py.