Script for testing inversion algorithm