def get_det_prefix(pv_info):
    """
    Determines which prefix will be passed into the detector init.

    Parameters
    ----------
    pv_info: ``str``
        The second element in a camview cfg line.

    Returns
    -------
    detector_prefix: ``str``
        The prefix to use in the detector init.
    """
    pv_info = pv_info.split(';')
    try:
        detector_prefix = pv_info[1]
    except IndexError:
        # Not provided in config, guess from image base
        detector_prefix = ':'.join(pv_info[0].split(':')[:-1])
    return detector_prefix + ':'