patches_convert: add option to center patches (substract average patch) and store average patch to file