@classmethod
def from_int(cls, first, last, sfreq):
    """Create a UTS dimension from sample index and sampling frequency

        Parameters
        ----------
        first : int
            Index of the first sample, relative to 0.
        last : int
            Index of the last sample, relative to 0.
        sfreq : scalar
            Sampling frequency, in Hz.
        """
    tmin = first / sfreq
    nsamples = last - first + 1
    tstep = 1.0 / sfreq
    return cls(tmin, tstep, nsamples)
