@classmethod
def from_data(cls, data, name=None, start_idx=0, stop_idx=None):
    """Construct CorrelatedStack from image stack object

        Parameters
        ----------
        data : TiffStack
            TiffStack object.
        name : str
            Plot label of the correlated stack
        start_idx : int
            Index at the first frame.
        stop_idx: int
            Index beyond the last frame.
        """
    new_correlated_stack = cls.__new__(cls)
    new_correlated_stack.src = data
    new_correlated_stack.name = name
    new_correlated_stack.start_idx = start_idx
    new_correlated_stack.stop_idx = (new_correlated_stack.src.num_frames if
        stop_idx is None else stop_idx)
    return new_correlated_stack
