@classmethod
def from_trace(cls, trace, n_stacks=1, delay=0):
    """Initialize a `TimeSeries` object from a trace object.

        This method is more general method than `from_trace_seg2`, 
        as it does not attempt to extract any metadata from the `Trace` 
        object.

        Parameters
        ----------
        trace : Trace
            Refer to
            `obspy documentation <https://github.com/obspy/obspy/wiki>`_
            for more information

        n_stacks : int, optional
            Number of stacks the time series represents, (default is
            1, signifying a single unstacked time record).

        delay : float {<=0.}, optional
            Denotes the pre-event delay, (default is zero, 
            meaning no pre-event noise was recorded).

        Returns
        -------
        TimeSeries
            Initialized with information from `trace`.
        """
    return cls(amplitude=trace.data, dt=trace.stats.delta, n_stacks=
        n_stacks, delay=delay)
