code: def plan_first_phase(N1, N2):
      
      N = N1*N2
      vin = pycbc.types.zeros(N, dtype=numpy.complex64)
      vout = pycbc.types.zeros(N, dtype=numpy.complex64)
      f = float_lib.fftwf_plan_many_dft
      f.argtypes = [ctypes.c_int, ctypes.c_void_p, ctypes.c_int,
                    ctypes.c_void_p, ctypes.c_void_p,
                    ctypes.c_int, ctypes.c_int,
                    ctypes.c_void_p, ctypes.c_void_p,
                    ctypes.c_int, ctypes.c_int,
                    ctypes.c_int, ctypes.c_int]
      f.restype = ctypes.c_void_p
      return f(1, ctypes.byref(ctypes.c_int(N2)), N1,
               vin.ptr, None, 1, N2,
               vout.ptr, None, 1, N2, FFTW_BACKWARD, FFTW_MEASURE)
docs: Create a plan for the first stage of the pruned FFT operation.
      (Alex to provide a write up with more details.)
  
      Parameters
      -----------
      N1 : int
          Number of rows.
      N2 : int
          Number of columns.
  
      Returns
      --------
      plan : FFTWF plan
          The plan for performing the first phase FFT.