Create mag_lim.py

Finished the edits that make this usable for the MC