Skip to content

Instantly share code, notes, and snippets.

/test.py Secret

Created Apr 24, 2015
Embed
What would you like to do?
#!/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