updated reduce_HYSA.py