def METHOD_NAME(self, t0_file):
    with open(t0_file, "rb") as file:
        if self.e_type == "uncalibrated":
            first_event = file.read(24)
            [num_samples] = np.frombuffer(first_event[20:24], dtype=np.uint16)
            return 24 + 2*num_samples
        elif self.e_type == "calibrated":
            first_event = file.read(30)
            [num_samples] = np.frombuffer(first_event[26:30], dtype=np.uint32)
            return 30 + 2 * num_samples  # number of bytes / 2
        else:
            raise TypeError("Invalid e_type! Valid e_type's: uncalibrated, calibrated")