python script computes quality metrics