def sort_pulsar_dict(pulsar_dict):
    """
    Sorts a pulsar dict by frequency

    Parameters:
    -----------
    pulsar_dict: dictionary
        A dictionary of profiles from get_data_from_epndb

    returns:
    --------
    pulsar_dict: dictionary
        The same dictionary sorted by frequency
    """
    freq_list = pulsar_dict["freq"]
    for key in pulsar_dict.keys():
        _, pulsar_dict[key] = (list(t) for t in zip(*sorted(zip(freq_list, pulsar_dict[key]))))

    return pulsar_dict