def read_M(exp='bicep1', root=""):

    if exp =='bicep1':
        file_in = "B1_3yr_bpcm_20131003.txt"
    elif exp == 'bicep2':
        file_in = "B2_3yr_bpcm_no-sysuncer_20140314.txt"
    else:
        print 'exp must be bicep1 or bicep2 to load the proper files'

    print "### Reading covariance matrix (M_cc) from file: %s" %file_in

    try:
        data = np.loadtxt(os.path.join(root, file_in))
    except IOError:
        print file_in %"Error reading %s. Make sure it is in working directory"

    # HACK because file_in = "B2_3yr_bpcm_no-sysuncer_20140226.txt"  has different format
    if exp == 'bicep2':
        data = data.reshape((54,54))
    M_raw = np.array(data)
    return M_raw


#####################################################################
# Utility functions used to calculate the likelihood
# for a given l bin.
dataset/ETHPy150Open baudren/montepython_public/montepython/likelihoods/bicep2/bicep_util.py/read_M/swapped operands of `%`