-
-
Save anonymous/d10c4a79d94c1393a493 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
import lsst.afw.detection as afwDetection | |
import lsst.afw.image as afwImage | |
fname = 'c4d_130830_040651_ooi_g_d1.fits.fz[35]' | |
# Use Exposure | |
exp = afwImage.ExposureF(fname) | |
print 'from afwImage.ExposureF, we can print out the 35th extension image' | |
print exp.getMaskedImage().get(0, 0) | |
a = afwImage.MaskedImageF(fname) | |
print 'from afwImage.MaskedImage, we can print out the 35th extension image' | |
print a.get(0, 0) | |
print 'The afwImage.ExposureF values actually match those of the 1st extension, as retrieved by MaskedImageF' | |
b = afwImage.MaskedImageF('c4d_130830_040651_ooi_g_d1.fits.fz[1]') | |
print b.get(0,0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment