Skip to content

Instantly share code, notes, and snippets.

@zonca
Created June 1, 2012 18:42
Show Gist options
  • Save zonca/2854302 to your computer and use it in GitHub Desktop.
Save zonca/2854302 to your computer and use it in GitHub Desktop.
check bands
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