def readin_rho(filename, rhofile=True, aniso=False):
    """Read in the values of the resistivity in Ohmm.
    The format is variable: rho-file or mag-file.
    """
    if aniso:
        a = [[0, 1, 2], [2, 3, 4]]
    else:
        a = [0, 2]
    if rhofile:
        if filename is None:
            filename = 'rho/rho.dat'
        with open(filename, 'r') as fid:
            mag = np.loadtxt(fid, skiprows=1, usecols=(a[0]))

    else:
        if filename is None:
            filename = read_iter()
        with open(filename, 'r') as fid:
            mag = np.power(10, np.loadtxt(fid, skiprows=1, usecols=(a[1])))

    return mag