Upload core.py

Only TWR input checking and simple TWR calculations are currently available.