update calcnorm.py