Skip to content

Instantly share code, notes, and snippets.

/test.py Secret

Created April 24, 2015 03:41
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 anonymous/d10c4a79d94c1393a493 to your computer and use it in GitHub Desktop.
Save anonymous/d10c4a79d94c1393a493 to your computer and use it in GitHub Desktop.
#!/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