Commit fd841b22 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Clean up tex tables for follow-up

parent d6ae23d5
...@@ -1978,22 +1978,20 @@ class MCMCFollowUpSearch(MCMCSemiCoherentSearch): ...@@ -1978,22 +1978,20 @@ class MCMCFollowUpSearch(MCMCSemiCoherentSearch):
if gen_tex_table: if gen_tex_table:
filename = '{}/{}_run_setup.tex'.format(self.outdir, self.label) filename = '{}/{}_run_setup.tex'.format(self.outdir, self.label)
with open(filename, 'w+') as f: with open(filename, 'w+') as f:
f.write(r'\begin{tabular}{c|cccc}' + '\n') f.write(r'\begin{tabular}{c|ccc}' + '\n')
f.write(r'Stage & $N_\mathrm{seg}$ &' f.write(r'Stage & $N_\mathrm{seg}$ &'
r'$T_\mathrm{coh}^{\rm days}$ &' r'$T_\mathrm{coh}^{\rm days}$ &'
r'$N_\mathrm{burn}$ & $N_\mathrm{prod}$ &' r'$\mathcal{N}^*$ \\ \hline'
r'$N^*$ \\ \hline'
'\n') '\n')
for i, rs in enumerate(run_setup): for i, rs in enumerate(run_setup):
Tcoh = float( Tcoh = float(
self.maxStartTime - self.minStartTime)/rs[1]/86400 self.maxStartTime - self.minStartTime)/rs[1]/86400
line = r'{} & {} & {} & {} & {} & {} \\' + '\n' line = r'{} & {} & {} & {} \\' + '\n'
if Nstar_vals[i] is None: if Nstar_vals[i] is None:
Nstar = 'N/A' Nstar = 'N/A'
else: else:
Nstar = Nstar_vals[i] Nstar = Nstar_vals[i]
line = line.format(i, rs[1], '{:1.1f}'.format(Tcoh), line = line.format(i, rs[1], '{:1.1f}'.format(Tcoh),
rs[0], rs[1],
helper_functions.texify_float(Nstar)) helper_functions.texify_float(Nstar))
f.write(line) f.write(line)
f.write(r'\end{tabular}' + '\n') f.write(r'\end{tabular}' + '\n')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment