Create rsm.py

Main processing script.