def harmonic_mapping(fg):
    """Get all peaks from a FOOOFGroup and compute harmonic mapping on the CFs."""

    f_mapping = []
    for f_res in fg:
        cfs = f_res.peak_params[:, 0]
        if len(cfs) > 0:
            f_mapping.append(list(cfs / cfs[0]))

    return f_mapping