def get_sun_mag(filter,system='SDSS_Blanton_2003_z0.1'):
    """
    Get solar absolute magnitudes for a filter in a system.
    Taken from Duncan Campbell, and later modified.
    
    Parameters
    ----------
    filter: string
        magnitude filter to use.
    
    system: string
        Kind of filter to use. (default = `SDSS_Blanton_2003_z0.1`)
        Options: 
        - `Binney_and_Merrifield_1998`: See Binney and Merrifield 1998
        - `SDSS_Blanton_2003_z0.1`: See Blanton et al. 2003 equation 14
    
    Returns
    -------
    Msun: float
        Solar absolute magnitude in `filter` using `system`.
    """
    if system=='Binney_and_Merrifield_1998':
        if filter=='U':
            return 5.61
        elif filter=='B':
            return 5.48
        elif filter=='V':
            return 4.83
        elif filter=='R':
            return 4.42
        elif filter=='I':
            return 4.08
        elif filter=='J':
            return 3.64
        elif filter=='H':
            return 3.32
        elif filter=='K':
            return 3.28
        else:
            raise ValueError('Filter does not exist in this system.')
    if system=='SDSS_Blanton_2003_z0.1':
        if filter=='u':
            return 6.80
        elif filter=='g':
            return 5.45
        elif filter=='r':
            return 4.76
        elif filter=='i':
            return 4.58
        elif filter=='z':
            return 4.51
        else:
            raise ValueError('Filter does not exist in this system.')
    else:
        raise ValueError('Filter system not included in this package.')