refactoring
write theta0 to ic file, not pi/2.0
trying to do a calculated inverse