Toroidal Radiation Inversion Protocol (Python)