Noninvasive time-sorting in radio frequency-compressed ultrafast electron diffraction