Could reduce the size+repetitiveness of this code chunk, and other similar code chunks in this file, with ```galsim.utilities.convert_interpolant_to_2d```?