Python code for aperiodic Fourier modal method applied to aperiodic grating