Sorting material samples