patches: added debug messages to function randompatches1D in patches_lib.cpp