AdvancedPhotonSource / tike

Repository for ptychography software
http://tike.readthedocs.io
Other
29 stars 15 forks source link

BUG: Reorder scan positions to original order before returning #111

Closed carterbox closed 3 years ago

carterbox commented 3 years ago

Purpose

This commit patches a bug which was introduced when I implemented randomized mini-batches. The problem is that when creating the random mini-batches, the scan positions and data may be reordered, but only the scan positions are returned. This causes the scan positions and data to become out of sync. The solution to this problem is to resort the scan positions before returning them so that they are in the same order as the original provided data.