<jupyter_start><jupyter_text>make table with equiparition fitting resultsandtable with all the radio data<jupyter_code>dd = {}
# epsion_B = 0.001
# epsion_e = 0.1
# eta = epsion_B/epsion_e / (6/11)

# Eeq_corr = (11/17)*eta**(-6/17) + (6/17) *eta**(11/17)
# Req_corr = eta**(1/17)
# print (Req_corr, Eeq_corr)

# new: just the radio data
print ('\n')

data_rec = radio_rec
data_rec = data_rec[data_rec['inst']!='eMERLIN']

mjd0 = bran_disc.mjd
mjds = np.array([58625, 58653, 58703, 58761, 58819])

for i, mjd in enumerate(mjds): 
    
    it = abs(data_rec['mjd']-mjd)<14
    ii = it * (data_rec['eflux_mJy']>0)

    epoch_data  = data_rec[ii]
    for j in np.argsort(epoch_data ['nu_GHz']):
        print ('{0:6.0f}&{1:7.2f}&{2:5.3f}&{3:5.3f}&{4:9}\\\\'.format(epoch_data[j]['mjd']-mjd0, epoch_data[j]['nu_GHz'], epoch_data[j]['flux_mJy'], epoch_data[j]['eflux_mJy'], epoch_data[j]['inst']))
    print ('''\hline''')






# read fit results
for eps_str in ['Eqp','nonEqp']:
    dd[eps_str] = astropy.io.ascii.read(os.path.join(data_dir, 'at2019dsg_mcmc_time_{0}.dat'.format(eps_str)), format='fixed_width')

# print table 1:
for i, d1 in enumerate(dd['Eqp']):
    d01=dd['nonEqp'][i]
    ss = '{0:4} & ${1:5.2f}\pm{2:0.2f}$ & '.format((int(d1['time'])),10**d1['F_p'], np.log(10)*d1['eF_p']*10**d1['F_p'] )
    ss += '${0:5.1f}\pm{1:0.1f}$ \\\\ '.format(10**d1['nu_p']/1e9, np.log(10)*d1['enu_p']*10**d1['nu_p']/1e9 )
    print (ss)
print ('\n\n')

# print table 2:
for geo in ['cone', 'sphere']:
    print ('')
    for i, d1 in enumerate(dd['Eqp']):
        d01=dd['nonEqp'][i]
        ss = '&{0:4}& '.format((int(d1['time'])))
        ss += '${0:0.2f}({1:0.2f})$ & '.format(d1['R_'+geo], d1['eR_'+geo])
        ss += '${0:0.1f}({1:0.1f})$ &'.format(d1['E_'+geo], d1['eE_'+geo])
        ss += '${0:0.2f}({1:0.2f})$ & '.format(d1['B_'+geo], d1['eB_'+geo])
        ss += '${0:0.1f}({1:0.1f})$ &'.format(d1['n_electr_'+geo], d1['en_electr_'+geo])
        ss += '${0:0.2f}({1:0.2f})$ & '.format(d01['R_'+geo], d01['eR_'+geo])
        ss += '${0:0.1f}({1:0.1f})$ & '.format(d01['E_'+geo], d01['eE_'+geo])
        ss += '${0:0.2f}({1:0.2f})$ & '.format(d01['B_'+geo], d01['eB_'+geo])
        ss += '${0:0.1f}({1:0.1f})$ \\\\'.format(d01['n_electr_'+geo], d01['en_electr_'+geo])

        print (ss)<jupyter_output>&  42& $16.28(0.03)$ & $48.0(0.1)$ &$-0.25(0.05)$ & $3.5(0.1)$ &$16.18(0.02)$ & $49.4(0.1)$ & $-0.67(0.05)$ & $4.4(0.1)$ \\
&  70& $16.48(0.02)$ & $48.3(0.1)$ &$-0.37(0.04)$ & $3.3(0.1)$ &$16.37(0.02)$ & $49.7(0.1)$ & $-0.79(0.04)$ & $4.1(0.1)$ \\
& 120& $16.68(0.02)$ & $48.7(0.1)$ &$-0.48(0.04)$ & $3.1(0.1)$ &$16.58(0.02)$ & $50.1(0.1)$ & $-0.91(0.04)$ & $3.9(0.1)$ \\
& 178& $16.93(0.02)$ & $49.0(0.1)$ &$-0.72(0.04)$ & $2.6(0.1)$ &$16.82(0.02)$ & $50.3(0.1)$ & $-1.16(0.04)$ & $3.4(0.1)$ \\

&  42& $15.91(0.03)$ & $47.4(0.1)$ &$0.01(0.05)$ & $4.0(0.1)$ &$15.81(0.02)$ & $48.8(0.1)$ & $-0.41(0.04)$ & $4.9(0.1)$ \\
&  70& $16.11(0.02)$ & $47.8(0.1)$ &$-0.10(0.04)$ & $3.8(0.1)$ &$16.00(0.02)$ & $49.2(0.1)$ & $-0.52(0.04)$ & $4.7(0.1)$ \\
& 120& $16.31(0.02)$ & $48.2(0.1)$ &$-0.22(0.04)$ & $3.6(0.1)$ &$16.21(0.01)$ & $49.5(0.1)$ & $-0.65(0.04)$ & $4.4(0.1)$ \\
& 178& $16.56(0.02)$ & $48.4(0.1)$ &$-0.46(0.04)$ & $3.1(0.1)$ &$16.45(0.02)$ & $49.8(0.1)$ & $-0.89(0.04)$ & $3.9(0.1)$ \\
{'fraction_non_alphanumeric': 0.346969696969697, 'fraction_numerical': 0.17181818181818181, 'mean_word_length': 3.4368279569892475, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '416272', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 2002, 'n_tokens_neox': 1787, 'n_words': 228, 'path': 'export_tex_data_tables.ipynb', 'repo_name': 'robertdstein/at2019dsg', 'size': '3300'}