Skip to content

Instantly share code, notes, and snippets.

@kbarbary
Created February 16, 2017 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbarbary/966bd8fcfa42e3631b6a1b8ae0a4c882 to your computer and use it in GitHub Desktop.
Save kbarbary/966bd8fcfa42e3631b6a1b8ae0a4c882 to your computer and use it in GitHub Desktop.
# Split MIRI transmissions into separate files. Original file was
# http://ircamera.as.arizona.edu/MIRI/ImPCE_TN-00072-ATC-Iss2.xlsx
# saved as CSV.
import numpy as np
data = np.loadtxt("ImPCE_TN-00072-ATC-Iss2.csv", skiprows=2)
bands = ("F560W F770W F1000W F1280W F1130W F1500W F1800W F2100W F2550W"
.lower().split())
for i, band in enumerate(bands):
banddata = data[:, [0, i+1]]
fname = "jwst_miri_{}.dat".format(band)
np.savetxt(fname, banddata, fmt=("%7.5f", "%14.12f"),
header="wave[microns] transmission[e/photon]")
@benjaminrose
Copy link

F1280W & F1130W are swapped (compared to the columns of the csv file) in L8. This ends up switching the filters sncosmo/sncosmo#356.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment