Split up mergePatches into two files: one that loads the saved outputs of roiFromPatch, and another that takes local ROIs and patch ranges and merges them together. Wish me luck.