Created
June 1, 2012 18:42
-
-
Save zonca/2854302 to your computer and use it in GitHub Desktop.
check bands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyfits | |
from scipy.constants import c | |
from scipy.integrate import trapz | |
rimo=pyfits.open('rimo.fits') | |
for ext in rimo[3:]: | |
f = c/ext.data['WAVENUMBER']/1.e6 #GHz | |
t = ext.data['TRANSMISSION'] | |
print "%s = Sum: %.2f, Max: %.2f, Integ: %.2f" % (ext.name, t.sum(), t.max(), trapz(t[1:], f[1:])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment