Expanded on calc_rx.py script.