Skip to content

Instantly share code, notes, and snippets.

@tomr-stargazer
Last active June 23, 2020 22:52
Show Gist options
  • Save tomr-stargazer/f100df332d9c7532c80297f5322186fc to your computer and use it in GitHub Desktop.
Save tomr-stargazer/f100df332d9c7532c80297f5322186fc to your computer and use it in GitHub Desktop.
import astropy.table as tab
import matplotlib.pyplot as plt
if __name__ == "__main__":
# read in the data
f95_table = tab.Table.read("f95_data_for_Ben.fits")
f89_table = tab.Table.read("f89_data_for_Ben.fits")
# first, f95
f95_fig = plt.figure(figsize=(16.42, 4.49))
plt.subplot(311)
plt.plot(f95_table["MEANMJDOBS"], f95_table["JAPERMAG3"], "b.", ms=3)
plt.ylim(16.7, 16)
plt.ylabel("J")
plt.axvline(56201, alpha=0.33)
plt.axvline(56357, alpha=0.33)
plt.subplot(312)
plt.plot(f95_table["MEANMJDOBS"], f95_table["HAPERMAG3"], "g.", ms=3)
plt.ylim(14.6, 14.1)
plt.ylabel("H")
plt.axvline(56201, alpha=0.33)
plt.axvline(56357, alpha=0.33)
plt.subplot(313)
plt.plot(f95_table["MEANMJDOBS"], f95_table["KAPERMAG3"], "r.", ms=3)
plt.ylim(13.2, 12.7)
plt.ylabel("K")
plt.axvline(56201, alpha=0.33)
plt.axvline(56357, alpha=0.33)
plt.xlabel("Modified Julian Date")
plt.savefig("fig_f95_for_Ben.pdf")
plt.savefig("fig_f95_for_Ben.png")
# next, f89, which never has J data.
f89_fig = plt.figure(figsize=(13.65, 3.09))
plt.subplot(211)
plt.plot(f89_table["MEANMJDOBS"], f89_table["HAPERMAG3"], "g.", ms=3)
plt.ylim(15, 12)
plt.ylabel("H")
plt.subplot(212)
plt.plot(f89_table["MEANMJDOBS"], f89_table["KAPERMAG3"], "r.", ms=3)
plt.ylim(11.2, 8.7)
plt.ylabel("K")
plt.xlabel("Modified Julian Date")
plt.savefig("fig_f89_for_Ben.pdf", bbox_inches='tight')
plt.savefig("fig_f89_for_Ben.png", bbox_inches='tight')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment