I’ve done some experiments in GMIC to detect and remove moiré, but I don’t have the skills to translate from GMIC to other software.