def _get_recording(self, index):
        assert index >= 0
        recs = np.nonzero((index - self.offsets[:-1]) >= 0)[0]
        if len(recs) == 0:
            # If the index is greater than the total size,
            # return the last recording.
            return len(self.arrs) - 1
        # Return the last recording such that the index is greater than
        # its offset.
        return recs[-1]
Return the recording that contains a given index.
dataset/ETHPy150Open kwikteam/phy/phy/io/array.py/ConcatenatedArrays._get_recording