def unpack_tpf(tpf, name):
    """


    Parameters
    ----------
    tpf : lightkurve object
        lightkurve target pixel file object
    name : string
        name of column with pixels

    Returns
    -------
    cube : numpy array
        pixels as a data cube
    time : numpy array
        times

    """
    time = tpf.time.value
    cube = getattr(tpf, name).value
    time_offset_str = tpf.time.format

    return time, cube, time_offset_str