patches: convert patches data to ICA code input format