def load_cmbfast(file_in):
    # Equivalent of load_cmbfast.m but doesn't read .fits for now
    # (when it does, may want to change back).  Right now we just want
    # a simple .txt spectrum with columns
    # We want the columns ordered TT TE EE BB TB EB.  Note
    # that standard CAMB output is TT EE BB TE...
    # TB, EB, BT, BE are already zero.

    print "### Loading input spectra from file: %s" % file_in

    try:
        data = np.loadtxt(file_in)
    except:
        print "Error reading %s. Make sure it is in working directory" %file_in
    ell = data[:, 0]

    # Initialize the Cs_l array
    Cs_l = np.zeros([np.shape(data)[0], 9])

    Cs_l[:, 0] = data[:, 1]  # TT
    Cs_l[:, 1] = data[:, 2]  # TE
    Cs_l[:, 2] = data[:, 3]  # EE
    Cs_l[:, 3] = data[:, 4]  # BB
    # Cs_l[:,4]               # TB
    # Cs_l[:,5]               # EB
    Cs_l[:, 6] = data[:, 2]  # ET
    # Cs_l[:,7]             # BT
    # Cs_l[:,8] =           # BE

    return (ell, Cs_l)

#####################################################################
dataset/ETHPy150Open baudren/montepython_public/montepython/likelihoods/bicep2/bicep_util.py/load_cmbfast/original