def get_test_runlist(): """Get a runlist for the tests""" from atpy import Table table = Table() table.add_column('Run', [18373, 20581]) table.add_column('Start_Time', ['2004-01-19 19:51:26', '2004-04-27 23:31:59']) table.add_column('Duration', [1580.0, 1682.0]) table.add_column('GLON', [184.557, 359.346]) table.add_column('GLAT', [-5.784, 0.410]) return table
import pylab as plt from atpy import Table prefix = "/Users/ncrighton/Projects/MPIA_QSO_LBG/Cloudy/J0004/comp1" name, = glob(prefix + "/uvb_k04/*tilted*tbl") fig1 = pl.figure(figsize=(7.1,4.7)) fig1.subplots_adjust(left=0.15, bottom=0.15, top=0.96,right=0.96) ax = fig1.add_subplot(111) N0 = -21 ref = Table(name) ind = ref.energy.searchsorted(0.99) ref.log10jnu = ref.log10jnu - ref.log10jnu[ind] + N0 ax.plot(np.log10(ref.energy), ref.log10jnu - ref.log10jnu[ind] + N0, '-', color='k') xvals = np.log10((IP * u.eV).to(u.Ry).value) y = np.interp(xvals, np.log10(ref.energy), ref.log10jnu) from barak.absorb import split_trans_name xdiff = np.diff(xvals) direction = ['up'] previousdown = False
prefix = "/Users/ncrighton/Projects/MPIA_QSO_LBG/Cloudy/J0004/comp1" names = sorted(glob(prefix + "/uvb_k0[0246]/*tilted*tbl")) fig1 = pl.figure(figsize=(5.1, 4.7)) fig1.subplots_adjust(left=0.2, bottom=0.15, top=0.96, right=0.96) fig2 = pl.figure(figsize=(5.1, 4.7)) fig2.subplots_adjust(left=0.2, bottom=0.15, top=0.96, right=0.96) ax1 = fig1.add_subplot(111) ax2 = fig2.add_subplot(111) for ax in (ax1, ax2): N0 = -21 for i, n in enumerate(names): T = Table(n) ind = T.energy.searchsorted(0.99) if i == len(names) - 1: ref = T ref.log10jnu = T.log10jnu - T.log10jnu[ind] + N0 color = '0.5' if i != 2 else 'k' ax.semilogx(T.energy, T.log10jnu - T.log10jnu[ind] + N0, '-', color=color) puttext(0.04, 0.07, '$\mathrm{Haardt\ & \ Madau}$\n$2012,\ z=2.5$', ax=ax1, ha='left')