edited red_cal_v003.py