The code presented here is used to simulate the diffraction pattern of the spatial light modulator.
For details, please consult our paper: "Xin Liu, Shijie Tu, Cuifang Kuang, Xu Liu, and Xiang Hao, Calibration of phase-only liquid-crystal spatial light modulators by diffractogram analysis. Optics and Lasers in Engineering 156, 107056 (2022)."
You may also reach Xin Liu (liuxin.optics@gmail.com) or Xiang Hao (haox@zju.edu.cn).