added calc_regionratio.py