def B_icm(r, ne_fn, B_ref=10., r_ref=0., eta=0.5, **kwargs):
    """
    Magnetic field [muG] in the ICM, proportional to a power of the electron number density.

    r : distance from the center of the cluster [kpc]
    ne_fn : function for the electron number density [cm^-3]
    B_ref : reference value of the magnetic field [muG] (default: 10.)
    r_ref : reference value of the radius [kpc] (default: 0.)
    eta : power law of B_icm as a function of ne (default: 0.5)
    kwargs : other keyword arguments of the function 'ne_fn'
    """

    return B_ref*(ne_fn(r, **kwargs)/ne_fn(r_ref, **kwargs))**eta