Exemplo n.º 1
0
f = plt.figure(dpi=120)
gs = gridspec.GridSpec(2, 1)
ax = [plt.subplot(gs[0]), plt.subplot(gs[1])]
plt.subplots_adjust(left=0.15, right=0.85, top=0.95, bottom=0.15, hspace=0.4)

#### plot each files' values
for i, (fname, [n, nout]) in enumerate(sorted(default.provenance.iteritems())):
    mm = n - nout  # how many values are there after restriction
    ax[0].errorbar(t[:mm] - 2400000, rv[:mm], yerr=err[:mm], fmt="o", color=colors[i], capsize=0)
    t, rv, err = t[mm:], rv[mm:], err[mm:]

ax[0].set_xlabel("BJD - 2400000 [days]")
ax[0].set_ylabel("RV [m/s]")
ax[0].set_title("14 Her", loc="right")
# ax[0].set_xlim([49000, 54000])


ax[1].semilogx(1 / default.per.freq, default.per.power, "k", lw=1.5)

ax[1].set_xlabel("Period [days]")
if default.per.name == "Bayesian Lomb-Scargle":
    ax[1].set_ylabel(r"P($f$|D,I)")
else:
    ax[1].set_ylabel("Normalized Power")


rstyle(ax, grid_toggle=True)

plt.show()
Exemplo n.º 2
0
f = plt.figure(dpi=150, figsize=(9,5))
# gs = gridspec.GridSpec(2, 1)
# ax = [plt.subplot(gs[0]), plt.subplot(gs[1])]
# plt.subplots_adjust(left=0.15, right=0.85, top=0.95, bottom=0.15, hspace=0.4)
ax = plt.subplot(111)
plt.subplots_adjust(bottom=0.15)

#### plot each files' values
for i, (fname, [n, nout]) in enumerate(sorted(default.provenance.iteritems())):
    mm = n-nout # how many values are there after restriction
    ax.errorbar(t[:mm], rv[:mm]*1e3, yerr=err[:mm]*1e3, \
                 fmt='o', color=colors[i], capsize=0, alpha=0.8)
    t, rv, err = t[mm:], rv[mm:], err[mm:]

ax.set_xlabel('BJD - 2400000 [days]')
ax.set_ylabel('RV [m/s]')
ax.set_title('HD41248', loc='right')
plt.ticklabel_format(useOffset=False)
# ax[0].set_xlim([49000, 54000])


do_rectangle = True
if do_rectangle:
	rect1 = patches.Rectangle((52800,-13), 3000, 26, color=colors[1], alpha=0.4)
	ax.add_patch(rect1)
	ax.text(54500, 11.5, 'Jenkins et al. (2013)')


rstyle([ax], grid_toggle=True)

plt.show()