move write_coefficients to interpolator