added a calculate_relative_kernels function, not yet implemented in the inversion_routine.