def METHOD_NAME(self, instance_data, input_grid, output_grid, wavelength):
    if not input_grid.is_regular or not input_grid.is_('cartesian'):
        raise ValueError('The input grid must be a regular, Cartesian grid.')
    k = 2 * np.pi / wavelength * self.evaluate_parameter(self.refractive_index, input_grid, output_grid, wavelength)
    L_max = np.max(input_grid.dims * input_grid.delta)
    if np.any(input_grid.delta < wavelength * abs(self.distance) / L_max):
        def transfer_function(fourier_grid):
            enlarged_grid = make_fft_grid(fourier_grid)
            fft_upscale = FastFourierTransform(enlarged_grid)
            def impulse_response(grid):
                r_squared = grid.x**2 + grid.y**2 + self.distance**2
                r = np.sqrt(r_squared)
                cos_theta = self.distance / r
                return Field(cos_theta / (2 * np.pi) * np.exp(1j * k * r) * (1 / r_squared - 1j * k / r), grid)
            impulse_response = evaluate_supersampled(impulse_response, enlarged_grid, self.num_oversampling)
            return fft_upscale.forward(impulse_response)
    else:
        def transfer_function_native(fourier_grid):
            k_squared = fourier_grid.as_('polar').r**2
            k_z = np.sqrt(k**2 - k_squared + 0j)
            return Field(np.exp(1j * k_z * self.distance), fourier_grid)
        def transfer_function(fourier_grid):
            return evaluate_supersampled(transfer_function_native, fourier_grid, self.num_oversampling)
    instance_data.fourier_filter = FourierFilter(input_grid, transfer_function, q=2)